7.11 String Processing Instructions
7.11.7 Reading device comment data
7-177
7
APPLI
C
A
T
IO
N
INSTRUCTIONS
COMRD
COMRD
Function
(1) Reads the comment data in the device specified for
, and stores it as ASCII code data to
the device specified for
and the following devices.
For example, if the comment in the device specified for
is "NO. 1 LINE START," its
data will be stored to the devices following
as shown below.
(2) The only device numbers that can be specified for
are those that are set within the comment
range.
(3) If no comment has been registered for the device specified for
, all of the characters for
the comment would be processed as 20
H
(space).
(4) The operation in the area following the device number where the final character of
is
stored differs depending on the ON/OFF status of SM701 (signal for switching the number of
output characters).
When SM701 is OFF
: Does not change
When SM701 is ON
: Stores 0
(5) When a comment is read, SM720 turns ON for one scan after the instruction is completed.
SM721 turns ON during the execution of the instruction.
While SM721 is ON, the COMRD(P) instruction cannot be executed. If the attempt is made,
no processing is performed.
1. For device comments used with the COMRD(P) instruction, use comment files
stored in the memory card.
Comment files stored in the program memory cannot be used.
2. Set the comment file used for the COMRD(P) instruction in "PLC file setting" in
the parameter mode. If the used comment file has not been set in the PLC file
setting, device comments cannot be output with the COMRD(P) instruction.
3. Do not execute the COMRD(P) instruction in an interrupt program. Doing so will
cause a malfunction.
s
d
ASCII
co
d
e
for
the
1
st
character
ASCII
co
d
e
for
the
2
n
d
character
ASCII
co
d
e
for
the
3
r
d
character
ASCII
co
d
e
for
the
4
th
character
b15
b8b7
b0
S
tores
up
to
32
characters
ASCII
co
d
e
for
the
5
th
character
ASCII
co
d
e
for
the
6
th
character
ASCII
co
d
e
for
the
7
th
character
ASCII
co
d
e
for
the
8
th
character
ASCII
co
d
e
for
the
29
th
character
ASCII
co
d
e
for
the
30
th
character
ASCII
co
d
e
for
the
31
st
character
ASCII
co
d
e
for
the
32
n
d
character
00
H
C
omment
at
d
ev
i
ce
num
b
er
spec
i
f
i
e
d by
s
[1]
[0]
[2]
[3]
d
d
d
d
[15]
d
s
d
4E
H
(N)
4F
H
(O)
2E
H
(.)
31
H
(1)
b15
b8 b7
b0
20
H
(
space
)
41
H
(A)
4C
H
(L)
C
B
H
(H)
49
H
(I)
45
H
(E)
20
H
(
space
)
53
H
(S)
54
H
(T)
52
H
(R)
54
H
(T)
20
H
(
space
)
00
H
20
H
(
space
)
00
H
NO.1 LINE START
C
omment
at
[1]
[0]
[2]
[3]
[4]
[5]
[6]
[7]
d
d
d
d
d
d
d
d
[15]
d
s
s
s
d
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: ......