08-08-2017 04:30 PM
How are you presenting those values to the user so they can choose one? Why not use a Menu Ring control?
08-08-2017 04:43 PM
The menu ring control is going to be in the main VI, this is merely a sub VI with corresponding value at a designated "spot" that can be recalled when actions in the main VI are taken.
The reason why I'm creating a sub VI for such simple code is due to it needing to be repeated 4 times.
08-08-2017 04:50 PM
@Caleb963 wrote:
The reason why I'm creating a sub VI for such simple code is due to it needing to be repeated 4 times.
Perfect. You might want to do a search for Functional Global Variable (FGV). It's basically a way to store a value in an uninitialized shift register that can then be recalled later in other locations.
08-08-2017 05:14 PM
A Labview global variable could also be a good solution here if it is a "write once, read many" situation. The problem with Labview globals happens when you are writing to them from many different locations and the value you expect to be in the global variable is sometimes not what you expect. Very difficult to debug in large applications.
08-08-2017 05:24 PM
I agree with aputman, if it is "write once read many" than a global variable is good solution. Global variables are useful, and this is a useful case for one.
mcduff