LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

While Loop properties

Does while loops first check the condition before executing a loop, or is this different from Stop if True and Stop if False loops?
Other then the condition of the while loops stopping mechanisms, do they have any difference in execution behavior/logic?
In the case of �Stop if false�, does the loop execute the code once more before it quits?

Someoneconfusedwithloops
0 Kudos
Message 1 of 2
(2,647 Views)
A while loop always executes at least once. You can examine the properties yourself. Create a while loop and wire a false constant to the conditional terminal and make sure it's set to Stop if False. Now put a wait (ms) inside the loop and set it for some measureable delay. Run the VI. You'll notice that the wait is run before the while loop stops. The stop condition is evaluated after whatever code is inside is executed.
Message 2 of 2
(2,647 Views)