Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

While Loops: Repeating Operations Until a Condition Occurs

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Similar to a Do Loop or a Repeat-Until Loop in text-based programming languages, a While Loop, shown as follows, executes a subdiagram until a condition occurs.

The While Loop executes the subdiagram until the conditional terminal, an input terminal, receives a specific Boolean value. The conditional terminal in a While Loop behaves the same as in a For Loop with a conditional terminal. However, the While Loop does not include a set iteration count and runs infinitely if the condition never occurs.

The iteration terminal, shown as follows, is an output terminal that contains the number of completed iterations.

The iteration count for the While Loop always starts at zero.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit