While Loop

FlexRIO Help

Edition Date: November 2015

Part Number: 372614J-01

»View Product Info

»Download the Help in ZIP Format

Owning Palette: Structures

Requires: Base Development System

Repeats the code within its subdiagram until a specific condition occurs. A While Loop always executes at least one time.

Components of a While Loop

Subdiagram—Contains code that the While Loop executes once per iteration.
Iteration Terminal (i)—Provides the current loop iteration count. The loop count always starts at zero for the first iteration. If the iteration count exceeds 2,147,483,647, or 231-1, the iteration terminal remains at 2,147,483,647 for all further iterations. If you need to keep count of more than 2,147,483,647 iterations, you can use shift registers with a greater integer range.
Conditional Terminal—Evaluates a Boolean input value to determine whether to continue executing the While Loop. To specify whether the loop stops for a TRUE or FALSE Boolean value, configure the continuation behavior of the loop. You also can determine when the loop stops by wiring an error cluster to the conditional terminal.
Tip  To create a While Loop that automatically wires a stop button to the conditional terminal, add the While Loop from the Execution Control palette.

Configuring a While Loop

Troubleshooting a While Loop

WAS THIS ARTICLE HELPFUL?

Not Helpful