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.

Structured Text Programming 681WHILE…DOUse the WHILE…DO loop to keep doing something as long as certainconditions are true.Operands:Structured TextWHILE bool_expression DO;END_WHILE;Operand Type Format Enterbool_expressionBOOLtagexpressionBOOL tag or expression that evaluates toa BOOL valueIMPORTANTMake sure that you do not iterate within the loop too many times ina single scan.• The controller does not execute any other statements in theroutine until it completes the loop.• If the time that it takes to complete the loop is greater than thewatchdog timer for the task, a major fault occurs.• Consider using a different construct, such as IF...THEN.Description:The syntax is:optionalWHILE bool_expression1 DO;IF bool_expression2 THENEXIT;END_IF;END_WHILE;statements to execute whilebool_expression1 is trueIf 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!