WHILE <BOOL expression> DO
<statements>
END_WHILE ;
The statements between "DO" and "END_WHILE" are executed while the Boolean expression is TRUE. The condition is evaluated beforethe statements are executed. If the condition is FALSE when WHILE is first reached, statements are never executed.
Loop instructions can 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.
iPos := 0;
WHILE iPos < iMax DO
MyArray[iPos] := 0;
iNbCleared := iNbCleared + 1;
END_WHILE;
Not available
Not available
Not available
See also
|
Copyright © 2015 Kollmorgen™ |
|