6-82
6.3 Data Conversion Instructions
6.3.6 Floating-point data to 16-bit/32-bit BIN data conversion (double precision)
INTD, DINTD
Program
E
xam
pl
e
(1) In the following program, the 64-bit floating-point real number in Var_D20 is converted to the
16-bit BIN value, and the result is stored to Var_D0.
[Structured ladder]
[ST]
INTDP(SM400,Var_D20,Var_D0);
[Operation]
(2) In the following program, the 64-bit floating-point real number in Var_D20 is converted to the
32-bit BIN value, and the result is stored to Var_D0.
[Structured ladder]
[ST]
DINTDP(SM400,Var_D20,Var_D0);
[Operation]
64-bi
t
fl
oat
i
ng
-p
o
i
nt
rea
l
num
b
er
B
IN
va
l
ue
I
nteger
convers
i
on
Var
_
D
2
0
Var
_
D0
25
9
15.6
79
6
25
9
16
64-bi
t
fl
oat
i
ng
-p
o
i
nt
rea
l
num
b
er
I
nteger
convers
i
on
Var
_
D
2
0
−
33
562.
3
211
An
o
p
erat
i
on
error
occurs
s
i
nce
t
h
e
va
l
ue
o
f
sett
i
ng
data
i
s
sma
ll
er
t
h
an
-
3
2
7
6
8
.
64-bi
t
fl
oat
i
ng
-p
o
i
nt
rea
l
num
b
er
B
IN
va
l
ue
I
nteger
convers
i
on
Var
_
D
2
0
Var
_
D0
−
5
7
4
9
6
8
.
3
21
−
5
7
4
9
6
8
64-bi
t
fl
oat
i
ng
-p
o
i
nt
rea
l
num
b
er
I
nteger
convers
i
on
Var
_
D
2
0
214
7
4
83
64
9
.22
An
o
p
erat
i
on
error
occurs
s
i
nce
t
h
e
va
l
ue
o
f
sett
i
ng
data
i
s
l
arger
t
h
an
214
7
4
83
64
7
.
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......