EasyManua.ls Logo

Automationdirect.com DL06 - Page 262

Automationdirect.com DL06
533 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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.
SUBB
A aaa
HandheldProgrammerKeystrokes
LD
V1400
X1
SUBB
V1420
Thebinaryvalue in V1420 is
subtracted from thevalue in
theaccumulator
OUT
V1500
Copy thevalue in thelower 16
bits of theaccumulatortoV1500
V1500
(V1420)
0
1(Accumulator)
0
1
0
0
V1400
024
61 9
000 02 4
A0 B
Acc.
619
The unused accumulator
bits ar eset to zero
STR X(IN)1
D V 1400
OUT V 1500
V140
S
2
SHFT B
SHFT D
ENT
SHFT
L ENT
UB
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
-
DirectSOFT
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.