Publication 1766-RM001A-EN-P - October 2008
190 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…32,767 (word)
• -2,147,483,648…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 92.
Parameter
Data Files
Function Files
(1)
CS - Comms
IOS - I/O
DLS - Data Log
Address
Mode
(2)
Address Level
O
I
S
B
T, C, R
N
F
ST
L
MG, PD
RI/RIX
PLS
RTC
HSC
(3)
PTOX, PWMX
STI
EII
BHI
MMI
LCD
Immediate
Direct
Indirect
Bit
Word
Long Word
Element
Source A ••••••• ••• ••••••••••• • •••
Source B ••••••• ••• • •••••••••
• • •••
(1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA 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, MG, PD, RTC, HSC, PTOX,
PWMX, STI, EII, BHI, MMI, CS, IOS, and DLS files.
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive