7.11 String Processing Instructions
7.11.1 16-/32-bit BIN data to decimal ASCII data conversion
7-155
7
APPLI
C
A
T
IO
N
INSTRUCTIONS
BINDA, DBINDA
BINDA, DBINDA
(2) In the following program, the 32-bit BIN data in Var_W10 are converted to the decimal ASCII
code data, and the results are output to Y40 to Y48 by the PR instruction. (Global label
Var_D0 is assigned to device D0.)
[Structured ladder]
[ST]
IF SM400 THEN
RST(TRUE,SM701);
DBINDAP(TRUE,Var_W10,Var_D0);
END_IF;
PR(X0,D0,Y40);
[Operation]
The ASCII code data are output to Y40 to Y48 by the execution of the PR instruction when
X0 turns ON.
Since SM701 is OFF, the PR instruction outputs ASCII code data up to 00
H
.
D
1
D
2
D
3
2
D
H
(
-
)
20
H
(
space
)
20
H
(
space
)
20
H
(
space
)
b15
b8 b7
b0
33
H
(3)
38
H
(8)
D
0
P
R
Y4
0
to Y4
8
3
4
H
(
4
)
32
H
(2)
35
H
(5)
36
H
(6)
33
H
(3)
00
H
"-
38
4
2563
"
is output.
-
3
8
4
2
5
6
3
BIN value
Var_
W10
D4
D
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: ......