12-16-2010 10:11 AM
So I have a VI set up with a mutiple option case structure to select which input a voltage is read from (there are 32 options). Now that I have it made, I realize that sometimes I may want to read from multiple inputs at once.. Is there an easy way to change my setup so that it executes multiple cases at a time? Right now my control is a slider to choose the case. What would be a good front panel control choice to be able to select multiple options? Thanks
Solved! Go to Solution.
12-16-2010 10:15 AM
There is no way to execute two cases at the same time. What you could do is combine the code from two cases into one.
12-16-2010 10:17 AM
No the case structure will only run a single case each time through the case structure.
You need to put the case structure inside a while loop to execute it more than once.
You need a STATE MACHINE
If the options are simple you could use a For loop and load an array with the cases you want to run.
12-16-2010 10:31 AM
You can build an array of your options and loop through the required cases. As mentioned, a case can only perform 1 case per loop.
A good front panel control would be a cluster or an array of booleans (e.g. a tick box per option), easy to loop through. 🙂
/Y
12-16-2010 10:58 AM
I'll give it a shot. Thanks for the suggestions!