236
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.
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]
[List Mode]
[Operation]
(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]
[List Mode]
[Operation]
I
nteger
b31
b2
4
b23
b16
222030030 0 0 0 0 1 1 0 1 0 0 1 1 1 0 1 1
b15
b8 b7
b0
1 1 1 0 1 0 0 0 1 1 0 0 1 1 1 0
Resu
l
t
of
operat
i
on
i
s
222030032
.
T
runcat
i
on
A
l
wa
y
s
f
ill
ed
w
i
th
1
After
convers
i
on
372588919 0 0 0 1 0 1 1 0 0 0 1 1 0 1 0 1
0 1 0 0 0 0 0 1 0 1 1 1 0 1 1 1
Resu
l
t
of
operat
i
on
i
s
372588928
.
T
runcat
i
on
A
l
wa
y
s
f
ill
ed
w
i
th
1
b31
b2
4
b23
b16 b15
b8 b7
b0
Step
Instruction
Device
I
nteger
convers
i
on
32
-
b
i
t
f
l
oat
i
ng
-
po
i
nt
rea
l
number
15923
D20
B
IN
va
l
ue
D1
15923
D0
Step
Instruction
Device
I
nteger
convers
i
on
I
nteger
convers
i
on
An
error
i
s
generated
i
n
operat
i
on
resu
l
ts
s
i
nce
the
number
of
s
i
gn
i
f
i
cant
d
i
g
i
ts
i
s
"
7
".
B
IN
va
l
ue
D21
173963112
D20
B
IN
va
l
ue
D21
165
4
3521
D20
32
-
b
i
t
f
l
oat
i
ng
-
po
i
nt
rea
l
number
D1
165
4
3521
D0
32
-
b
i
t
f
l
oat
i
ng
-
po
i
nt
rea
l
number
D1
173963120
D0