LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get a while loop that wont execute at least once?

Solved!
Go to solution
I am very very new to LabVIEW and I am trying to use a while loop to control a device. At the moment I have a very simple setup of a slide wired to a comparison vi, when the slide is greater or equal to a set value the while loop stops. However, I am wondering if there is a way that the while loop will not run "at least once" in the case of when the slide is above the set value when the program starts. I will have a situation like this in a more complicated program so any help or suggestions would be appreciated. Thank you.
0 Kudos
Message 1 of 2
(2,274 Views)
Solution
Accepted by topic author Rach_77

One workaround is to drop your while loop inside of a case structure and perform your comparison before dropping into the while loop.

 

Another possibility may be to use a Conditional for loop where you have the possibility of wiring in zero to the iteration terminal based on a comparison.

Message 2 of 2
(2,271 Views)