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.
CMPF
A aaa
K bbb
ý
ý
þ
þ
230
240
2
5
0
-1
2
6
0
K4
C10
Location
Constant
C10
C11
C12
C13
OFF
ON
ON
OFF
The unused accumulator
bits are set to zero
Y20
Y21
Y22
Y23
OFF
ON
ON
ON
Compared
with
Acc. 0 0 0 0
0 0 0 6
E
LDF
Compare the value in the
accumulator with the value
of the specified discrete
location (Y20--Y23)
Load the value of the
specified discrete locations
(C10--C13) into the
accumulator
C10
K4
CMPF
X1
Y20
K4
SP60
C30
OUT
Direct
SOFT
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