LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case structure

Hi I am currently trying to create a program that has an enum that changes the vi action in the fromt panel. I used a case structure to execute this but all my vi in the enum executes all at once. How do I construct such that I can switch between my enum to run only one vi at a time in my fromt panel using this case structure. Thank you 

0 Kudos
Message 1 of 4
(1,857 Views)

Could you post your VI?

 

IF i understand your problem correctly then you could just use a state machine. A while loop that executes your enum choice and then goes to idle state at the end (you'd probably need to add an idle state to your enum too).

0 Kudos
Message 2 of 4
(1,853 Views)

You're going to need to supply more information in order to get a definitive answer. The simple answer is that you put the code that you want to run for each case of the enum into the case structure (wire the enum up to the case selector). Posting your code (or a simplified version of your code) would be helpful. 

0 Kudos
Message 3 of 4
(1,814 Views)

@Obed41 wrote:

How do I construct such that I can switch between my enum to run only one vi at a time in my fromt panel using this case structure. Thank you 


We'd need more info, but this sounds like you could use an event structure.

Enum Value Change.png

 

Your Enum should probably be a type def...

0 Kudos
Message 4 of 4
(1,703 Views)