DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-113
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 Load instruction loads the value in V1400 into
the accumulator. The value in V1420 is loaded into the accumulator using the Load Double
instruction, pushing the value previously loaded in the accumulator onto the accumulator
stack. The BCD value in the accumulator is divided by the BCD value in the first level of the
accumulator stack using the Divide Stack instruction. The Out Double instruction copies the
value in the accumulator to V1500 and V1501.
DIVS
DirectSOFT32 Display
LD
V1400
X1 Load thevalue in V1400 into
theaccumulator
LDD
V1420
Load thevalue in V1420 and
V1421 into theaccumulator
OUTD
V1500
Copy thevalue in the
accumulatortoV1500
and V1501
X XXXXXXX
Level 1
X XXXXXXXLevel 2
X XXXXXXX
Level 3
X XXXXXXXLevel 4
X XXXXXXX
Level 5
X XXXXXXXLevel 6
X XXXXXXX
Level 7
X XXXXXXXLevel 8
0 0000020
Level 1
X XXXXXXXLevel 2
X XXXXXXX
Level 3
X XXXXXXXLevel 4
X XXXXXXX
Level 5
X XXXXXXXLevel 6
X XXXXXXX
Level 7
X XXXXXXXLevel 8
DIVS
Dividethe valueinthe
accumulatorbythe valuein
thefirst levelofthe
accumulatorstack
Acc.
V1400
0020
000 0002 0
Acc.
V1420
0000
005 0000 0
V1421
005 0
Accumulatorstack
after1st LDD
Accumulatorstack
after 2nd LDD
Acc.
000 2500 0
000 2500 0
V1500V1501
The unused accumulator
bits areset to e ro
00000000Level 1
XXXXXXXX
Level 2
XXXXXXXXLevel 3
XXXXXXXXLevel 4
XXXXXXXXLevel 5
XXXXXXXXLevel 6
XXXXXXXXLevel 7
XXXXXXXXLevel 8
Theremainder resides in the
firststack location
andheldrorammereystrokes
SFT
ADST
L
3
D
ST
SFT
8
I
AD
V
OUT
X
SFT
3
D
1
5
F
0
A
0
A
T
1
T
1
4
0
A
0
A
T
T
SFT
ADST
L
3
D
1
4
2
C
0
A
T
3
D
ST
S
3
D
Discrete Bit Flags Description
SP53 On when the value of the operand is larger than the accumulator can work with.
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On any time the value in the accumulator is negative.
SP75 On when a BCD instruction is executed and a NON-BCD number was encountered.
DS Used
HPP Used
DirectSOFT
Divide by Top of Stack (DIVS)
Divide Top of Stack is a 32-bit instruction that divides the
8-digit BCD value in the accumulator by a 4-digit BCD value
in the first level of the accumulator stack. The result resides in
the accumulator and the remainder resides in the first level of the
accumulator stack.