Standard
RLL
Instructions
5–73
Standard RLL Instructions
Math Instructions
ADDB
A aaa
Add Binary is a 16 bit instruction that adds
the unsigned 2’s complement binary value
in the lower 16 bits of the accumulator with
an unsigned 2’s complement binary value
(Aaaa), which is either a V memory
location or a 16-bit constant. The result
can be up to 32 bits (unsigned 2’s
complement) and resides in the
accumulator.
Operand Data Type
DL05 Range
A
aaa
Vmemory
V
All (See p. 4–28)
Pointer
P
All V mem (See p. 4–28)
Constant
K
0–FFFF
Discrete Bit Flags
Description
SP63
On when the result of the instruction causes the value in the accumulator to be zero.
SP66
On when the 16 bit addition instruction results in a carry.
SP67
On when the 32 bit addition instruction results in a carry.
SP70
On anytime the value in the accumulator is negative.
SP73
On when a signed addition or subtraction results in a incorrect sign bit.
NOTE:
Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The binary value in the accumulator will be
added to the binary value in V1420 using the Add Binary instruction. The value in the
accumulator is copied to V1500 and V1501 using the Out instruction.
Direct
SOFT Display
Handheld Programmer Keystrokes
LD
V1400
X1
Load the value in V1400 into the
lower 16 bits of the accumulator
ADDB
V1420
The binary value in the
accumulator is added to the
binary value in V1420
OUTD
V1500
Copy the value in the lower
16 bits of the accumulator to
V1500 and V1501
V1500
(V1420)
+
1
1
(Accumulator)
0
0
1
0
V1400
A
0
5
C
C
9
0
0
0
A
0
5
2
C
4
Acc.
C
C
9
The unused accumulator
bits are set to zero
STR
$
SHFT
ENT
SHFT
ANDST
L
3
D
4
E
1
B
OUT
GX
0
A
0
A
0
A
1
B
ENT
3
D
3
D
1
B
4
E
2
C
0
A
1
B
ENT
SHFT
3
D
5
F
0
A
0
A
1
B
ENT
Add Binary
(ADDB)
Содержание DL05
Страница 1: ...DL05 User Manual Automationdirect com ...
Страница 2: ...DL05 User Manual Automationdirect com ...
Страница 436: ...1B DL05 Error Codes In This Appendix Ċ Error Code Table ...
Страница 443: ...1C Instruction Execution Times In This Appendix Ċ Introduction Ċ Instruction Execution Times ...
Страница 459: ...1D Special Relays In This Appendix Ċ DL05 PLC Special Relays ...
Страница 464: ...1E DL05 Product Weights In This Appendix Ċ Product Weight Table ...
Страница 466: ...1F European Union Directives CE In This Appendix Ċ European Union EU Directives Ċ Basic EMC Installation Guidelines ...