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

Скачать
Страница из 382
FX Series Programmable Controlers
Applied Instructions 5
5-49
5.5.10
FLT (FNC 49)
Operation 1:
When the float instruction is used without the float
fl ag   ( M 8 0 2 3   =   O F F )   t h e   s o u r c e   d a t a   ( S )   is
converted in to an equivalent value stored in float
format at the destination device (D).
Please note that two consecutive devices (D and
D
+ 1
) will be used to store the converted float
number. This is true regardless of the size of the
source data (S), i.e. whether (S) is a single device
(16 bits) or a double device (32 bits) has no effect
on the number of destination devices (D) used to
store the floating point number. Examples:
Operation 2: (Applicable units: FX
(2C)
) This function is equivalent to FNC 129 INT.
When the float instruction is performed and the float flag M8023 is ON, the float operation will
be conducted in reverse to Operation 1. Any floating point format number stored at source (S)
will be converting to its decimal equivalent and stored at destination (D).
Continued over the page...
Mnemonic
Function 
Operands
Program steps
S
D
FLT
FNC 49
(
Floating
point)
Used to convert
data to and from
floating point
format
D
D
FLT, FLTP:
5 steps
DFLT,
DFLTP:
9 steps
M8023 = OFF data is converted from decimal
to floating point format
M8023 = ON data is converted from floating
point format to decimal format
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
X15
D 2
[ S ]
[ D ]
D15
FLT
X27
M8023
M8000
M8023
D120
D100
FLT
Decimal source data
(S)
Floating point
destination value (D)
-26700
404
-2.67 
×
 10
4
4.04 
×
 10
2
1
1
FX
0(S)
FX
0N
FX FX
(2C)
FX
2N(C)