Mitsubishi MELSEC-Q/L Programming Manual page 238

Table of Contents

Advertisement

FLT, FLTP, DFLT, DFLTP
(3) Due to the fact that 32-bit floating decimal point type real numbers are processed by simple 32-bit processing, the
number of significant digits is 24 bits if the display is binary and approximately 7 digits if the display is decimal.
For this reason, if the integer exceeds the range of -16777216 to 16777215 (24-bit BIN value), errors can be generated
in the conversion value.
As for the conversion result, the 25th bit from the upper bit of the integer is always filled with 1 and 26th bit and later bits
are truncated.
b31
b24 b23
222030030 0 0 0 0 1 1 0 1 0 0 1 1 1 0 1 1
b31
b24 b23
372588919 0 0 0 1 0 1 1 0 0 0 1 1 0 1 0 1
Operation Error
(1) There is no operation error in the FLT(P) or DFLT(P) instruction.
Program Example
(1) The following program converts the BIN 16-bit data at D20 to a 32-bit floating decimal point type real number and stores
the result at D0 and D1.
[Ladder Mode]
[Operation]
Integer
D20
conversion
15923
BIN value
(2) The following program converts the BIN 32-bit data at D20 and D21 to a 32-bit floating decimal point type real number,
and stores the result at D0 and D1.
[Ladder Mode]
[Operation]
Integer
D21
D20
conversion
16543521
BIN value
Integer
D21
D20
conversion
173963112
BIN value
236
Integer
b16
b15
1 1 1 0 1 0 0 0 1 1 0 0 1 1 1 0
b16 b15
0 1 0 0 0 0 0 1 0 1 1 1 0 1 1 1
[List Mode]
Step
D1
D0
15923
32-bit floating-point
real number
[List Mode]
Step
D1
D0
16543521
32-bit floating-point
real number
An error is generated in operation results since
the number of significant digits is "7".
D1
D0
173963120
32-bit floating-point
real number
b8 b7
b0
Truncation
Always filled with 1
b8 b7
b0
Truncation
Always filled with 1
Instruction
Device
Instruction
Device
After conversion
Result of operation
is 222030032.
Result of operation
is 372588928.

Advertisement

Table of Contents
loading

Table of Contents