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.
DirectSOFT32 Display
LD
V1400
X1
Load the value in V1400 into
the accumulator
LDD
V1420
Load the value in V1420 and
V1421 into the accumulator
OUTD
V1500
Copy the value in the
accumulator to V1500
and V1501
X X X
X X X X
X
Level 1
X X X
X X X X
X
Level 2
X X X
X X X X
X
Level 3
X X X
X X X X
X
Level 4
X X X
X X X X
X
Level 5
X X X
X X X X
X
Level 6
X X X
X X X X
X
Level 7
X X X
X X X X
X
Level 8
0
0 0
0 0
0 1
4
Level 1
X X X
X X X X
X
Level 2
X X X
X X X X
X
Level 3
X X X
X X X X
X
Level 4
X X X
X X X X
X
Level 5
X X X
X X X X
X
Level 6
X X X
X X X X
X
Level 7
X X X
X X X X
X
Level 8
DIVBS
Divide the binary value in
the accumulator by the
binary value in the first level
of the accumulator stack
Acc.
V1400
0
0
1
4
0
0
0
0
0
0
1
4
Acc.
V1420
C 3
5
0
0
0
0
0
C 3
5
0
V1421
0
0
0
0
Accumulator stack
after 1st LDD
Accumulator stack
after 2nd LDD
Acc. 0
0
0
0
0
9 C 4
0
0
0
0
0
9 C 4
V1500
V1501
The unused accumulator
bits are set to zero
0
0 0
0 0
0 0
0
Level 1
X X X
X X X X
X
Level 2
X X X
X X X X
X
Level 3
X X X
X X X X
X
Level 4
X X X
X X X X
X
Level 5
X X X
X X X X
X
Level 6
X X X
X X X X
X
Level 7
X X X
X X X X
X
Level 8
The remainder resides in the
first stack location
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
Direct
SOFT
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.