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.

212 Compare <strong>Instructions</strong> (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ)Equal to (EQU) The EQU instruction tests whether Source A is equal to Source B.Operands:Relay LadderOperand Type Format DescriptionSource ASINTINTimmediatetagvalue to test againstSource BDINTREALstringSource BSINTINTimmediatetagvalue to test againstSource ADINTREALstring• If you enter a SINT or INT tag, the value converts to a DINTvalue by sign-extension.• REAL values are rarely absolutely equal. If you need todetermine the equality of two REAL values, use the LIMinstruction.• String data types are:– default STRING data type– any new string data type that you create• To test the characters of a string, enter a string tag for bothSource A and Source B.Structured TextIF sourceA = sourceB THEN;Use the equal sign “=” as an operator within an expression. Thisexpression evaluates whether sourceA is equal to sourceB.See Appendix for information on the syntax of expressions withinstructured text.Publication 1756-RM003I-EN-P - January 2007

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

Saved successfully!

Ooh no, something went wrong!