Standard
RLL
Instructions
5–70
Standard RLL Instructions
Math Instructions
DIVD
A aaa
Divide Double is a 32 bit instruction that
divides the BCD value in the accumulator
by a BCD value (Aaaa), which must be
obtained from two consecutive V memory
locations. (You cannot use a constant as
the parameter in the box.) The first part of
the quotient resides in the accumulator
and the remainder resides in the first stack
location.
Operand Data Type
DL05 Range
A
aaa
Vmemory
V
All (See p. 4–28)
Pointer
P
All (See p. 4–28)
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.
SP75
On when a BCD instruction is executed and a NON–BCD number was encountered.
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 and V1401 will be loaded
into the accumulator using the Load Double instruction. The value in the
accumulator is divided by the value in V1420 and V1421 using the Divide Double
instruction. The first part of the quotient resides in the accumulator an the remainder
resides in the first stack location. The value in the accumulator is copied to V1500
and V1501 using the Out Double instruction.
Direct
SOFT Display
Handheld Programmer Keystrokes
LDD
V1400
X1
Load the value in V1400 and
V1401 into the accumulator
DIVD
V1420
The value in the accumulator
is divided by the value in
V1420 and V1421
OUTD
V1500
Copy the value in the
accumulator to V1500
and V1501
0
0
0
0
0
0
3
0
0
0
0
1
5
0
0
(Accumulator)
(V1421 and V1420)
0
0
1
5
0
0
0
0
0
0
V1500
V1400
0
0
0
0
V1401
V1501
0
0
0
3
0
0
0
0
0
5
0
0
0
0
0
0
0
0
0
First stack location contains
the remainder
The unused accumulator
bits are set to zero
Acc.
SHFT
SHFT
SHFT
1
B
ENT
ANDST
L
3
D
STR
$
3
D
ENT
ENT
3
D
3
D
1
B
4
E
0
A
0
A
8
I
AND
V
1
B
5
F
0
A
0
A
OUT
GX
1
B
4
E
0
A
2
C
ENT
Divide Double
(DIVD)
Содержание DL05
Страница 1: ...DL05 User Manual Automationdirect com ...
Страница 2: ...DL05 User Manual Automationdirect com ...
Страница 436: ...1B DL05 Error Codes In This Appendix Ċ Error Code Table ...
Страница 443: ...1C Instruction Execution Times In This Appendix Ċ Introduction Ċ Instruction Execution Times ...
Страница 459: ...1D Special Relays In This Appendix Ċ DL05 PLC Special Relays ...
Страница 464: ...1E DL05 Product Weights In This Appendix Ċ Product Weight Table ...
Страница 466: ...1F European Union Directives CE In This Appendix Ċ European Union EU Directives Ċ Basic EMC Installation Guidelines ...