97
6 F 3 B 0 3 6 2
5. TCP open request (using the SEND instruction)
a. Function
This request opens (active/passive) any of the eight sockets.
Transmission protocol: TCP/IP
b. Transfer parameters
A3100H Module designation
A+1 CMD = 0035H Command number
A+2 SportNO Socket identifier (1 to 8)
A+3 Kind Open type
A+4 DIPAddress Remote port IP address
A+5
A+6 DTCP_PORTNO Remote port object socket TCP port number
A+7 STCP_PORTNO Local port specified socket TCP port number
A+8 TimeCNT Open wait timeout time
Open type (1 or 2) 1: Active open (client side)
2: Passive open (server side)
Open wait 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.
c. Status (See figure 4.3 for details on bits C, D, E and F.)
FEDCBA9876543210
BSportNO TermSTS
B+1 Detailed information (Only valid when TermSTS = 0BH.)
d. Important items
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.
Status: Transmission error (TermSTS = 0BH)
Detailed information: Already open (0080H)
An error is returned if a value other than 1 to 8 is specified as the socket identifier.
Status: Transmission error (TermSTS = 0BH)
Detailed information: Illegal socket identifier (0082H)
An error will be returned if a value outside the range 1024 to 65535 is specified for the local
port specified socket TCP port number.
Status: Transmission error (TermSTS = 0BH)
Detailed information: Port number error (0071H)
SportNO: Socket identifier (1 to 8)
TermSTS:See tables 4.3 and 4.4.
Detail information: See table 4.5.