![background image](http://html1.mh-extra.com/html/omron/cs1w-etn01/cs1w-etn01_operation-manuals_742528105.webp)
6-1
Section
Overview
93
•
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 indicate that
the specified Results Storage Area does not exist in the PC. Correct 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 applica-
tion must therefore issue RECEIVE REQUEST commands frequently enough
to prevent the internal buffers from becoming full.
•
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 communica-
tions reliability. To increase communication reliability, communications checks
and retries must be included in the user application program.
•
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 situations indicate that the re-
mote 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 trans-
mission)
•
Data can remain in a buffer at the local node if the remote TCP socket closes
during communications. Any data remaining in the buffer will be discarded
when the TCP socket is closed. To avoid problems of this nature, steps will
have to be taken in the application program, such as sending data to enable
closing, and then only closing once reception of this data has been confirmed.
•
When closing a connection for a TCP socket, the first port to be closed cannot
be reopened for at least 60 seconds after the other port closes. However, this
restriction does not apply for a port opened using the TCP ACTIVE OPEN RE-
QUEST command with a local TCP port number of 0 (port number automatical-
ly assigned) which is closed from the side that actively opened the socket.
•
A connection is established for a passively opened socket by actively opening
it from another socket. You cannot actively open multiple connections to a
socket passively opened at the Ethernet Unit.
UDP Socket Service
TCP Socket Service