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.

234 Compare <strong>Instructions</strong> (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ)Signed integers “roll over” from the maximum positive number to themaximum negative number when the most significant bit is set. Forexample, in 16-bit integers (INT type), the maximum positive integeris 32,767, which is represented in hexadecimal as 16#7FFF(bits 0 through 14 are all set). If you increment that number by one,the result is 16#8000 (bit 15 is set). For signed integers,hexadecimal 16#8000 is equal to -32,768 decimal. Incrementing fromthis point on until all 16 bits are set ends up at 16#FFFF, which isequal to -1 decimal.Low Limit ≤ High LimitThis can be shown as a circular number line (see the followingdiagrams). The LIM instruction starts at the Low Limit and incrementsclockwise until it reaches the High Limit. Any Test value in theclockwise range from the Low Limit to the High Limit sets therung-condition-out to true. Any Test value in the clockwise range fromthe High Limit to the Low Limit sets the rung-condition-out to false.Low Limit ≥ High LimitThe instruction is true if the test value is equal to or between the low and high limitThe instruction is true if the test value is equal to or outside the low andhigh limit−10+1−10+1low limithigh limithigh limitlow limit−(n+1) +nn = maximum value−(n+1) +nn = maximum valueArithmetic Status Flags:Fault Conditions:not affectednonePublication 1756-RM003I-EN-P - January 2007

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

Saved successfully!

Ooh no, something went wrong!