DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-101
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 V1420 is subtracted from the
binary value in the accumulator using the Subtract Binary instruction. The value in the
accumulator is copied to V1500 using the Out instruction.
S UBB
A aaa
Handheld Programmer Keystrokes
LD
V1400
X1
SUBB
V1420
The binary value in V1420 is
subtracted from the value in
the accumulator
OUT
V1500
Copy the value in the lower 16
bits of the accumulator to V1500
V1500
(V1420)
0
1
(Accumulator)
0
1
0
0
V1400
0 2 4
6 1 9
0 0 0
0 2 4
A 0 B
Acc.
6 1 9
The unused accumulator
bits are set to zero
STR
X(IN)
1
D
V
1
4
0
0
OUT
V
1
5
0
0
V
1
4
0
S
2
SHFT
B
SHFT
D
ENT
SHFT
L
ENT
U
B
ENT
ENT
SHFT
Use either OR Constant
V-memory
LD
BIN
K1024
Load the value in V1400
into the lower 16 bits of
the accumulator
-
Direct
SOFT
Discrete Bit Flags
Description
SP63
On when the result of the instruction causes the value in the accumulator to be zero.
SP64
On when the 16-bit subtraction instruction results in a borrow.
SP65
On when the 32-bit subtraction instruction results in a borrow.
SP70
On anytime the value in the accumulator is negative.
Operand Data Type
DL06 Range
A
aaa
V-memory
V
See memory map
Pointer
P
See memory map
Constant
K
0-FFFF, h=65636
DS
Used
HPP Used
Subtract Binary (SUBB)
Subtract Binary is a 16-bit instruction that subtracts the
binary value (Aaaa), which is either a V-memory location or
a 4-digit (max.) binary constant, from the binary value in the
accumulator. The result resides in the accumulator.