111
Overview Section 6-1
6-1-9 Precautions in Using Socket Services
UDP and TCP Socket
Services
• If a short response monitor time is specified in CMND(490) control data
and the Ethernet Unit is operating under a high load, a result may be
stored even if the response code indicates a time-out. If this occurs,
increase the monitor time specified with CMND(490).
• The socket status area in the CIO Area is zeroed when the PC’s operating
mode is changed (e.g., from PROGRAM to RUN). The actual Ethernet
Unit socket status, however, will remain unchanged after the socket status
area is zeroed. To avoid this problem, use the IOM Hold setting in the PC
Setup. Refer to the PC’s operation manuals for details on settings.
• The Results Storage Error Flag will turn ON in the socket status to indi-
cate that the specified Results Storage Area does not exist in the PC. Cor-
rect the user program.
• Communications time may increase if multiple Ethernet Unit functions are
used simultaneously or due to the contents of the user program.
• Communications efficiency may decrease due to high communications
loads on the network.
• All data is flushed from the socket’s communications buffer when a socket
is closed with the CLOSE REQUEST command. In some cases, the
transmit data for the SEND REQUEST command issued just before the
socket was closed may not be sent.
• When sockets are open, the Ethernet Unit provides a 4,096-byte buffer for
each TCP socket and 9,016-byte buffer for each UDP socket to allow data
to be received at any time. These buffers are shared by all open sockets.
Receive data will be discarded for a socket if the buffer becomes full. The
user application must therefore issue RECEIVE REQUEST commands
frequently enough to prevent the internal buffers from becoming full.
UDP Socket Service • The UDP socket sets a broadcast address for the remote node address to
broadcast data to all nodes of the network simultaneously. The maximum
length of broadcast data is 1,472 bytes. Data in multiple fragments (over
1,473 bytes for a UDP socket) cannot be broadcast.
• The UDP socket does not check the transmitted data to ensure communi-
cations reliability. To increase communication reliability, communications
checks and retries must be included in the user application program.
TCP Socket Service • If the TCP socket of the remote node closes (the connection is broken)
during communications, the TCP socket at the local node must also be
closed. The communications Results Storage Area can be used to check
if the connection has been broken. Close the local socket immediately
after detecting that the remote TCP socket has closed. The following situ-
ations indicate that the remote socket has closed.
TCP Receive Results Storage Area:
Response code = 004B (error at remote node)
TCP Send Results Storage Area:
Response code = 0020 (connection broken with remote socket during
transmission)
Remote send processing time 10 x 5 + 20 x 2 + 30 = 120 ms
Remote receive processing time 10 x 5 + 20 x 2 + 30 = 120 ms
Maximum transmission delay 95 + 95 + 120 + 120 = 430 ms
Item Formula