7
- 18
7.4 MC Protocol Communication
7
COMMUNICATION USING BUILT-IN ETHERNET
PORTS OF CPU MODULE
(e) Response message receive processing
Figure 7.20 shows an example of the response message receive processing on
the external device side.
Remark
Personal computers use the TCP socket functions internally for Ethernet
communication.
These functions do not have boundary concept. Therefore, when data is sent by
executing the "send" function once, the "recv" function needs to be executed
once, twice or more to receive the same data. (One execution of the "send"
function does not correspond to one execution of the "recv" function.)
For this reason, receive processing described above is required on the external
device side.
If the "recv" function is used in blocking mode, data may be read by executing the
function once.
Figure 7.20 Example of the response messages receive processing on the external device side
Communication processing
on the external device side
End
Error processing
Request message send processing
Response message receive processing
Receive the rest of
response messages.
The receive data exceeds
the size limit.
TCP connection is closed.
The monitoring timer has run over.
The response message
for the following request
has been received.
Processing for response messages
Is TCP connection open?
Has the data
been received within the
monitoring timer?
Check the receive data size.
Has processing
for all received messages
completed?
Содержание Q00CPU
Страница 1: ......
Страница 2: ......
Страница 972: ...Index 6 Memo ...
Страница 975: ......
Страница 976: ......