Publication 1763-RM001C-EN-P - October 2009
180
Compare Instructions
Using the Compare
Instructions
Most of the compare instructions use two parameters, Source A and
Source B (MEQ and LIM have an additional parameter and are described
later in this chapter). Both sources cannot be immediate values. The valid
data ranges for these instructions 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:
When at least one of the operands is a Floating Data Point value:
•
For EQU, GEQ, GRT, LEQ, and LES - If either Source is not a
number (NAN), then rung state changes to false.
•
For NEQ - If either Source is not a number (NAN), then rung state
remains true.
EQU, NEQ, GRT, LES, GEQ and LEQ Instructions
Valid Addressing Modes and File Types
For definitions of the terms used in this table see Using the Instruction Descriptions on page 82.
Parameter
Data Files
Function Files
(1)
C
S
-
Comms
IO
S - 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
, P
D
R
I/RIX
PL
S
RT
C
HS
C
(3
)
PT
O,
P
W
M
ST
I
EII
BH
I
MM
I
LC
D
Immediate
Dir
ect
In
di
re
c
t
Bi
t
Wo
rd
Lo
ng W
o
rd
Elemen
t
Source A
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Source B
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
(1) PTO and PWM files are only for use with MicroLogix 1100 BBB unit.
(2) See Important note about indirect addressing.
(3) Only use the High Speed Counter Accumulator (HSC.ACC) for Source A in GRT, LES, GEQ and LEQ instructions.
IMPORTANT
You cannot use indirect addressing with: S, ST, MG, PD,
RTC, HSC, PTO, PWM, STI, EII, BHI, MMI, CS, IOS, and
DLS files.
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive