Automationdirect.com DirectLOGIC DL205 Series User Manual page 302

Table of Contents

Advertisement

Compare Formatted (CMPF)
The Compare Formatted compares the value in the
230
accumulator with a specified number of discrete locations
240
(1–32). The instruction requires a starting location (Aaaa)
250-1
and the number of bits (Kbbb) to be compared. The
corresponding status flag will be turned on indicating the
260
result of the comparison.
DS
Used
Operand Data Type
HPP Used
Inputs
Outputs
Control Relays
Stage bits
Timer bits
Counter bits
Special Relays
Global I/O
Constant
Discrete Bit Flags
SP60
SP61
SP62
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.
DirectSOFT
X1
LDF
CMPF
SP60
A
X
Y
C
S
T
CT
SP
GX/GY
K
On when the value in the accumulator is less than the instruction value.
On when the value in the accumulator is equal to the instruction value.
On when the value in the accumulator is greater than the instruction value.
Load the value of the
C10
specified discrete locations
K4
(C10- - C13) into the
accumulator
Compare the value in the
Y20
accumulator with the value
K4
of the specified discrete
location (Y20- - Y23)
C30
OUT
Chapter 5: Standard RLL Instructions - Logical
DL250-1 Range
aaa
bbb
0–777
0–777
0–1777
0–1777
0–377
0–177
0-777
-
-
1–32
Description
The unused accumulator
bits are set to zero
Acc.
Y23
Y22
Y21
Y20
ON
ON
ON
OFF
DL205 User Manual, 4th Edition, Rev. B
CMPF
A aaa
K bbb
DL260 Range
aaa
bbb
0–1777
0–1777
0–3777
0–1777
0–377
0–377
0–777
0-3777
-
1–32
Location
Constant
C13
C12
C10
K4
OFF
ON
0
0
0
0
0
0
0
6
Compared
with
E
1
2
3
4
5
6
7
8
9
10
11
12
13
14
C11
C10
ON
OFF
A
B
C
D
5–85

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF