Overview of Structured Text Programming 
 
658  Rockwell Automation Publication MOTION-RM002H-EN-P-February 2018 
 
Use the REPEAT_UNTIL loop to keep doing something until conditions are 
true. 
Operands 
REPEAT 
<statement>; 
Structured Text 
Operand  Type  Format  Enter 
bool_ 
expression 
BOOL  Tag expression  BOOL tag or expression that evaluates to a BOOL value 
(BOOL expression) 
 
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 REPEAT_UNTIL loop executes and how an 
EXIT statement leaves the loop early.