Standard
RLL
Instructions
5--59
Standard RLL Instructions
Accumulator Logic Instructions
DL105 PLC User Manual, 3rd Edition
CMPD
A aaa
The Compare Double instruction is a
32--bit instruction that compares the
value in the accumulator with the value
(Aaaa), which is either two consecutive
V--memory locations or an 8--digit (max.)
constant. The corresponding status flag
will be turned on indicating the result of
the comparison.
Operand Data Type
DL130 Range
A
aaa
V--memory
V
All (See page 4--29)
Constant
K
1--FFFFFFFF
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.
NOTE:
The status flags are only valid until another instruction that uses the same
flags is executed.
In the following example when X1 is on, the value in V2000 and V2001 will be loaded
into the accumulator using the Load Double instruction. The value in the
accumulator is compared with the value in V2010 and V2011 using the CMPD
instruction. 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.
Handheld Programmer Keystrokes
LDD
Compare the value in the
accumulator with the value
in V2010 and V2011
Load the value in V2000 and
V2001 into the accumulator
V2000
CMPD
X1
V2010
Compared
with
SP60
C30
V2010
Acc.
V2000
7 2 9 9
5 0 2 6
4 5 2 6
7 2 9 9
V2001
4 5 2 6
V2011
6 7 3 9
Direct
SOFT
STR
$
SHFT
ANDST
L
3
D
SHFT
2
C
ORST
M
CV
P
STR
$
SHFT
ENT
STRN
SP
6
G
0
A
OUT
GX
SHFT
2
C
3
D
0
A
ENT
3
D
3
D
1
B
ENT
ENT
2
C
0
A
0
A
ENT
2
C
0
A
0
A
0
A
1
B
SHFT
Compare Double
(CMPD)
Содержание DL105
Страница 2: ...DL105 PLC User Manual Manual Number D1 USER M...
Страница 308: ...1B DL105 Error Codes In This Appendix Error Code Table...
Страница 314: ...1C Instruction Execution Times In This Appendix Introduction Instruction Execution Times...
Страница 324: ...1D Special Relays In This Appendix DL105 PLC Special Relays...
Страница 327: ...1E PLC Memory In This Appendix DL105 PLC Memory...
Страница 329: ...1F European Union Directives CE In This Appendix European Union EU Directives Basic EMC Installation Guidelines...