EasyManua.ls Logo

Automationdirect.com DL06 - Page 265

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-104
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 the accumulator is divided by the binary value
in V1420 using the Divide Binary instruction. The value in the accumulator is copied to
V1500 using the Out instruction.
DIVB
A aaa
DirectSOFT32 Display
HandheldProgrammerKeystrokes
LD
V1400
X1
DIVB
V1420
Thebinaryvalue in th
accumulatorisdivided by
thebinaryvalue in V1420
OUT
V1500
Copy thevalue in thelower 16
bits of theaccumulatortoV1500
V1500
0
(Accumulator)F
0
0
F
(V1420)
0
V1400
A01
320
000 A0 1
05 0
Acc.
320
The unused accumulator
bits areset to zero
00 00000 0
Firststack location contains
theremainder
STR
X1
D V 140 0
OUT
V 1500
V140
D
2
SHFT B
SHFT D
ENT
SHFT
L ENT
IV
ENT
ENT
_
.
.
Use either OR Constant
V-memory
LD D
BIN
K64001
Load the value in V1400
into the lower 16 bits of
the accumulator
Operand Data Type DL06 Range
A
aaa
V-memory V See memory map
Pointer P See memory map
Constant K 0-FFFF
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 anytime the value in the accumulator is negative.
DS Used
HPP Used
DirectSOFT
Divide Binary (DIVB)
Divide Binary is a 16-bit instruction that divides the binary value in
the accumulator by a binary value (Aaaa), which is either a V-memory
location or a 16-bit (max.) binary constant. The first part of the
quotient resides in the accumulator and the remainder resides in the
first stack location.