Automationdirect.com DirectLOGIC DL205 Series User Manual page 309

Table of Contents

Advertisement

Chapter 5: Standard RLL Instructions - Math
Subtract Double (SUBD)
1
Subtract Double is a 32-bit instruction that subtracts the
230
BCD value (Aaaa), which is either two consecutive V-memory
240
locations or an 8-digit (max.) constant, from the BCD value
2
250-1
in the accumulator. The result resides in the accumulator.
260
3
Operand Data Type
4
V-memory
Pointer
5
Constant
6
Discrete Bit Flags
SP63
7
SP64
SP65
SP70
8
SP75
9
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
10
the accumulator using the Load Double instruction. The value in V2006 and V2007 is
subtracted from the value in the accumulator. The value in the accumulator is copied to
V2010 and V2011 using the Out Double instruction.
11
DS
Used
HPP Used
12
13
14
A
B
C
D
5–92
DL205 User Manual, 4th Edition, Rev. B
DL230 Range
A
aaa
V
All (See page 3 - 53)
P
-
K
0-99999999
On when the result of the instruction causes the value in the accumulator to be zero.
On when the 16 bit subtraction instruction results in a borrow.
On when the 32 bit subtraction instruction results in a borrow.
On anytime the value in the accumulator is negative.
On when a BCD instruction is executed and a NON-BCD number was encountered.
DirectSOFT
X1
LDD
V2000
Load the value in V2000 and
V2001 into the accumulator
SUBD
V2006
The value in V2006 and V2007
is subtracted from the value in
the accumulator
OUTD
V2010
Copy the value in the
accumulator to V2010 and
V2011
Handheld Programmer Keystrokes
$
B
ENT
STR
1
L
D
D
SHFT
ANDST
3
3
S
U
SHFT
SHFT
RST
ISG
GX
D
SHFT
OUT
3
DL240 Range
DL250-1 Range
aaa
All (See page 3 - 54)
All (See page 3 - 55)
All V-memory
All V-memory
(See page 3 - 54)
(See page 3 - 55)
0-99999999
Description
V2001
0
1
0
0 1
0
_
6
ACC.
0
0
3
0
0
3
V2011
C
A
A
A
2
0
0
B
D
C
A
1
3
2
C
A
B
A
ENT
2
0
1
0
SUBD
A aaa
DL260 Range
aaa
All (See page 3 - 56)
All V-memory
(See page 3 - 56)
0-99999999
0-99999999
V2000
6
3
2
7
4
6
3 2
7
4
7
2
3
7
5
9
0
8
9
9
9
0
8
9
9
V2010
ENT
0
A
G
ENT
0
0
6
aaa

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