EasyManuals Logo

Allen-Bradley Logix5000 Reference Manual

Allen-Bradley Logix5000
708 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #248 background imageLoading...
Page #248 background image
248 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 5 Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ)
Description: The LIM instruction tests whether the Test value is within the range of the Low
Limit to the 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.
Arithmetic Status Flags: Not affected
Fault Conditions: None
If Low Limit And Test Value Is The Rung-condition-out Is
≤ High Limit Equal to or between limits True
Not equal to or outside limits False
≥ High Limit Equal to or outside limits True
Not equal to or inside limits False
−1
0
+1
Low Limit
High Limit
+n−(n+1)
n = Maximum Value
Low Limit ≤ High Limit
The instruction is true if the test value is equal to or between the low and high limit
Low Limit ≥ High Limit
The instruction is true if the test value is equal to or outside the low and
high limit
−1
0
+1
High Limit
Low Limit
+n−(n+1)
n = Maximum Value

Table of Contents

Other manuals for Allen-Bradley Logix5000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Allen-Bradley Logix5000 and is the answer not in the manual?

Allen-Bradley Logix5000 Specifications

General IconGeneral
BrandAllen-Bradley
ModelLogix5000
CategoryController
LanguageEnglish

Related product manuals