Справочник Пользователя для Mitsubishi Electronics FX

Скачать
Страница из 382
FX Series Programmable Controlers
Applied Instructions 5
5-120
5.11.3
EBCD (FNC 118)
Operation:
Converts a floating 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 floating point number respectively. 
b) To provide maximum accuracy in the conversion the mantissa D will be in the range 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 floating 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 floating point number to be generated.
b) To provide maximum accuracy in the conversion the mantissa S must be in the range 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
S
D
EBCD
FNC 118
(Float to
Scientific
conversion)
Converts floating
point number
format to scientific
number format
D - must be in floating
point format (32 bits).
D - 2 consecutive
devices are used
D - mantissa
D
+1 
- exponent.
DEBCD,
DEBCDP:
9 steps
Mnemonic
Function 
Operands
Program steps
S
D
EBIN
FNC 119
(Scientific
to Float
conversion)
Converts scientific
number format to
floating point
number format
D - 2 consecutive
devices are used
S- mantissa
S
+1 
- exponent.
D - a floating point 
value
(32 bits). 
DEBIN,
DEBINP:
9 steps
FX
0(S)
FX
0N
FX FX
(2C)
FX
2N(C)
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
PULSE-P
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
16 BIT OPERATION
FX
FX
0N
FX
0(s)
FX
(2C)
FX
2N(C)
32 BIT OPERATION
DEBCD
X14
D102 D200
FX
0(S)
FX
0N
FX FX
(2C)
FX
2N(C)
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
PULSE-P
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
16 BIT OPERATION
FX
FX
0N
FX
0(s)
FX
(2C)
FX
2N(C)
32 BIT OPERATION
DEBIN
X15
D202 D110