DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-99
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
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 Double instruction.
ADDB
A aaa
Handheld Programmer Keystrokes
LD
X1
+
1
1
(Accumulator)
0
0
1
0
A 0
5
C C 9
0
0
0
A 0
5
2 C 4
Acc.
C C 9
STR
X(IN)
1
D
V
1
4
0
0
OUT
V
1
5
0
0
V
1
4
0
A
2
SHFT
B
The unused accumulator
bits are set to zero
SHFT
D
ENT
SHFT
L
ENT
D
D
ENT
ENT
Load the value in V1400
into the lower 16 bits of
the accumulator
LD
BIN
ADDB
OUTD
V1500
K2565
Use either OR Constant
V-memory
V1420
V1400
(V1420)
V1500
V1400
The binary value in the
accumulator is added to the
binary value in V1420
Copy the value in the lower
16bits of the accumulator to
V1500 and V1501
Direct
SOFT
Operand Data Type
DL06 Range
A
aaa
V-memory
V
See memory map
Pointer
P
See memory map
Constant
K
0-FFFF, h=65636
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 an incorrect sign bit.
DS
Used
HPP Used
Add Binary (ADDB)
Add Binary is a 16-bit instruction that adds the binary value in
the lower 16 bits of the accumulator with a binary value (Aaaa),
which is either a V-memory location or a 16-bit constant. The
result can be up to 32 bits and resides in the accumulator.