6.3 Data Conversion Instructions
6.3.4 16-/32-bit BIN data to floating-point data conversion (double precision)
6-75
6
BA
S
IC
INSTRUCTIONS
FL
T
D
, D
F
LT
D
FLTD, DFLTD
DFLTD(P)
(1) Converts 32-bit BIN data specified for
to a 64-bit floating-point real number, and stores
the result to
.
(2) BIN values between 2147483648 and 2147483647 can be specified for
,
+ 1.
O
p
erat
i
on
E
rror
In the following case, an operation error occurs, the error flag (SM0) is turned ON, and the
corresponding error code is stored to SD0.
• The operation result exceeds the following range. (An overflow occurs.)
2
128
| operation result |
(Error code: 4141)
Program
E
xam
pl
e
(1) In the following program, the 16-bit BIN value in Var_D20 is converted to the 64-bit floating-
point real number, and the result is stored to Var_D0.
[Structured ladder]
[ST]
FLTDP(SM400,Var_D20,Var_D0);
[Operation]
s
d
6
4-
b
it
f
loating-
p
oint
real num
b
er
d
BIN 3
2
b
its
Upp
er
16
b
its
Lo
w
er
16
b
its
s
s
s
15
9
2
3
Var_D
2
0
Real num
b
er
conversion
BIN value
Var_D0
6
4-
b
it
f
loating-
p
oint
real num
b
er
15
9
2
3
Содержание MELSEC Q Series
Страница 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Страница 2: ......
Страница 14: ...A 12 MEMO ...
Страница 340: ...6 178 MEMO MTR ...
Страница 708: ...7 368 MEMO ...
Страница 776: ...8 68 MEMO ...
Страница 796: ...9 20 MEMO ...
Страница 804: ...App 8 MEMO ...
Страница 812: ...Index 8 MEMO ...
Страница 815: ......