Hitachi HIDIC MICRO-EH Applications Manual page 106

Table of Contents

Advertisement

Item number
Arithmetic instructions-11
Ladder format
d = s1 S/ s2
Command format
d = s1 S/ s2
Usable I/O
d
Substitution destination
s1
Dividend
s2
Divisor
Function
Divides s1 by s2 as signed binary data, and substitutes the quotient into d in signed binary data. The remainder is set in the
special internal output DRF016 signed binary data.
The DER flag is 1 if s2 is 0, and the operation is not performed. As long as s2 is not 0, it is 0 and the operation is
performed.
The V flag is 1 when the quotient is a positive value and exceeds H7FFFFFFF. Otherwise, it is 0.
Eexample) DR0060 = DR0056 S/ DR0058
WR0059 WR0058
DR0058
s1, s2
– 2147483648 to +2147483647 (decimal)
H80000000 to H7FFFFFFF (hexadecimal)
Program example
X00000
Program description
When input X00000 turns on, the value of DR0056 is divided by the value in DR0058, then substituted into DR0060 as
signed binary data. The remainder is substituted into special internal output DRF016 as signed binary data.
Name
Condition code
R7F4
R7F3
R7F2
DER
ERR
SD
Number of steps
Condition
Double word
Bit
R,
TD, SS,
X
Y
L,
WX WY
CU, CT
M
WR0061 WR0060
• • •
DR0060
WR0057 WR0056
DR0056
DR0060 = DR0056 S/ DR0058
5-56
Chapter 5 Instruction Specifications
Signed binary division
Processing time (
R7F1
R7F0
Average Maximum
V
C
101
Steps
6
Word
Double word
WR,
DR,
TC DX DY
WM
DM
WRF017 WRF016
DRF016
LD X00000
[
DR0060 = DR0056 S/ DR0058
]
µ
Remark
s)
Other

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents