07-03-2005 11:36 AM
07-03-2005 12:07 PM
Create a case structure and wire the enum into its selector terminal.
That's it, now you can use the enum values as different cases. If you right click and add a case, you will get another one of the values. Simply place a loop around the case and place each subVI into the appropriate frame.
07-03-2005 07:17 PM
07-03-2005 09:32 PM
07-04-2005 12:36 AM
07-04-2005 02:30 AM
07-04-2005 02:43 AM
07-04-2005 03:57 AM
Look at this:

The shift register keeps the value from the last iteration. In each iteration the value of the enum is compared to the last value, and when it changes, the True case executes. The same can be done by using the small OpenG VI shown here (along with its code). Because that VI was made reentrant, you can place it on any wire you like and it will tell you if the value of the wire changed since the last time it was read.
As a suggestion, you may wish to avoid using the green edge for the case structure. That is usually used for error handling and can be confusing.
07-04-2005 04:40 AM
"As a suggestion, you may wish to avoid using the green edge for the case structure. That is usually used for error handling and can be confusing."
But the green edge is a case. I cannot delete the case. The program will mess up.
With this LV, can I choose which sub VI to run. I want to execute only "UP" for example and none of the others. Can that be done?
07-04-2005 04:51 AM
I didn't say delete the case. I said you may not want to use a green edge for the case because, because that's usually used for error handling and can be confusing. The green edge appears if you wire an error cluster into the selector. You can change it by using the paint tool on the edge.
Didn't you test it?
In your VI, if you choose a value for the enum, only one of the subVIs will execute (and the VI will stop).
In my VI, every time you change the value of the enum , the appropriate subVI will be run (just once, or in your case, just 100 times). The only difference between our VIs is that mine runs constantly. That's the while loop we talked about.
So the answer to your question is yes, it can be done, and you seem to already know how to do it.