Hitachi HIDIC MICRO-EH Applications Manual page 105

Table of Contents

Advertisement

Item number
Arithmetic instructions-10
Ladder format
d = s1 B/ s2
Instruction format
d = s1 B/ s2
Usable I/O
d
Substitution destination
s1
Dividend
s2
Divisor
Function
Divides s1 by s2 as the BCD data, and substitutes the quotient into d in the BCD data. The remainder is set in the special
internal output WRF016 (DRF016 in the case of double word).
The DER flag is set to "1" if s1 or s2 is an invalid BCD data or when s2 is set to "0". In this case the operation is not
performed. If both s1 and s2 are valid BCD data and s2 is not set to "0," the operation is performed.
Example: WR0051 = WR0049 B/ WR0050
WR0051
WR0050
WR0049
When s1, s2 are words:
When s1, s2 are double words:
Notes
The combinations of d, s1 and s2 are as follows:
d
Word
Double word
Double word
Program example
X00000
Program description
When input X00000 is on, the value of WR0049 is divided by the value of WR0050, then substituted into WR0051 as the
BCD data.
The reminder is substituted into WRF016 as the BCD data.
Name
Condition code
R7F4
R7F3
R7F2
DER
ERR
SD
Number of steps
Condition
Words
Double word
Bit
R,
TD, SS,
X
Y
M
CU, CT
WX WY
. . .
WRF016
0000 to 9999 (BCD)
00000000 to 99999999 (BCD)
s1
s2
Word
Word
Double word
WR0051 = WR0049 B/ WR0050
5-55
Chapter 5 Instruction Specifications
BCD division
Processing time (µs)
R7F1
R7F0
Average Maximum
V
C
152
Steps
4
253
6
Word
Double word
WR,
DR,
WM TC DX DY
DM
LD X00000
[
WR0051 = WR0049 B/ WR0050
]
Remark
Upper case: W
Lower case: DW
Other

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents