While / End While

The Insert | Flow Control Command | Control Pairs | While / End While menu option allows you to add a conditional loop to the measurement routine. The items between the WHILE and the END WHILE command will continue to execute in a loop until the condition (or expression ) keeping the loop activated is no longer met, meaning the expression for the while loop evaluates to FALSE (i.e. zero). The WHILE command can be added anywhere in the measurement routine. The expression is tested at the start of each loop.

The Edit window command line for a WHILE / END WHILE statement reads:

WHILE/expression
END_WHILE/

To insert a While / End While option, follow these steps:

  1. Place the cursor in the desired location of the Edit window.

  2. Select While / End While from the menu bar. The While / End While statement will appear in the Edit window.

 

More:

Code Sample of While / End While