DL205 User Manual, 4th Edition, Rev. D
5-85
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Compare Formatted (CMPF)
The Compare Formatted compares the value in the
accumulator with a specified number of discrete locations
(1–32). The instruction requires a starting location (Aaaa)
and the number of bits (Kbbb) to be compared. The
corresponding status flag will be turned on indicating the
result of the comparison.
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on the Load Formatted instruction loads the binary
value (6) from C10–C13 into the accumulator. The CMPF instruction compares the value
in the accumulator to the value in Y20–Y23 (E hex). The corresponding discrete status flag
will be turned on indicating the result of the comparison. In this example, if the value in the
accumulator is less than the value specified in the Compare instruction, SP60 will turn on,
energizing C30.
CMPF A aaa
K bbb
230
240
250-1
260
K4C10
LocationConstant
C10
C11C12C13
OF FONONOFF
The unused accumulator
bits areset to zero
Y20Y21Y22Y23
OF FONONON
Compared
with
Acc.
0000 0 006
E
LDF
Comparethe valueinthe
accumulator withthe value
of thespecifieddiscrete
location (Y20--Y23)
Load theval ue of the
specifieddiscretelocations
(C10--C13) into the
accumulator
C10
K4
CMPF
X1
Y20
K4
SP60
C30
OUT
DirectSOFT
Operand Data Type DL250-1 Range DL260 Range
A aaa bbb aaa bbb
Inputs X 0–777 – 0–1777 –
Outputs Y 0–777 – 0–1777 –
Control Relays C 0–1777 – 0–3777 –
Stage bits S 0–1777 – 0–1777 –
Timer bits T 0–377 – 0–377 –
Counter bits CT 0–177 – 0–377 –
Special Relays SP 0-777 – 0–777 –
Global I/O GX/GY - – 0-3777 –
Constant K - 1–32 - 1–32
Discrete Bit Flags Description
SP60 On when the value in the accumulator is less than the first level value in the Accumulator Stack.
SP61 On when the value in the accumulator is equal to the first level value in the Accumulator Stack
SP62 On when the value in the accumulator is greater than the first level value in the Accumulator Stack.
DS Used
HPP Used