LabVIEW Basics - 09 | While Loops

While loops allow portions of an application to execute repeatedly until a certain condition is met.






  • To place a while loop select it from Functions Palette┬╗Structures then click and drag on the block diagram to draw a box.

  • The Condition Terminal is used to exit the loop when the specified condition is met.
    • The conditional terminal is tested at the end of each loop iteration. Therefor while loops always execute at least once.
    • By default a True value passed to the conditional terminal will terminate the loop.

  • The Iteration Terminal provides the current loop count starting with zero.

  • By default while loops execute as quickly as possible. Use the Wait (ms) or a similar primitive to control execution speed.

  • Multiple while loops will be distributed across multiple CPU cores automatically.

LabVIEW Basics

{{tag>tutorial labview_basics while loop condition terminal iteration}