Справочник Пользователя для Mitsubishi Electronics AJ65bt-r2

Скачать
Страница из 264
6 - 7
MELSEC-A
6   EXCHANGING DATA WITH AN EXTERNAL DEVICE
(3)   Arrangement of reception data
The arrangement of the data received from the external device when stored in
the reception area is shown below.
1) A random data section of the received statement is stored in the R2 buffer
memory (reception data storage area).
2) When ASCII-BIN conversion is carried out, the data converted into binary
data is stored.
3) The data is stored into the reception data storage area in the order of the
smaller addresses (L) to (H) received, and then the next address (L) to (H).
(Example)
To store the ten characters "ABCDEFG123" of the received random
data
(The reception area is the default value)
(B)                                   (A)
42
H
                 ,                 41
H
(D)                                    (C)
44
H
                 ,                 43
H
(F)                                   (E)
46
H
                 ,                 45
H
(1)                                   (G)
31
H
                 ,                 47
H
(3)                                   (2)
33
H
                 ,                 32
H
″321GFEDCBA″
Head
   ↓
Address
Buffer memory
Reception data size storage area
The received data size (10 characters worth)
is stored according to the word/byte unit 
designation                   .
5 or 10
Reception data storage area
The received data is stored in the order of 
smaller addresses (L) to (H) received, and
then the next address (L) to (H).
From external
device
R2 400
H
R2 401
H
R2 402
H
R2 403
H
R2 405
H
R2 102
H
)
(
R2 404
H
R2 406
H
When the reception complete data size data has been received, the R2 turns the
reception normal read request signal (RXn2) or reception error read request
signal (RXn3) ON.
(4)   Setting the buffer memory
The following buffer memories are related to the reception of data.
R2 buffer
memory address
Name
Details
R 2
 2
H
Reception area head
address designation
Designate the head address of the R2 buffer memory to be used as the
reception area.
Always designate 
R 2
 200
H
 or above, which is the user free area.
Set so that the area is not duplicated with areas used by other functions.
Setting range: 200
H
 to 7FE
H
 (Default value: 400
H
)
R 2
 3
H
Reception area size
designation
Designate the size of the R2 buffer memory used as the reception area.
(Reception data size storage area + reception data storage area size)
Set the reception area size to be 2
H
 or more.