Allen-Bradley Logix5000 Reference Manual page 248

1756 controllogix, 1768 compactlogix, 1769 compactlogix, 1789 softlogix, 1794 flexlogix, powerflex 700s with drivelogix
Hide thumbs Also See for Logix5000:
Table of Contents

Advertisement

Chapter 5
Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ)
Description:
The instruction is true if the test value is equal to or between the low and high limit
−1
−(n+1)
n = Maximum Value
Arithmetic Status Flags:
Fault Conditions:
248
The LIM instruction tests whether the Test value is within the range of the Low
Limit to the High Limit.
If Low Limit
≤ High Limit
≥ High Limit
Signed integers 'roll over' from the maximum positive number to the maximum
negative number when the most significant bit is set. For example, in 16-bit
integers (INT type), the maximum positive integer is 32,767, which is
represented in hexadecimal as 16#7FFF (bits 0 ...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 from this point
on until all 16 bits are set ends up at 16#FFFF, which is equal to -1 decimal.
This can be shown as a circular number line (see the following diagrams). The
LIM instruction starts at the Low Limit and increments clockwise until it reaches
the High Limit. Any Test value in the clockwise range from the Low Limit to the
High Limit sets the rung-condition-out to true. Any Test value in the clockwise
range from the High Limit to the Low Limit sets the rung-condition-out to false.
Low Limit ≤ High Limit
0
+1
Low Limit
High Limit
+n
Not affected
None
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
And Test Value Is
Equal to or between limits
Not equal to or outside limits
Equal to or outside limits
Not equal to or inside limits
The instruction is true if the test value is equal to or outside the low and
−1
−(n+1)
n = Maximum Value
The Rung-condition-out Is
True
False
True
False
Low Limit
High Limit
high limit
0
+1
High Limit
Low Limit
+n

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents