Floating Point Divide: Fdiv(141) - Omron SYSMAC CVM1 Series Operation Manual

Duplex system
Hide thumbs Also See for SYSMAC CVM1 Series:
Table of Contents

Advertisement

Special Math Instructions

5-23-6 FLOATING POINT DIVIDE: FDIV(141)

Ladder Symbol
(141)
FDIV
Dd
Variations
j FDIV(141)
Description
First word
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
1
0
1
0
0
0
0
exponent (0 to 7)
sign of exponent
Precautions
Flags
Example
Dr
R
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.
Dr+1
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.
1
0
0
0
1
0
0
0
mantissa (leftmost 3 digits)
0: +
1: –
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
0.9999999 x 10
. The results must be between 0.1 x 10
Note Refer to page 101 for general precautions on operand data areas.
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
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.
Operand Data Areas
st
Dd: 1
dividend word
CIO, G, A, T, C, DM
st
Dr: 1
divisor word
CIO, G, A, T, C, DM
st
R: 1
result word
CIO, G, A, DM
Dr
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
1
0
0
0
1
0
0
mantissa (rightmost 4 digits)
Section 5-23
Quotient
R+1
R
Dd+1
Dd
Second word
0
1
0
0
0
1
0
0
–2
= 0.1111113 x 10
–7
and 0.9999999 x 10
–7
and 0.999999 x 10
1
1
–7
and
7
.
7
.
313

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cv seriesSysmac cvm1d series

Table of Contents