DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-117
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 value in V1420 and V1421 is loaded into the accumulator
using the Load Double instruction also, pushing the value previously loaded in the accumulator
onto the accumulator stack. The binary value in the accumulator is divided by the binary value
in the first level of the accumulator stack using the Divide Binary Stack instruction. The value
in the accumulator is copied to V1500 and V1501 using the Out Double instruction.
Dir
Display
LD
V140
0
X1 Load thevalue in V1400 into
theaccumulator
LDD
V1420
Load thevalue in V1420 and
V1421 into theaccumulato
r
OUTD
V1500
Copy thevalue in the
accumulatortoV1500
and V1501
XXXXXXXXLevel 1
XXXXXXXX
Level 2
XXXXXXXXLevel 3
XXXXXXXX
Level 4
XXXXXXXXLevel 5
XXXXXXXX
Level 6
XXXXXXXXLevel 7
XXXXXXXXLevel 8
00000014Level 1
XXXXXXXX
Level 2
XXXXXXXXLevel 3
XXXXXXXX
Level 4
XXXXXXXXLevel 5
XXXXXXXX
Level 6
XXXXXXXXLevel 7
XXXXXXXX
Level
8
DIVBS
Dividethe binaryvalue in
theaccumulatorbythe
binar yvalue in thefirst level
of theaccumulatorstack
Acc.
0014
0000 0014
Acc.
V1420
C 350
0000C350
V1421
0000
after1st LDD
Accumulatorstack
after 2nd LDD
Acc.
000009C4
000009C4
V1500V1501
The unused accumulator
bits ar eset to zero
00000000
Level 1
XXXXXXXXLevel 2
XXXXXXXX
Level 3
XXXXXXXXLevel 4
XXXXXXXX
Level 5
XXXXXXXXLevel 6
XXXXXXXX
Level 7
XXXXXXXXLevel 8
Theremainder resides in the
firststack locatio
n
Handheld Programmer Keystrokes
SHFT
ANDST
L
3
D
STR
$
SHFT
3
D
8
I
AND
V
OUT
GX
SHFT
3
D
1
B
5
F
0
A
0
A
ENT
1
B
ENT
1
B
4
E
0
A
0
A
ENT
ENT
SHFT
ANDST
L
3
D
1
B
4
E
2
C
0
A
ENT
3
D
1
B
RST
S
DIVBS
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.
DS Used
HPP Used
DirectSOFT
Divide Binary by Top OF Stack (DIVBS)
Divide Binary Top of Stack is a 32-bit instruction that divides
the 32-bit binary value in the accumulator by the 16-bit binary
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.