Mitsubishi Electronics FX2C Home Theater Server User Manual


 
FX Series Programmable Controlers Applied Instructions 5
5-123
5.11.8 EDIV (FNC 123)
Operation:
The floatin
g
point value of S
1
is divided b
y
the
floatin
g
point value of S
2
. The result of the division
is stored in D as a floatin
g
point value. No
remainder is calculated.
Points to note:
Points a, b, c, d of the EADD instruction appl
y
, except that a division is performed.
See pa
g
e 5-122.
•If S
2
is 0 (zero) then a divide b
y
zero error occurs and the operation fails.
5.11.9 ESQR (FNC 127)
Operation:
A square root is performed on the floatin
g
point
value of Sand the result is stored in D.
Points to note:
Points a, b, c, d of the EADD instruction appl
y
, except that a square root is performed.
See pa
g
e 5-122.
•If S is ne
g
ative then an error occurs and error fla
g
M8067 is set ON.
Mnemonic Function
Operands
Program steps
S
1
S
2
D
EDIV
FNC 123
(Floatin
g
Point
Division)
Divides one
floatin
g
point
number b
y
another.
K, H - inte
g
er value automati-
call
y
converted to floatin
g
point
D - must be in floatin
g
point
format (32 bits).
D - a floatin
g
point value
(32 bits).
DEDIV,
DEDIVP:
13 steps
Mnemonic Function
Operands
Program steps
SD
ESQR
FNC 127
(Floatin
g
Point
Square
Root)
Calculates the
square root of
a floatin
g
point
value.
K, H - inte
g
er value automati-
call
y
converted to floatin
g
point
D - must be in floatin
g
point
number format (32 bits).
D - a floatin
g
point value
(32 bits).
DESQR,
DESQRP:
9 steps
DEDIV
X10
D128
K500 D106
DESQR
M24
D302 D510