11 - 171 11 - 171
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
The number of elements is 10 or less for all the arrays used for <control table>.
However, the arrays should always be defined using the DIM instruction.
If an array is not defined using the DIM instruction, an error occurs at the execution of the PCRD
instruction (usually, an array with 10 or fewer elements can be used without defining it).
• <storage area for data read > is a variable or device range for storing the data read from
the PLC CPU. Specify an integer variable, an integer array name, a character variable, a
character array variable, extension registers ED, or extension relays EM. Each of them is
specified in the following manner.
Integer variable
Character variable
Integer array name
Character array variable
ED
EM
%
$
% ( )
$ (n)
W@ (ED,n)
B@ (EM,n)
Indicates using the special variables.
Store dummy data in the variable used as <storage area for data read> before executing the PCRD
instruction. If the PCRD instruction is executed without storing this dummy data, an error occurs.
Integer variables %=0
Character variables $=SPACE$ (255)
The dummy data is not necessary for ED and EM.
An array used as <storage area for data read> must always be defined using the DIM instruction,
even if the number of elements used is 10 or less. If the PCRD instruction is executed without defining
the array, an error occurs.
• See Section 4.2.6 for how to store data read.
• All the processing performed using the PCRD instruction can be executed even while the
applicable PLC CPU is running.
Be sure to reset the communication module once if the type of the PLC CPU in the data link
system that is being accessed from the communication module is changed.
If it is attempted to access the PLC CPU without resetting, incorrect data may be read.