Showing results for 
Search instead for 
Did you mean: 

Choosing between two loops to execute

For example, let's say I created a VI with two there a function or way to allow only 1 of the loops to operate if a certain criteria is met?


So let's say if the number is greater than 10, loop 1 will execute but if the number is less than 10, loop 2 will execute.


I was thinking of something like a "if, else" kind of statement but I can't seem to find anything similiar to that in LabVIEW.


I didn't attach my VI because I haven't been able to figure out what functions to use yet. Any help would be greatly appreciated.

0 Kudos
Message 1 of 5

This sounds like you need to use a case structure as in the picture below.


Run one case or the other.





Message Edited by Robert Cole on 06-24-2009 04:45 PM
0 Kudos
Message 2 of 5

Another way.



Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 3 of 5

I think you are approaching this from the wrong end.


Why not use a single loop containing a case structure with the two code alternatives? That would make much more sense. 😄

LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 4 of 5

If the requirement is to run both loops simultanously use two case structures with in a loop


otherwise you could use them in two different states with a statemachine architecture 




0 Kudos
Message 5 of 5