The While Loop contains a subdiagram that executes until the conditional terminal receives a particular Boolean value.
Complete the following steps to specify conditions for a While Loop.
Note If you do not specify a condition, the While Loop becomes an infinite loop. Changing the value of the control does not stop the infinite loop because the value is only read once, before the loop starts. To stop an infinite loop, you must abort the VI by clicking the Abort Execution button on the toolbar. |
Because the VI checks the conditional terminal at the end of each iteration, the While Loop always executes at least one time. The VI does not run if you do not wire the conditional terminal.
You can prevent code execution in the first iteration by placing a Case structure inside the loop.