7-178
7.11 String Processing Instructions
7.11.7 Reading device comment data
COMRD
O
peration Error
In any of the following cases, an operation error occurs and the error flag is turned ON.
• The comment is not registered to the device specified for
.
(Error code: 4100)
• The COMRD(P) instruction is executed when writing a comment file during online change.
(Error code: 4100)
Program Example
In the following program, the comment set in D100 is stored as ASCII code data in Var_W0 and
the following devices when X1C turns ON.
[Structured ladder]
[ST]
IF X1C THEN
RST(TRUE,SM701);
COMRDP(TRUE,D100,Var_W0);
END_IF;
[Operation]
s
41
H
(A)
D
7
H
(L)
B
2
H
(I)
DD
H
(N)
b15
b8 b7
b0
20
H
(
space
)
B
3
H
(
U
)
D
3
H
(M)
C
B
H
(H)
B
8
H
(K)
AE
H
(Y)
B
3
H
(
U
)
B
A
H
(K)
BD
H
(S)
20
H
(
space
)
20
H
(
space
)
20
H
(
space
)
20
H
(
space
)
20
H
(
space
)
00
H
ALINE TARGET
C
omment
at
D
100
Var
_W0[1]
Var
_W0[2]
Var
_W0[3]
Var
_W0[4]
Var
_W0[5]
Var
_W0[6]
Var
_W0[7]
Var
_W0[15]
Var
_W0[16]
Var
_W0[0]
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: ......