7-208
7.11 String Processing Instructions
7.11.13 Hexadecimal BIN data to ASCII data conversion
ASC
O
peration Error
In any of the following cases, an operation error occurs, the error flag (SM0) is turned ON, and
the corresponding error code is stored to SD0.
• The range of the number of characters specified for n following the device number
specified for
exceeds the corresponding device range.
(Error code: 4101)
• The range of the number of characters specified for n following the device number
specified for
exceeds the corresponding device range.
(Error code: 4101)
Program Example
In the following program, the BIN data in D0 are read as a hexadecimal value, and converted to
the character string data when X0 turns ON, and the results are stored to the devices from D10
to D14.
[Structured ladder]
[ST]
ASCP(X0,D0,10,D10);
[Operation]
s
d
39
H
(9)
32
H
(2)
37
H
(7)
4
3
H
(C)
4
6
H
(
F
)
4
1
H
(A)
35
H
(5)
30
H
(0)
32
H
(2)
32
H
(2)
D
1
D
2
D
11
D
12
D
13
D
1
4
D
0
D
10
2
H
2
H
0
H
5
H
A
H
F
H
C
H
7
H
2
H
9
H
0
H
0
H
b15
b8b7
b0
b15
b12
b8
b11
b7
b
4
b0
b3
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: ......