Automationdirect.com DL06 User Manual page 265

Micro programmable logic controller
Hide thumbs Also See for DL06:
Table of Contents

Advertisement

Chapter 5: Standard RLL Instructions
Divide Binary (DIVB)
Divide Binary is a 16-bit instruction that divides the binary value in
1
DS
Used
the accumulator by a binary value (Aaaa), which is either a V-memory
HPP
Used
location or a 16-bit (max.) binary constant. The first part of the
2
quotient resides in the accumulator and the remainder resides in the
first stack location.
3
4
V-memory
Pointer
Constant
5
Discrete Bit Flags
6
7
NOTE: Status flags are valid only until another instruction uses the same flag.
8
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
9
in V1420 using the Divide Binary instruction. The value in the accumulator is copied to
V1500 using the Out instruction.
10
DirectSOFT
DirectSOFT32 Display
11
X1
12
13
14
A
B
C
Handheld Programmer Keystrokes
STR
D
SHFT
SHFT
OUT
5-104
DL06 Micro PLC User Manual, 3rd Edition, Rev. E
Operand Data Type
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.
Use either
OR
Constant
V-memory
LD
V1400
Load the value in V1400
into the lower 16 bits of
the accumulator
DIVB
V1420
The binary value in th
accumulator is divided by
the binary value in V1420
OUT
V1500
Copy the value in the lower 16
bits of the accumulator to V1500
X
1
ENT
L
D
V
1
D
I
V
B
SHFT
D
V
A
V
P
K
Description
L DD
K64001
BIN
The unused accumulator
bits are set to zero
0
0
0
_ . .
Acc.
4
0
0
ENT
V
1
1
5
0
DIVB
DL06 Range
aaa
See memory map
See memory map
0-FFFF
V1400
F
A 0
1
0
F
A 0
1
(Accumulator)
(V1420)
0
0 5
0
0
3
2
0
0
0
0
0
First stack location contains
the remainder
0
3
2
0
V1500
4
2
0
ENT
0
ENT
A aaa
0
0 0
0

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DL06 and is the answer not in the manual?

Table of Contents

Save PDF