6F8C0904 109
6.4 Using the EN311 Socket Interface
6
6.4.4 UDP close request (using the USEND_T instruction)
(1) Function
Close the open UDP socket.
Release the (unlimited wait state) receive request and terminate the UDP socket.
(2) Request command structure and error status
<Request command>
<Error status>
Error status examples
(3) Important notes
• UDP close requests are processed with the highest priority and other executing
requests are discarded, even if the object socket is executing a UDP open, send, or
receive request. Other requests during the execution of this request will be discarded.
• The next open request for the object socket can be executed as soon as the close
request completes normally.
• An error is returned if a close request is issued for a socket that is not yet opened.
Error status: Unopened ••• 2845(16#B81)
• An error is returned if a value other than 1 to 8 is specified as the socket identifier.
Error status: Invalid socket identifier ••• 2846(16#B82)
• A UDP receive request will result in an error being returned if an unlimited wait state
UDP receive request is terminated with this request.
Error status: Transmission completion timeout ••• 5002(16#EC76)
• If the S controller internal completion wait time limit (2 seconds) is exceeded for this
request, the error listed below is returned.
Error status: Send completion timeout ••• 5002(16#EC76)
In this case, first verify that the module is not in the down state by checking the station
status, and then verify the open/closed state of the socket with the socket status.
F0
CMD Destination EN311 module slot number
CMD+1 Command (16#0334)
CMD+2 Socket identifier Value:1-8
F0
STATUS Socket identifier (1-8) or Error status
Error status number Description
-5004(16#EC74) Destination EN311 module slot number is missing or socket
identifier is out of range
2912(16#B60) Transmission disabled
2945(16#B81) Socket not opened yet
Supplemental Remarks
The S controller sees its requests (module control and socket transmission) to the EN311 as
being "transmission" requests. As a result, when a request is forcibly terminated and a response
is not received from the EN311, the result is a send request timeout even if the instruction was a
receive request.