4 - 18 4 - 18
MELSEC-Q
4 THE EXCHANGE BETWEEN THE PLC AND BUFFER MEMORY
(b) Word Devices
The data that has been read from the designated word device in word units
is 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
41
H
= "A"
42
H
= " B"
43
H
= " C"
0D
H
= CR code
The data for the upper 8 bits and the lower
8 bits are stored individually as character codes
2 words of data from D10 are
accessed using character
variable MOJI$.
to
b7
b0
to
b7
b0
b15
b8 b7
b0
to
to
19788
D10
Upper 8 bits
Lower 8 bits
to
b7
b0
to
b7
b0
b15
b8 b7
b0
to
to
3411
D11
Upper 8 bits
Lower 8 bits
4
H
2
H
0 1
0
0 0 0 0 1
4
H
1
H
0 1
1
0 0 0 0 0
0 1
0
0 0 0 0 1
0 1
1
0 0 0 0 0
0
H
D
H
0 0
1
0 0 1 1 0
4
H
3
H
0 1
1
0 0 0 0 1
0 0
1
0 0 1 1 0
0 1
1
0 0 0 0 1
NOJI $
A
B
C
CR
1st
character
2nd
character
3rd
character
4th
character
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. I.
. 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