Receive Procedure; Receiving With Main Program (Procedure Exists) - Mitsubishi Electric MELSEC iQ-RJ71EN71 User Manual

Ethernet
Hide thumbs Also See for MELSEC iQ-RJ71EN71:
Table of Contents

Advertisement

Receive procedure

The following figure shows the processing for the RJ71EN71 or the RnENCPU (network part) to receive data from the external
device. The following receive methods can be used.
• Receiving with main program (BUFRCV instruction)
• Receiving with interrupt program (BUFRCVS instruction)

Receiving with main program (procedure exists)

The following figure shows the receive processing for the fixed buffer No.1 area corresponding to the connection No.1.
Initial processing Open processing
'Initial status' (Un\G1900024.0)
'Open completion signal
(connection No.1)'
(Un\G1900000.0)
BUFRCV instruction
BUFRCV instruction completion
device
BUFRCV instruction completion
device +1
'Socket/fixed buffer reception
status signal (connection No.1)'
(Un\G1900016.0)
 Normal completion of the initial processing is checked. ('Initial status' (Un\G1900024.0): On)
 A connection is established between the external device and the RJ71EN71 or the RnENCPU (network part), and normal completion of the connection No.1
open processings is checked. ( Page 378 TCP/IP Communications, UDP/IP Communications)
 Data is received from the external device. ('Socket/fixed buffer reception status signal (connection No.1)' (Un\G1900016.0): On)
 The BUFRCV instruction is executed, and the receive data length and receive data are read from the fixed buffer No.1. ('Socket/fixed buffer reception status
signal (connection No.1)' (Un\G1900016.0): Off)
 When reading of the receive data length and receive data is completed, a response is returned to the external device.
 The receive processing ends. If the data reception completes abnormally, execute the BUFRCV instruction again and start the receive processing.
• The details of the open setting are enabled at the rising edge of the RJ71EN71 and the RnENCPU (network
part) open completion signal.
• Execute the BUFRCV instruction when the socket/fixed buffer reception status signal changes from OFF to
ON.
• The socket/fixed buffer reception status signal does not turn on when abnormal data is received. In addition,
data is not stored in the fixed buffer No.1 area.
Receiving data
Ò
Ó
Receiving data
Sending a response
Õ
×
1 scan
ACK
(TCP only)
ACK
Response
(TCP only)
Ô
Ö
1.5 Communications Using the Fixed Buffer
1
1 FUNCTIONS
73

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents