4 - 17 4 - 17
MELSEC-Q
4 THE EXCHANGE BETWEEN THE PLC AND BUFFER MEMORY
• Word Units
Continuous device numbers are read in blocks of 16 points when the bit
device is designated in word units.
The 16 points of data that has been read are separated into 8 points in
the first half and 8 points in the second half. Then the 8 points of ON/OFF
data for the device numbers are treated as a single JIS8 code and it is
stored using the corresponding characters.
Therefore, the amount of data required for storing and setting the amount
of data designated in the number of process points to the elements are
as follows.
Number of character data = Process points x 2 bytes
The status of the each bit is “0” when the corresponding device is OFF
and “1” when it is ON.
to
4
H
2
H
0 1
0
0 0 0 0 1
b7
M47
b0
M40
to
4
H
1
H
0 1
1
0 0 0 0 0
b7
M39
b0
M32
to
0
H
D
H
0 0
1
0 0 1 1 0
b7
M63
b0
M56
to
4
H
3
H
0 1
1
0 0 0 0 1
b7
M55
b0
M48
41
H
= "A"
42
H
= "B"
43H= "C"
0D
H
= CR code
The first 8 points and the second 8
points of data are stored as
character codes.
2 words (32 bits) of data
from M32 are accessed
using character variable
MOJI$.
NOJI $
A
B
C
C R
1st
character
2nd
character
3rd
character
4th
character
M32 to M47 0 1
0
0 0 0 0 1
0 1
1
0 0 0 0 0
M47
M32
M48 to M63
M63
M48
0 0
1
0 0 1 1 0
0 1
1
0 0 0 0 1
When reading data with the PCRD instruction, the following illustrates if a
character data greater than the character variable specified as readout
variables or number of bytes to be read in the character array variables
(one byte = one character) is stored.
When using RD$ as the readout variable
RD$
. M. I. T. S. U. B. I. S. H.
. A. D. 5. 1. H.
. A. D. 5. 1. H. B. I. S. H. I.
RD$
Readout data
Readout
execution
Data before the readout
execution will be stored