Overview of Structured Text Programming
656 Rockwell Automation Publication MOTION-RM002H-EN-P-February 2018
Structured Text
Operand Type Format Description
bool_expression BOOL tag
expression
BOOL tag or expression that
evaluates to a BOOL value
Important:
Make sure that you do not iterate within the loop too many times in a single scan.
The controller does not execute any other statements in the routine until it completes the loop.
If the time that it takes to complete the loop is greater than the watchdog timer for the task, a
major fault occurs.
Consider using a different construct, such as IF_THEN.
Description
The syntax is:
The following diagrams show how a WHILE_DO loop executes and how an
EXIT statement leaves the loop early.
While the bool_expression is true, the controller
executes only the statements within the WHILE_DO loop.
To stop the loop before the conditions are true, use an EXIT statement.
Affects Math Status Flags
No