HeLo Posted July 19, 2007 Report Share Posted July 19, 2007 Hello LabVIEW-Cracks, I have to admit that even beeing an oldtimer, I never solved this problem: Doing quite a bit of calculation with LabVIEW, I enjoy using a lot of variables for intermediate results. However, when I then program an event structure, the list af variables showing up has become huge and completely clumsy to handle. It does not help to group the variables into clusters, because the clusters show up always expanded and I have to unexpand them manually every time. A similar problem is occuring in the use of local variables: When I want to select a different variable by right clicking the local variable, the variables are listed in the order they were created and not for example alphabetically - and annoyingly - I often really have to search for the targeted variable. Does anybody know a secret or nonsecret trick to this? By the way, one possibility I thought of is using global variables instead. I know about the rules about global variables, but if I use them very disciplined and strictly the same way as local ones, I don't see a disadvantage. Thank's for any suggestion Herbert Quote Link to comment
Neville D Posted July 19, 2007 Report Share Posted July 19, 2007 QUOTE(HeLo @ Jul 18 2007, 02:09 PM) A similar problem is occuring in the use of local variables: When I want to select a different variable by right clicking the local variable, the variables are listed in the order they were created and not for example alphabetically - and annoyingly - I often really have to search for the targeted variable.Does anybody know a secret or nonsecret trick to this? By the way, one possibility I thought of is using global variables instead. I know about the rules about global variables, but if I use them very disciplined and strictly the same way as local ones, I don't see a disadvantage. Thank's for any suggestion Herbert You can right-click on the variable whose local you want to make and "create local" from there.. no need to scroll through the list of variables. That said, note that a local variable involves making a copy of the data. If you have a bunch of arrays or complicated data structures, execution speed and memory efficiency will definitely be affected. Race conditions are another issue (for globals or locals). Neville. Quote Link to comment
Aristos Queue Posted July 19, 2007 Report Share Posted July 19, 2007 Try putting all of your calculations into a subVI. On the top level VI, only have the actual controls that make up your user interface. Then the temporaries that you're using for variables don't show up in the Event Structure dialog. Quote Link to comment
HeLo Posted July 19, 2007 Author Report Share Posted July 19, 2007 Thanks Neville and Aristos for your reply. Most probably my wrong user profile was misleading (wrong "using LabVIEW since"): At present, I have nested clusters with a about a hundred of company data that are very handy to access through bundle and unbundle by name. In addition, tabs allow to check the data without having to open a new window during development. So either checking the data becomes unhandy or programming events, as I see. I think, NI is aware of the problem because they implemented alphabetical ordering and selection through submenues at many places (for example to change the linking of references) - but they did not implement it in the event structure nor for changing the linking of local variables. Herbert Quote Link to comment
Ton Plomp Posted July 20, 2007 Report Share Posted July 20, 2007 The keyboard is your friend! Normally I just hit the first letter of the control I want to check! Works most of the time. Ton Quote Link to comment
HeLo Posted July 20, 2007 Author Report Share Posted July 20, 2007 QUOTE(tcplomp @ Jul 19 2007, 07:59 AM) The keyboard is your friend!Normally I just hit the first letter of the control I want to check! Works most of the time. Ton :worship: I can even hit twice and advance to the next control! Thanks!! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.