6F8C0904
115
6.4 Using the EN311 Socket Interface
6
• Allocate a reception data storage register area with a size equal to "the size of the data
that you want to transfer from the socket" + 1 word. The received data size (bytes) and
the data received by the target socket when the receive request is issued are
transferred to this area as shown below.
(5) Important notes
• An error is returned if a receive request is issued for a socket that is not yet opened.
Error status: Socket unopened ••• 2945(16#B81)
• An error is returned if a socket identifier other than 1 to 8 is specified.
Error status: Invalid socket identifier ••• 2946(16#B82)
• An error will be returned if a value of 0 words or 1002 or more words is specified as the
receive data size.
Error status: Transmission word count error ••• 5059(16#EC3D)
• An error will be returned if the reception timeout time is exceeded.
Error status: Timeout ••• 2848(16#B20)
• If a close request from the remote node TCP socket has arrived while a connection is
established, and the user program issues a send request, the EN311 returns the
following error.
Error status: Socket unopened ••• 2945(16#B81)
However, the remaining data will be acquired by issuing a receive request if there is
data remained on the EN311.
• For a TCP receive request, if the following condition is satisfied;
Amount of data received by the socket > the number of data words received (N-1)
Then only the reception data size of the received data from the beginning will be
transferred to the S controller. The remaining data will be stored in the EN311. Issue
another receive request to receive the remaining data.
• For a TCP receive request, if the following condition is satisfied;
Amount of data received by the socket < the number of data words received (N-1)
Then all of the received data will be transferred to the S controller.
• Since a TCP receive request merely places the socket in the receive wait state, it
cannot detect remote nodes that are not responding. Use one of the following methods
to prevent this state.
• Monitor for a no-response state by sending data periodically over a separate (dif-
ferent) TCP connection.
• Execute a remote node presence verification request for the remote node periodi-
cally (see section 7.3, "Remote Station Verification Request").
• Monitor the interval between data receptions when data is being received periodi-
cally.
(Receive request issued first type: specify a limited timeout limit.)
(Socket status-monitoring type: monitor the interval between points when the
received text present bit is set to the on state.)
• One of the following problems may have occurred when there is no response from the
remote node:
Received data size (bytes)
←
Head of the
specified
register
Data received by the target socket
Receive data storage
when the receive request is issued
register area
Summary of Contents for V Series
Page 1: ...6F8C0904 Integrated Controller V Series Ethernet module EN311 User s Manual Sep 30 2004 ...
Page 12: ......
Page 16: ......
Page 34: ......
Page 40: ......
Page 106: ......
Page 180: ......
Page 199: ...6F8C0904 179 7 5 RAS Information Readout 7 Figure 7 1 Packet Format IP Datagram ...
Page 200: ...180 Ethernet module User s Manual Chapter 7 RAS Information 7 ...
Page 224: ......
Page 240: ......
Page 244: ......
Page 248: ......
Page 250: ......
Page 256: ......
Page 258: ......