Mitsubishi MELSEC Q Series Programming Manual page 602

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

ASC(P)
(2) The use of n to set the number of characters causes the BIN data range designated by
and the character string storage device range designated by
(3) Processing will be performed accurately even if the device range where BIN data to be
converted is being stored overlaps with the device range where the converted ASCII data
will be stored.
b15
D11
D12
D13
(4) If an odd number of characters has been designated by n, the ASCII code "00
automatically stored in the upper 8 bits of the final device in the range where the character
string is to be stored.
When 5 characters have been designated by n.
S
S
+1
(5) If the number of characters designated by n is "0", conversion processing will not be
conducted.
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and
an error code is stored into SD0.
• The range for the number of characters designated by n following the device number
designated by
• The range for the number of characters designated by n following the device number
designated by
Program Example
(1) The following program reads the BIN data being stored at D0 as hexadecimal values,
converts them to a character string, and stores the result from D10 to D14 when X0 is turned
ON.
[Ladder Mode]
[Operation]
b15
D0
D1
D2
7-228
b12
b11
b8
b7
b4
b3
4
3
2
1
H
H
H
8
7
6
5
H
H
H
A
9
H
b15
b12
b11
b8
b7
b4
b3
1
A
2
exceeds the relevant device range.
S
exceeds the relevant device range.
D
b12
b11
b8
b7
b4
b3
C
7
2
9
H
H
H
H
0
5
A
F
H
H
H
H
0
0
2
2
H
H
H
H
b0
b15
D10
H
D11
H
D12
H
D13
D14
b0
S
D
B
S
D
B
+1
S
D
+2
[List Mode]
Step
Instruction
b0
b15
D10
32
D11
43
D12
41
D13
30
D14
32
to be set automatically.
D
b8b7
b0
32
31
H
H
34
33
H
H
36
35
H
H
38
37
H
H
41
39
H
H
" will be
H
b15
b8b7
32
(2)
42
(B)
H
H
31
(1)
41
(A)
H
H
00
42
(B)
H
H
Stored automatically
(Error code: 4101)
(Error code: 4101)
Device
b8b7
b0
(2)
39
(9)
H
H
(C)
37
(7)
H
H
(A)
46
(F)
H
H
(0)
35
(5)
H
H
(2)
32
(2)
H
H
S
b0

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents