![Omron CVM1D Скачать руководство пользователя страница 318](http://html1.mh-extra.com/html/omron/cvm1d/cvm1d_operation-manual_742532318.webp)
313
5-23-6 FLOATING POINT DIVIDE: FDIV(141)
Variations
j
FDIV(141)
(141)
FDIV
Dd
Dr
R
Dr: 1
st
divisor word
CIO, G, A, T, C, DM
R: 1
st
result word
CIO, G, A, DM
Dd: 1
st
dividend word
CIO, G, A, T, C, DM
Operand Data Areas
Ladder Symbol
When the execution condition is OFF, FDIV(141) is not executed. When the ex-
ecution condition is ON, FDIV(141) divides the floating-point value in Dd and
Dd+1 by that in Dr and Dr+1 and places the result in R and R+1.
R+1
R
Quotient
Dd+1
Dd
Dr+1
Dr
To represent the floating point values, the rightmost seven digits are used for the
mantissa and the leftmost digit is used for the exponent, as shown in the diagram
below. The mantissa is expressed as a value less than one, i.e., to seven deci-
mal places.
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
First word
exponent (0 to 7)
sign of exponent
0: +
1: –
1
0
1
0
0
0
0
1
0
0
0
1
0
0
0
1
mantissa (leftmost 3 digits)
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
Second word
mantissa (rightmost 4 digits)
0
0
0
1
0
0
0
1
0
0
0
1
0
0
1
1
= 0.1111113 x 10
–2
Dd, Dd+1, Dr and Dr+1 must be BCD. Dr and Dr+1 cannot contain zero.
The dividend and divisor must be between 0.0000001 x 10
–7
and
0.9999999 x 10
7
. The results must be between 0.1 x 10
–7
and 0.9999999 x 10
7
.
Note Refer to page 101 for general precautions on operand data areas.
Flags
ER (A50003):
Dr and Dr+1 contain 0.
Dd, Dd+1, Dr, or Dr+1 is not BCD.
The result is not between 0.1 x 10
–7
and 0.999999 x 10
7
.
Content of
*
DM word is not BCD when set for BCD.
EQ (A50006):
ON when the result is 0.
The following example shows how to divide two 4-digit whole numbers (i.e.,
numbers without fractions) so that a floating-point value can be obtained.
Description
Precautions
Example
Special Math Instructions
Section 5-23
Содержание CVM1D
Страница 462: ...SYSMAC CVM1D Duplex System Programmable Controllers Operation Manual Revised August 2001...
Страница 463: ...iv...
Страница 465: ...vi...