Publication 1763-RM001C-EN-P - October 2009
184
Compare Instructions
LIM - Limit Test
Instruction Type: input
The LIM instruction is used to test for values within or outside of a
specified range. The LIM instruction is evaluated based on the Low Limit,
Test, and High Limit values as shown in the following table.
The Low Limit, Test, and High Limit values can be word addresses or
constants, restricted to the following combinations:
•
If the Test parameter is a constant, both the Low Limit and High
Limit parameters must be word or long word addresses.
•
If the Test parameter is a word or long word address, the Low Limit
and High Limit parameters can be either a constant, a word, or a
long word address. But the Low Limit and High Limit parameters
cannot both be constants.
When mixed-sized parameters are used, all parameters are put into the
format of the largest parameter. For instance, if a word and a long word
are used, the word is converted to a long word.
The data ranges are:
•
-32,768 to 32,767 (word)
•
-2,147,483,648 to 2,147,483,647 (long word)
Addressing Modes and File Types can be used as shown in the following
table:
LIM
Limit Test
Low Lim
N7:0
0<
Test
0
0<
High Lim
N7:1
0<
LIM
Execution Time for the LIM Instructions
Controller
Data Size
When Rung Is:
True
False
MicroLogix 1100
word
38.96
μ
s
0.87
μ
s
long word
38.96
μ
s
0.87
μ
s
LIM Instruction Operation Based on Low Limit, Test, and High Limit Values
When:
And:
Rung State
Low Limit
≤
High Limit
Low Limit
≤
Test
≤
High Limit
true
Low Limit
≤
High Limit
Test < Low Limit or Test > High Limit
false
High Limit < Low Limit
High Limit <
Test
<
Low Limit
false
High Limit < Low Limit
Test
≥
High Limit or Test
≤
Low Limit
true
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive