24 Applied Instructions (Others)
24.1 COMRD / Read Device Comment Data
586
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Cautions
1) Specify a device number in the device specified by for which a comment is registered in the PLC.
If a comment is not registered for the device specified by , "20H" (space) is stored in the device
specified by for the number of characters in the comment (16 half-width characters).
2) The instruction is provided in the FX
3UC PLC Ver. 2.20 or later.
Error
An operation error is caused in the following cases. The error flag M8067 turns ON, and the error code is
stored in D8067.
1) When a comment is not registered for the device specified by (error code: K6706)
2) When the range of points used from the device specified by for the comment exceeds the
corresponding device range (error code: K6706)
The comment, however, is written up to that point.
Program examples
In the program shown below, the comment "Target Line A" registered to D100 is stored in ASCII code in D0
and later when X010 is set to ON. (When M8091 is OFF)
D0
D1
D2
b15 b8 b7 b0
D3
Comment of D100
Target Line A
D4
D5
D6
D7
D8
RST
EN
ENO
d
X010
COMRDP
EN ENO
d
s
D100
M8091
D0
[Structured ladder/FBD] [ST]
RST(X010,M8091);
COMRDP(X010,D100,D0);
74H(t)
61H(a)
67H(g)
54H(T)
72H(r)
65H(e)
4CH(L)
20H(space)
20H(space)
20H(space)
0000H
20H(space)
6EH(n)
20H(space)
69H(i)
65H(e)
41H(A)