Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Lipko

  1. I managed to solve it with some thinkering. I used 3rd order Bézier curves to interpolate between neighbour points. The tangents in the points (which are the other two control points of the Bézier curve besides the end points) is calculated by the angle bisector of the two adjacent segments. The length of these control tangents are calculated from the length of the corresponding segment multiplied by a fix value ("strength"). Though it could be easily changed to have a separate strength value for each point. Implemented closed and open version of the curve. Note, that for some reason I havent looked into yet, the curve or some sections of it can suddenly snap into a seemingly opposite winding after a certain amount of deformity. The curve looks okay for my needs so I don't think I will fix that any time soon. Attached a small quick demo. curve_through_points_demo.vi The Bézier functio is also my "work" (copied the code into a formula node), I'm surprised that these basic geometry stuff are not implemented in Labview. by default 2D_curve_through_points.vi 2D_3rd_order_Bezier_curve.vi 2D_ccw_angle.vi 2D_3rd_order_Bezier_point.vi
  2. I solved it by having multiple dialogs, so the user can only change a single thing or a few closely related things at once. There is still a god dialog but users find it hard to "feel" that all its elements will be applied on all selected "sections". In my usecase the settings mean properties of a section in a sequence (an array of clusters is a sequence and the dialog shows all elements of that cluster or section). In most cases only a few things will be the same in multiple sections, for example the comment, or section length, but the god dialog was a hystorical thing (the only way to set up a section in the first release) that I left there because many users are so used to it. I never got back to the problem, the best idea I could come up with is to change the background of an element if it was changed by the user, but didn't implement it. I still feel the multiple single-property dialogs are more intuitive and also quite simple to implement, and maybe it would be the best just to get rid of the god dialog. But this doesn't apply to the original post, I don't fully understand that usecase.
  3. Sorry to chime in, maybe I had a similar problem some time ago and I'm interested in the GUI design part of the problem. So basically you have a config window and you only want to apply changes to elements that were changed by the user? And the changes should affect more things (all changed cluster elements in an array of clusters)? How the users know what was changed besides their memory? How would a user apply an elements current (default) value to the other clusters apart from changing the value than changing back to the default? If I'm totally off, then sorry. I kind of gave up on this feature because I coudn't think of a proper solution that would be evident to use for the users apart from the two workarounds I mentioned or having a "changed?" or "apply value?" bool control next to every single control.
  4. Hi all! I want to create a smooth curve through given points in 2D and I'm having trouble with using the built in interpolation functions in Labview. I need something like this: I found this thread from more than 10 years ago and I can't find the interpolation vi it's using, and I don't really understand what the other similar vis are doing. It's only for a drawing application so it's not really important in details how the interpolation works (nurbs/bézier/whatever), it only needs to look okay. Thanks for any hints in advance!
  5. I don't fully understand your post. Does the problem also occur if you don't have the front panel of "Three Button Dialog.vi" oneped? Does it occur if only the caller vi is open? I often make dialogs from a "promt user input" express vi by opening it's front panel thus converting it. If I forget to close its front panel, all sorts of similar race condition things occur if I run the main vi. Never cared enough to have this sorted out though...
  6. Whenever I had to rewrite stuff and restarted from scratch, the result (GUI, bugs, code quality) was much better. Okay, I'm learning continuously and I jump into real projects when I have the absolute minimum required language knowledge, so even in the course of one project my coding style can change a lot, so I have some really bad code mixing methods like crazy (LV small data storage example in non-speed-critical aplications: local varaibles (I dropped that very early)->shift registers->hidden indicators). In my uneducated opinion the biggest obstackle of making clean code and fine architecture (thus less bugs, better improvability) is that it's impossible to fully flesh out the specifications when starting a new project (and refractoring can be a real pain). On the other hand if you port (especially if you are also an active user of the program), then you have a solid specification and a working "prototype" (the original project) mapped out to the last detail. Of course, you have to be ready with a very detailed test plan.
  7. Hi All! Little background: I was searching for an implementation (or at least a full explanation) of constructing an ellipse from 5 points. 5 points exactly define an ellipse, so it's not a data fitting problem. To my surprise, I couldn't find any solutions that can be used as it is or any full explanations. All I could find was pointers into the proper direction (matrix math) but my math is so rusty that I could not implement anything from those information ("just calculate the determinant with some symbolic math library or do it on paper haha and goodness comes"). I was a bit upset because I wasn't doing homework, I actually needed that function. Anyhow, after finding a small hint in one of the threads, I could go through the thing and implementet the algorithm. Maybe it will be useful for anyone who is looking for exactly that thing. It's not that nice, not optimised, I guess many of the math could be optimized/simplified, but it's working at least. Precision: I'm not sure. For my needs, it's precise enough, I'm not an expert in condition of the matrix or other calculations. I think the names are self explaining, but If you have questions, don't hesitate to ask. The formulas and the thread I found most usable are included on the block diagram. Input: array of coordinates (x,y in a cluster). Output: ellipse parameters: center, two radii and angle of the first axis the coordinates of the axis endpoints the five t parameter values of the input points (t parameter for the parametric equation of the ellipse), so for example you can draw ellipse arc between two of the points If the ellipse cannot be constructed, it results in some NaNs here and there... No extra checks added 2 subvis are also implemented, but maybe they are already in the LV base package and just missed them: parametric equation for arbitrary ellipses (or polar equation, my math is that rusty I can't even express properly what I mean) CCW angle between two vectors (result in 0....2 PI range), it's used to calculate the t parameters for the points. This is where I feel there's some redundancy or redundant trigonometric calculations. Thank's for any feedback! EDIT: I added a small demo program. You can move the 5 points on a graph. 2D_ellipse_parametric_equation.vi 2D_ellipse_from_5pts.vi 2D_ccw_angle.vi Ellipse_Demo.vi
  8. Why don't you use a control instead? You can write its contents from the program through value property.
  9. I haven't looked into the thread in detail, but for debouncing I usually use an "off delay". It works with a one-cycle spike in the raw measured data too. I haven't implemented it in Labview, I use these off-delay blocks in Siemens Logosoft (PLC).
  10. Maybe I misunderstood, and what you posted is just an example. Anyway, that example shows that the different calculations and sub Vis are run serially, because of data dependency, so I would "streamline" the VIs and use "in place element" structures if possible (and of course for loops with auto-indexing/deindexing). In your example there would be no large data copies at all: "Calc DZPV" (modified so data in passes through) then "Cal S and wa" (modified so data in passes through) then "in place element" structure to index the data, and inside the structure anotheer "in place element" structure to adress the cluster elements you want to change. If the subVIs can be inlined theres no data copy of the whole data in array. Maybe you don't even have to inline the subVIs because the optimizer can optimize away the data copies when passing data to the subVIs, I have no knowledge about these stuff.
  11. If you are not a programmer, then I would not jump into OOP. I'm not a real programmer myself either, but did programming for years, did some medium complex data aquisition and processing applications but never dared to try OOP. Anyways, I don't know "how big of a data package to carry on the shift register on every iteration is acceptable", I think you are okay with shift registers, but you have to be careful about the amount whatever way you do it. For example save new data to a file (append) regularly and throw away what you saved (or down sample, or whatever you need). For copying data a lot, I'm not sure, the code looks rather messy. I don't know the full picture, but based on the snippet you posted, maybe you should separate raw data from calculated data (because raw data is not modified by your snippet, only read). You could also try to "streamline" your VIs. I don't know the proper term, when the data on the input terminal comes out unaffected on the output terminal (like a reference). This will ruin parallelization of the calculations but can save a few copies (if the VIs can be inlined).
  12. Hi all, Are you aware of any Labveiw module (non 3rd party) that is affeced by the Log4j issue? Web services, or other? Out head IT is in panic, we don't have much time to collect the softwares that may be affected, sorry for not looking up it myself. Thanks in advance!
  13. Another idea is to combine regular graphs with pictures via the plotimages property of the graph. So the lines are graps and the dots are pictures.
  14. Graphs + plotimages of graphs also has pretty good contomization potential. Horizontal fill: A failed project with some flat controls, all my design, though I don't quite like it, I'm not good at visual design. Note, that it's meant to be a tablet application, but it has no exit button The room is a 2D picture and slots can be selected by clicking.
  15. I use splitters all the time, but making a tab control responsive, I failed miserably with that. Positioning and grouping of widgets on one page screws widgets on another one... Especially if there are graphs which are clumps of widgets by themselves. A test sequence editor (this has no problems with responsivity) which has a ribbon bar and some other splitters. The comment of some selected sectios are being edited at the moment (double click on the time line invokes a positioned text control)
  16. Yes, I was thinking about something like those! I'm thinking about what I could share, but most of my GUIs fail or may be confidential to show.
  17. That's true but by good looking I don't only mean the actual looks of the widgets (for example the silver theme looks good enough for me. Or there are some 1px border cluster hacks that someone already did so you don't have to do it yourself and greatly improves the look), but the way the widgets are arranged, grouped, or hidden. Even for an industrial HMI, most of the time you just need to load some test sequence, some parameters from a file that (hopefully) doesn't change without documentation, and some status of the test. Yet, in many occasions, every crap is on screen. I guess the reason is that during development it's good to see everything at one place, but in a shipped product? It's not so great effort to arrange stuff into tabs. One major obsatcle for better GUI design is in Labview itself, the lack of proper widget anchoring. You either have to make ugly hacks on the front panel (that may just fail for whatever reason) or implement every positioning in code. That's a huge issue.
  18. I have a better suggestion. Place a full-window Stop button behind all other GUI elements, so whenever the manager accidentally clicks off an element by mistake: sadness.
  19. The context is Labview. I haven't seen much (any?) good looking Labview GUI examples. I know Labview means industrial HMI most of the times, but it's also good for some other related things too. But this is just a Lounge topic, I'm not gathering resources in general, I believe my GUIs are more on the good side of the UX scale. Maybe I should tweak the topic a bit, and ask: Do you guys also see that Labview GUIs in general tend to be quite ugly? Cluttered, full with unimportant info, not responsive (window resize, pane resize) even if seemingly made for desktop? And full of not user friendly solutions (like no Cancel, choosing save paths before starting a test and perhaps always defaulting to some folder, punishing user for its mistakes, no saving of GUI values, etc.). Or can you share some better designs (your own or what you found over the web). Google doesn't have so nice hits. I'll try industrial HMI in general, maybe it'll have better results. but I', also curious about other usages of Labview, like data visualization or whatever. If there is a tendency that LV GUIs suck, what could be the reason? Just for fun.
  20. I usually keep the stop button (and name it "exit" because that makes sense...). Only because of mere laziness. But I don't really see it as a biggie... If that's the managers biggest issue, then make him that stop button and everyone wins. I don't have many clients (they are my co-workers..), one of them interestingly claims that the GUI is too structured and wants to see all crap at the same time. Because 24" ultraHD can handle it. Um... no. Interesting how badly designed production line application GUIs can be. So few engineers have sense for design...
  21. Hi all! Do you know/have some nice GUI designs or examples? In google search, awesome or clean equals cluttered. I guess tab control means unawesomeness... I'd love to see nice stuff. L.
  22. Hi all! I have a strange bug/feature with Front Panel - Get image. The image has a false color. I haven't tested with other colors, I hope there's some easy answer, or it is a known bug, so I stop searching and heavy debugging and go with the alt+printscreen emulation method instead of get image. The false color is on the graph > plotimages.back and seemilnly it's only the orange that turns into pink. (Don't mind the other small differences betwen the images) The pictures are generated in sequence without any delays, maybe the front panel is not fully updated before the capture? Which would mean some things are updated asynchronomously, which I didn't explicitly do. I certainly see the front panel flashing in the right colors. Thanks for any hints!
  23. In case summing array elements then dividing with the array size, there can be overflow error if the array size is big (or whatever size). Maybe lvanlys uses the cumulative average method or whatever it's called. In short, don't use that "dumb" mean algorithm.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.