Showing results for 
Search instead for 
Did you mean: 

Efficient way to modify control values?

Go to solution



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?




0 Kudos
Message 1 of 3
Accepted by topic author s durant

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.



Message 2 of 3

Thanks Felix.


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. 



0 Kudos
Message 3 of 3