110 Ethernet module User’s Manual
Chapter 6 Socket Interface Communication
6
6.4.5 TCP open request (using the USEND_T instruction)
(1) Function
This request opens (active/passive) any of the eight sockets.
Transmission protocol:TCP/IP
(2) Request command structure and error status
<Request command>
<Error status>
Error status examples
(3) Request command details
• Open type 1: Active open (client side)
2: Passive open (server side)
Timeout time: Specified in 0.1- second units (1 to 65535).
If zero is specified, the system is set to an unlimited (infinite) wait state.
Active open is not allowed to set to an unlimited (infinite) wait state.
(4) Important notes
• After this request completes normally, TCP send, receive or close requests can be
sent to the socket.
• An error is returned if an open request is issued for an already open socket.
Error status: Already open ••• 2944(16#B80)
• An error is returned if a value other than 1 to 8 is specified as the socket identifier.
Error status: Invalid socket identifier ••• 2946(16#B82)
• An error will be returned if a value outside the range 1024 to 65535 is specified for the
local node specified socket TCP port number.
Error status: Port number error ••• 2929(16#B71)
F0
CMD Request destination EN311 module slot number
CMD+1 Command (16#0334)
CMD+2 Socket identifier Value:1-8
CMD+3 Open type
CMD+4 Transmission destination IP address (The input format is the same
as that for the parameter setup
request.)
CMD+5
CMD+6 Remote object socket TCP port number Value:1024-65535
CMD+7 Receive wait timeout time Value:1024-65535
CMD+8 Timeout time
F0
STATUS Socket identifier (1-8) or Error status
Error status number Description
-5002(16#EC76) Timeout (detected by the S controller)
-5004(16#EC74) Destination EN311 module slot number is missing or socket identifier
is out of range
2848(16#B20) Timeout (detected by the EN311)
2944(16#B80) Socket already opened