7.11 String Processing Instructions
7.11.10 Character string data to 16-/32-bit BIN data conversion
7-193
7
APPLI
C
A
T
IO
N
INSTRUCTIONS
VA
L
, D
V
A
L
VAL, DVAL
Program Example
(1) In the following program, the character string data in Var_D20 are read as an integer value
and converted to the BIN value when X0 turns ON, and the result is stored to Var_D0.
[Structured ladder]
[ST]
VALP(X0,Var_D20,Var_D10,Var_D0);
[Operation]
(2) In the following program, the character string data in Var_D20 are read as an integer value
and converted to the BIN value when X0 turns ON, and the result is stored to Var_D0.
[Structured ladder]
[ST]
DVALP(X0,Var_D20,Var_D10,Var_D0);
[Operation]
2
D
H
(-)
31
H
(1)
36
H
(6)
2E
H
(.)
b15
b8 b7
b0
35
H
(5)
34
H
(4)
00
H
-1654
Var
_
D
0
6
2
Var
_
D
10
T
ota
l
num
b
er
of
di
g
i
ts
N
um
b
er
of
di
g
i
ts
i
n
d
ec
i
ma
l
fract
i
on
S
et
00
H
Var
_
D
20[1]
Var
_
D
20[2]
Var
_
D
20[0]
Var
_
D
20[3]
20
H
(
space
)
37
H
(7)
39
H
(9)
31
H
(1)
b15
b8 b7
b0
30
H
(0)
30
H
(0)
00
H
10
3
Var
_
D
10
T
ota
l
num
b
er
of
di
g
i
ts
N
um
b
er
of
di
g
i
ts
i
n
d
ec
i
ma
l
fract
i
on
S
et
00
H
2E
H
(.)
36
H
(6)
31
H
(1)
31
H
(1)
7 9 1 0 0 6 1 1
Var
_
D
0
Var
_
D
20[1]
Var
_
D
20[2]
Var
_
D
20[0]
Var
_
D
20[3]
Var
_
D
20[4]
Var
_
D
20[5]
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: ......