DL205 User Manual, 4th Edition, Rev. B
5–85
Chapter 5: Standard RLL Instructions - Logical
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.
K4C10
Location Constant
C10C11C12C13
OFFONONOFF
The unused accum ulator
bits are set to zer o
Y20Y21Y22Y23
OFFONONON
Compar ed
with
Acc.
0000 0006
E
LDF
Compar e the val ue in the
accum ulator w ith the value
of the speci fied discr ete
location (Y20--Y23)
Load the val ue of the
speci fied discrete locati ons
(C10--C13) into the
accum ulator
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 instruction value.
SP61 On when the value in the accumulator is equal to the instruction value.
SP62 On when the value in the accumulator is greater than the instruction value.
DS Used
HPP Used