Automationdirect.com DirectLOGIC DL205 Series User Manual page 321

Table of Contents

Advertisement

Chapter 5: Standard RLL Instructions - Math
Subtract Binary Double (SUBBD)
1
Subtract Binary Double is a 32-bit instruction that subtracts
230
the binary value (Aaaa), which is either two consecutive
240
V-memory locations or an 8-digit (max.) binary constant,
2
250-1
from the binary value in the accumulator. The result resides in
the accumulator.
260
3
DS
Used
4
HPP Used
V-memory
Pointer
Constant
5
Discrete Bit Flags
6
SP63
SP64
SP65
7
SP70
NOTE: Status flags are valid only until another instruction uses the same flag.
8
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into
9
the accumulator using the Load Double instruction. The binary value in V1420 and V1421 is
subtracted from the binary value in the accumulator using the Subtract Binary Double
instruction. The value in the accumulator is copied to V1500 and V1501 using the Out
10
Double instruction.
11
12
13
14
A
B
C
D
5–104
DL205 User Manual, 4th Edition, Rev. B
Operand Data Type
A
V
P
K
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.
Use either
DirectSOFT
V-memory
X1
LDD
V1400
Load the value in V1400
and V1401 into the
accumulator
SUBBD
V1420
The binary value in V1420 and
V1421 is subtracted from the
binary value in the accumulator
OUTD
V1500
Copy the value in the
accumulator to V1500
and V1501
Handheld Programmer Keystrokes
STR
1
SHFT
L
D
SHFT
S
SHFT
1
4
2
OUT
SHFT
D
DL260 Range
aaa
All (See page 3 - 56)
All V mem (See page 3 - 56)
0-FFFFFFFF
Description
OR
Constant
L DD
K393471
0
BIN
0
-
0
Acc.
0
0
ENT
D
1
4
U
B
B
D
ENT
0
1
5
0
SUBBD
A aaa
V1401
V1400
0
0
6
0
0
F
F
(Accumulator)
0
0
6
0
0
F
F
0
0
0
1
A
0
1
(V1421 and V1420)
0
0
5
E
6
F
E
0
0
5
E
6
F
E
V1501
V1500
0
0
ENT
0
ENT

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