96
Ethernet module User’s Manual
Chapter 6 Socket Interface Communication
6
6.2.3
Socket port numbers
(1) Set the port numbers for local TCP and UDP sockets to values in the range 1024 to
65535. The EN311 will issue an error if any other values are used. This is because
the port numbers from 1 to 1023 are allocated for UNIX workstation standard
services.
(2) There are cases where there are reserved ports with numbers outside the 1 to 1023
range on specific workstations. Verify this on the workstations actually being used,
and be sure that these reserved port numbers are not duplicated on the EN311.
(3) The same port number cannot be assigned to multiple sockets for TCP and UDP
sockets. Be especially careful not to duplicate UDP port numbers used for message
transmission (computer link protocol/PC link protocol transmission).
(4) When TCP sockets and UDP sockets are used together in the same EN311, the
same port number cannot be used for both TCP and UDP sockets.
6.2.4
General precautions for UDP/TCP socket
(1) Careful attention to changes in bits in the socket status is required when using socket
transmission requests.
(2) Using multiple EN311 functions at the same time or particular user program may
cause slower communication processing.
(3) Communication efficiency may degrade if the network to which the EN311 is
connected is heavily loaded.
(4) Since processing a close request requires processing the send and receive requests
issued to that socket before the close request was issued, a significant amount of
time may be required to process some close requests.
(5) The EN311 includes a reception buffer (of about 60 Kbytes) to hold data addressed
to the local station. Since a TCP socket can receive up to a maximum of 5,840 bytes
of data, it is impossible even for eight TCP sockets to fill up this buffer, which is 60K
bytes.
With UDP sockets, there is no limit on the receive data quantity per socket; therefore,
in the event that data have been sent from other nodes to an open socket, the
receive buffer may become full unless the data being received by the socket is taken
over by the S controller side. In this case, the newly arrived data will be damaged
thus making data transmission impossible (the transmission request will end in
"Resource shortage error").
To avoid this situation, make sure to use the user program to issue constantly receive
requests to read data from the receive buffer or use the socket status (see section
6.3, "Socket Interface Information") to monitor the availability of receive data to
perform the receiving. If a "resource shortage error" occurs without taking over the
receive data, resolve the problem by closing the socket where the receive data has
accumulated.
(6) Since EN311 receive requests (both TCP and UDP) put the object socket in a wait
state waiting for data from the remote node, transmission over that socket is not
possible.
If full-duplex communication with the remote node is required, set up two sockets,
one for transmission and one for reception.
(7) There are a total of eight requests used for socket interface transmission. The S
controller waits internally for completion for the timeout for the following five types of
those:
• UDP open, send, and close requests
• TCP send and close requests
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: ......