12.07.2015 Views

Logix5000 Controllers General Instructions - SLAC Confluence

Logix5000 Controllers General Instructions - SLAC Confluence

Logix5000 Controllers General Instructions - SLAC Confluence

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

684 Structured Text ProgrammingREPEAT…UNTILUse the REPEAT…UNTIL loop to keep doing something untilconditions are true.Operands:Structured TextREPEAT;UNTIL bool_expressionEND_REPEAT;Operand Type Format Enterbool_expressionBOOLtagexpressionBOOL tag or expression that evaluates toa BOOL value (BOOL expression)IMPORTANTMake 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 theloop.• If the time that it takes to complete the loop is greater than the watchdog timer for thetask, a major fault occurs.• Consider using a different construct, such as IF...THEN.Description:The syntax is:optionalREPEAT;IF bool_expression2 THENEXIT;END_IF;UNTIL bool_expression1END_REPEAT;statements to execute whilebool_expression1 is falseIf there are conditions when you want toexit the loop early, use other statements,such as an IF...THEN construct, tocondition an EXIT statement.Publication 1756-RM003I-EN-P - January 2007

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!