Basic instructions
8.8 Program control operations
S7-1200 Programmable controller
322 System Manual, V4.2, 09/2016, A5E02486680-AK
Table 8- 161 REPEAT instruction
Statement;
;
UNTIL "condition"
The REPEAT statement executes a group of statements until a given condition is
TRUE.
You can nest REPEAT loops. The END_REPEAT statement always refers to the last
executed Repeat instruction.
Table 8- 162 Parameters
Optional. One or more statements that are executed until the condition is TRUE.
"condition" Required. One or more expressions of the two following ways: A numeric expression or string
expression that evaluates to TRUE or FALSE. A "null" condition is interpreted as FALSE.
valuating the state of "condition", the REPEAT statement executes the statements
during the first iteration of the loop (even if "condition" is FALSE). To review the state of
"condition" before executing the statements, use the
WHILE statement (Page 321).
To end the loop regardless of the state of the "condition" expression, use the EXIT statement
(Page 324). The EXIT statement executes the statement immediately following the
END_REPEAT statement.
Use the CONTINUE statement (Page 323) to skip the subsequent statements of a REPEAT
loop and to continue the loop with the examination of whether the condition is met for
termination.