I have been using LabVIEW somewhat casually at work for the past couple of years, and have read at least a few times that there is usually a better way than using Local Variables.
In this case I have a setup file with ten different numeric controls for various power levels and frequencies. By choosing from a text ring I want to automatically fill in the "default" values for these numeric controls for each given value of the text ring.
The way I have this implemented now is I just have a case structure with multiple values. Based on the chosen value in the text ring I load ten constants into the ten local variable references.
Is there an easier/more efficient way to do this?
Solved! Go to Solution.
To me this seems to be 'the' valid approach.
References can offer more flexebility, but suffer from worse performance. Performance won't be an issue for 10 numerics, only if you have somwhat larger arrays (a typical graph with 100 points you can notice the performance loss).
Only a terminal is faster than the local (assuming that you need to display the value, otherwise of course just use a wire). Some exotic usage of Control Val Set invoke note has shown a very good perormance, but I think this is a bit over-coded for just initializing controls.
Your response is what I was looking for, it seems that any other method is not worth it for such a small problem. I do not have any experience with terminals or invoke nodes, so I am glad I can just do it this way in the meantime.