REPEAT UNTIL END_REPEAT
Statement - Repeat a list of statements.
Syntax
REPEAT
<statements>
UNTIL <BOOL expression> END_REPEAT;
Remarks
The statements between REPEAT and UNTIL are executed until the boolean expression is TRUE. The condition is evaluated after the statements are executed. Statements are executed at least once.
|
Loop instructions may lead to infinite loops that block the target cycle. Never test the state of an input in the condition as the input will not be refreshed before the next cycle. |
ST Language
iPos := 0;
REPEAT
MyArray[iPos] := 0;
iNbCleared := iNbCleared + 1;
iPos := iPos + 1;
UNTIL iPos = iMax END_REPEAT;
FBD Language
Not available.
LD Language
Not available.
REPEAT UNTIL END_REPEAT |
IEC 61131-3 Automation platform > Programming - Reference guide > Basic Operations > REPEAT UNTIL END_REPEAT |
Created with the Personal Edition of HelpNDoc: Easily share your documentation with the world through a beautiful website