Mitsubishi Electronics QJ71C24/-R2 Network Card User Manual


 
7 - 6 7 - 6
MELSEC-Q
7 DATA COMMUNICATIONS USING BIDIRECTIONAL PROTOCOL
(2) Arrangement of receive data
The following example illustrates the arrangement of data received from the
external device when it is stored in the receive area.
1) The receive message is stored to the Q series C24 buffer memory (receive
data storage area).
2) The data is stored to the receive data storage area in low address (L)
(H),
next address (L)
(H) order.
If the received data is "ABCDEFG123", it will be stored as shown below (for
the CH1 side):
ENQ
(0005H)
ABCDEFG1 23
LH LH
05H 00H 41H 46H44H42H 43H 32H45H 31H47H 33H
47H 02H
Sum
check
code
5
(00
H
)(05
H
)
B
(42
H
)
D
(44
H
)
F
(46
H
)
1
(31
H
)
3
(33
H
)
A
(41
H
)
C
(43
H
)
E
(45
H
)
G
(47
H
)
2
(32
H
)
Receive
data count
storage area
Receive
data storage
area
Receive area
(buffer memory)
Q series C24
External device
Transmission data (response message)
ACK
06
H
(Normal completion)
Data
length
Receive data (response message)
When the data length unit is in bytes, 00
H
is stored in the higher byte of the
last data storage position in the receive area when the data length of the
message is an even byte.
(3) Contents of receive data
The contents of receive data, including the receive data as indicated in
Section 7.2.2, are explained below.
(a) Control codes
The types of control codes are shown in the table below.
Signal
name
Code
(hexadecimal)
Contents Application
ENQ 05
H
Enquiry Code for starting data transmission.
ACK 06
H
Acknowledge
Response code to the opposite side when data was
received normally.
NAK 15
H
Negative
Acknowledge
Response code to the opposite side when data could
not be received normally. (Error code is sent
immediately after the response code.)
1) For data communication from the external device to the Q series C24
the Q series C24 checks and processes the control code received.
It cannot be read from the sequence program.
2) For data communication from the Q series C24 to the external device
The control code to be transmitted is added by the Q series C24.