Publication 1766-RM001A-EN-P - October 2008
194
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.
Mask
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Compare
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
(1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit.
(2) See Important note about indirect addressing.
MEQ Instruction Valid Addressing Modes and File Types
For definitions of the terms used in this table see Using the Instruction Descriptions on page 92.
Parameter
Data Files
Function Files
(1)
CS - Com
m
s
IOS
-
I/O
DL
S -
D
a
ta
L
o
g
Address
Mode
(2)
Address Level
O
I
S
B
T,
C
, R
N
F
ST
L
MG, PD
RI/RIX
PLS
RTC
HSC
PTOX, PW
MX
STI
EII
BH
I
MMI
LCD
Immedia
te
Dir
e
c
t
Indir
e
ct
Bit
Wo
rd
Long W
o
rd
Ele
m
ent
IMPORTANT
You cannot use indirect addressing with: S, MG, PD, RTC, HSC, PTOX,
PWMX, STI, EII, BHI, MMI, CS, IOS, and DLS files.
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 1400
word
7.0970 µs
0.2086 µs
long word
7.3803 µs
0.2009 µ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