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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

672 Structured Text ProgrammingIF...THENUse IF…THEN to do something if or when specific conditions occur.Operands:Structured TextIF bool_expression THEN;END_IF;Operand Type Format Enterbool_expressionBOOLtagexpressionBOOL tag or expression that evaluates toa BOOL value (BOOL expression)Description:The syntax is:optionaloptionalIF bool_expression1 THEN;...ELSIF bool_expression2 THEN;...ELSE;...END_IF;statements to execute whenbool_expression1 is truestatements to execute whenbool_expression2 is truestatements to execute whenboth expressions are falseTo use ELSIF or ELSE, follow these guidelines:1. To select from several possible groups of statements, add one ormore ELSIF statements.• Each ELSIF represents an alternative path.• Specify as many ELSIF paths as you need.• The controller executes the first true IF or ELSIF and skips therest of the ELSIFs and the ELSE.2. To do something when all of the IF or ELSIF conditions are false,add an ELSE 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!