LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TWO VI'S

I have TWO vi's. VI no. 1 and VI no. 2. How does LV know which VI to execute? How do I write a program to choose between the two vi.s. I understand I must use ENUM. The LV is attached.
0 Kudos
Message 1 of 5
(2,353 Views)
I don't fully understand your questions.

LV knows which VIs to execute, because you placed them on the block diagram.  If they're on the diagram (without any overlying structures), they'll be executed.

If you want to be able to programatically choose which VI gets run, you place a "CASE" structure on the diagram and drop one VI into each of the "TRUE" and "FALSE" cases.  Then by wiring a boolean variable to the case, the executing VI will be chosen.

Have a look at the LV examples.  This is pretty basic stuff.

ENUMs are definitely not requred.

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 2 of 5
(2,349 Views)
Can you post some examples that uses the ENUM?
0 Kudos
Message 3 of 5
(2,346 Views)

Using an enum is the same as using the boolean.

Just place an enum control on the front panel, fill in some values and wire it to a case structure. The structure will change the selector values to the values of the enum.

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 4 of 5
(2,341 Views)
"Can you post some examples that uses the ENUM?".

No, I don't think I can.  I just wrote that Enums aren't required for this.  In fact Enums in themselves have nothing to do with your original question.

What examples are you looking for?  I need to know what you mean before I can give examples.....

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 5 of 5
(2,334 Views)