Repeat; Structured Text - Allen-Bradley Logix5000 Reference Manual

1756 controllogix, 1768 compactlogix, 1769 compactlogix, 1789 softlogix, 1794 flexlogix, powerflex 700s with drivelogix
Hide thumbs Also See for Logix5000:
Table of Contents

Advertisement

REPEAT...UNTIL

REPEAT

<statement>;
UNTIL bool_expression
Description:
Optional
Use the REPEAT...UNTIL loop to keep doing something until conditions are
true.
Operands:

Structured Text

Operand
bool_
expression
IMPORTANT
The syntax is described in the table.
REPEAT
<statement>;
IF bool_expression2 THEN
EXIT;
END_IF;
UNTIL bool_expression1
END_REPEAT;
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Type
Format
BOOL
Tag
expression
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.
Structured Text Programming
Enter
BOOL tag or expression that evaluates to a
BOOL value (BOOL expression)
statements to execute while bool_expression1
is false
If there are conditions when you want to exit
the loop early, use other statements, such as an
IF...THEN construct, to condition an EXIT
statement.
Appendix C
693

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents