DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-53
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Changing the Accumulator Data
Instructions that manipulate data also use the accumulator. The result of the manipulated
data resides in the accumulator. The data that was being manipulated is cleared from the
accumulator. The following example loads the constant value 4935 into the accumulator, shifts
the data right 4 bits, and outputs the result to V2010.
Some of the data manipulation instructions use 32 bits. They use two consecutive V-memory
locations or an 8 digit BCD constant to manipulate data in the accumulator.
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 added
with the value in V2006 and V2007 using the Add Double instruction. The value in the
accumulator is copied to V2010 and V2011 using the Out Double instruction.
LD
K4935
X1
Load the value 4935 into the
accumulator
Shift the data in the accumulator
4 bits (K4) to the right
Output the lower 16 bits of the ac-
cumulator to V2010
0 1 0 0 1 0 0 1 0 0 1 1 0 1 0 1
Constant
V2010
0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 1
0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Shifted out of
accumulator
0 4 9 3
4
9
3
5
SHFR
K4
OUT
V2010
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The upper 16 bits of the accumulator
will be set to 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
Acc.
6
7
3
9
5
0
2
6
LDD
V2000
X1
Load the value in V2000 and
V2001 into the accumulator
ADDD
V2006
Add the value in the
accumulator with the value
in V2006 and V2007
OUTD
V2010
Copy the value in the
accumulator to V2010 and
V2011
V2010
V2000
V2001
6
7
3
9
5
0
2
6
V2011
8
7
3
9
9
0
7
2
(Accumulator)
(V2006 & V2007)
2
0
0
0
4
0
4
6
+
8
7
3
9
9
0
7
2
Acc.