Rockwell-automation Logix5000 Controllers Structured Text Programming Manual de usuario Pagina 34

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 40
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 33
34 Publication 1756-PM007D-EN-P - November 2012
Chapter 1 Program Structured Text
REPEAT…UNTIL
Use the REPEAT…UNTIL loop to keep doing something until conditions
are true.
Operands:
Structured Text
Description: The syntax is:
Operand Type Format Enter
bool_
expression
BOOL Tag
Expression
BOOL tag or expression that evaluates to
a BOOL value (BOOL expression)
REPEAT
<statement>;
UNTIL bool_expression
END_REPEAT;
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.
REPEAT
<statement>;
Statements to execute while
bool_expression1 is false
Optional
IF bool_expression2 THEN
EXIT;
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.
END_IF;
UNTIL bool_expression1
END_REPEAT;
Vista de pagina 33
1 2 ... 29 30 31 32 33 34 35 36 37 38 39 40

Comentarios a estos manuales

Sin comentarios