Mitsubishi Electronics FX2C Home Theater Server User Manual


 
FX Series Programmable Controlers Applied Instructions 5
5-120
5.11.3 EBCD (FNC 118)
Operation:
Converts a floatin
g
point value at S into separate
mantissa and exponent parts at D and D
+1
(scientific format).
Points to note:
a) The instruction must be double word format. The destinations D and D
+1
represent the
mantissa and exponent of the floatin
g
point number respectivel
y
.
b) To provide maximum accurac
y
in the conversion the mantissa D will be in the ran
g
e 1000 to
9999 (or 0) and the exponent D
+1
corrected to an appropriate value.
c) E.
g
. S= 3.4567
×
10
-5
will become D= 3456, D
+1
= -8
5.11.4 EBIN (FNC 119)
Operation:
Generates a floatin
g
point number at D from
scientific format data at source S.
Points to note:
a) The instruction must be double word format. The source data Sand S
+1
represent the
mantissa and exponent of the floatin
g
point number to be
g
enerated.
b) To provide maximum accurac
y
in the conversion the mantissa S must be in the ran
g
e 1000
to 9999 (or 0) and the exponent S
+1
corrected to an appropriate value.
c) E.
g
. S= 5432, S
+1
= 12 will become D= 5.432 x 10
9
Mnemonic Function
Operands
Program steps
SD
EBCD
FNC 118
(Float to
Scientific
conversion)
Converts floatin
g
point number
format to scientific
number format
D - must be in floatin
g
point format (32 bits).
D - 2 consecutive
devices are used
D - mantissa
D
+1
- exponent.
DEBCD,
DEBCDP:
9 steps
Mnemonic Function
Operands
Program steps
SD
EBIN
FNC 119
(Scientific
to Float
conversion)
Converts scientific
number format to
floatin
g
point
number format
D - 2 consecutive
devices are used
S- mantissa
S
+1
- exponent.
D - a floatin
g
point
value
(32 bits).
DEBIN,
DEBINP:
9 steps
DEBCD
X14
D102 D200
DEBIN
X15
D202 D110