Automationdirect.com DirectLOGIC DL205 Series User Manual page 301

Table of Contents

Advertisement

Chapter 5: Standard RLL Instructions - Logical
Compare Double (CMPD)
1
The Compare Double instruction is a 32–bit instruction that
230
compares the value in the accumulator with the value (Aaaa),
240
which is either two consecutive V-memory locations or an 8–digit
2
250-1
(max.) constant. The corresponding status flag will be turned on
260
indicating the result of the comparison.
3
Operand Data Type
DS
Used
4
HPP Used
V-memory
5
Pointer
Constant
6
Discrete Bit Flags
SP60
7
SP61
SP62
8
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
9
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
10
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
11
instruction, SP60 will turn on, energizing contact C30.
12
13
14
A
B
C
D
5–84
DL205 User Manual, 4th Edition, Rev. B
A
V
P
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.
DirectSOFT
X1
LDD
V2000
Load the value in V2000 and
V2001 into the accumulator
CMPD
V2010
Compare the value in the
accumulator with the value
in V2010 and V2011
SP60
OUT
Handheld Programmer Keystrokes
$
B
ENT
STR
1
L
D
D
SHFT
ANDST
3
3
C
M
P
SHFT
SHFT
2
ORST
CV
$
SP
G
SHFT
STR
STRN
6
GX
C
D
SHFT
OUT
2
3
DL230 Range DL240 Range DL250-1 Range DL260 Range
aaa
aaa
All
All
See memory map
See memory map
All V-memory.
-
See memory map
0-FFFFFFFF
0-FFFFFFFF
V2001
4
4
5
Acc.
6
7
V2011
C30
C
A
A
A
ENT
2
0
0
0
D
C
A
B
3
2
0
A
ENT
0
A
ENT
0
CMPD
aaa
All
See memory map
All V-memory.
See memory map
0-FFFFFFFF
Description
V2000
5
2
6
7
2
9
9
?
2
6
7
7
7
2
9
9
Compared
with
3
9
5
0
2
6
V2010
A
ENT
1
0
A aaa
aaa
All
See memory map
All V-memory.
See memory map
0-FFFFFFFF

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?

Table of Contents

Save PDF