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 675CASE...OFUse CASE to select what to do based on a numerical value.Operands:Structured TextCASE numeric_expression OFselector1: statement;selectorN: statement;ELSEstatement;END_CASE;Operand Type Format Enternumeric_ SINT tag tag or expression that evaluates to anumber (numeric expression)expression INT expressionselectorDINTREALSINTimmediatesame type as numeric_expressionINTDINTREALIMPORTANTIf you use REAL values, use a range of values for a selectorbecause a REAL value is more likely to be within a range ofvalues than an exact match of one, specific value.Description:The syntax is:specify as manyalternative selectorvalues (paths) as youneedCASE numeric_expression OFselector1 : ;...selector2 :selector3 :;...;...statements to execute whennumeric_expression = selector1statements to execute whennumeric_expression = selector2statements to execute whennumeric_expression = selector3Publication 1756-RM003I-EN-P - January 2007

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

Saved successfully!

Ooh no, something went wrong!