84
6 F 3 B 0 3 6 2
6.4 Using the Ethernet Port Socket Interface
This section describes the requests used by T2N user programs to use UDP and TCP sockets.
There are eight types of request as listed below.
UDP socket (open request, send request, receive request, close request)
TCP socket (open request, send request, receive request, close request)

1. UDP open request (using the SEND instruction)

a. Function
This request opens any of the eight sockets.
Transmission protocol: UDP/IP
b. Transfer parameters
A3100H Module designation
A+1 CMD = 0031H Command number
A+2 SportNO
A+3 UDP_PORTNO
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, UDP 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 is returned if a value other than a local port specified socket UDP port number is
specified.
Status: Transmission error (TermSTS = 0BH)
Detailed information: Port number error (0071H)
Socket identifier (1 to 8)
Local port specified socket UDP port number
(1024 to 65535)
SportNO: Socket identifier (1 to 8)
TermSTS:See tables 4.3 and 4.4.
Detail information: See table 4.5.