Precautions In Using Socket Services; Precautions For Udp And Tcp Socket Services; Precautions For Udp Socket Services; Precautions For Tcp Socket Services - Omron NJ Series User Manual

Machine automation controller, cpu unit built-in ethernet/ip port
Hide thumbs Also See for NJ Series:
Table of Contents

Advertisement

9-7

Precautions in Using Socket Services

9-7-1

Precautions for UDP and TCP Socket Services

• Communications processing are sometimes delayed when multiple functions of the built-in
EtherNet/IP port are used simultaneously or due to the contents of the user program.
• Communications efficiency is sometimes reduced by high communications traffic on the network
line.
• The close processing for a close request instruction discards all of the buffered send and receive
data for the socket.
For example, send data for a send request which is issued immediately before the close processing
may not be sent.
• After a socket is open, the built-in EtherNet/IP port provides a receive buffer of 9,000 bytes per TCP
socket and 9,000 bytes per UDP socket to enable data to be received at any time.
If the receive buffer is full, data received by the socket is discarded. Make sure that the user applica-
tion constantly issues receive requests to prevent the internal buffer from becoming full.
9-7-2

Precautions for UDP Socket Services

• The destination IP address can be set to a broadcast address for a UDP socket to broadcast data to
all nodes on the network.
However, in this case, the maximum length of send data is 1,472 bytes.
Data divided into multiple fragments (1,473 bytes or more in UDP) cannot be sent.
• UDP sockets do not perform controls intended to secure the reliability of communications, such as
confirming if the send data is received. To improve the reliability of communications when you use
UDP sockets, make sure the user program confirms that data is sent and resends the data when
necessary.
9-7-3

Precautions for TCP Socket Services

• If the TCP socket is closed on the remote node without warning during communications (i.e., if the
connection is closed), the socket at the local node must also be closed.
You can use the Read TCP Socket Status instruction (SktGetTCPstatus) to see if the connection is
closed.
Immediately close the socket at the local node if the TCP socket at the remote node is closed.
• If the remote node's TCP socket closes without warning, the data to send may remain in the buffer
at the local node. The remaining data is discarded in the local node's TCP close processing.
The steps that are required in applications to avoid this include sending data from the sending node
that permits closing and closing the socket only after checking the remote node.
• While open processing is performed for a TCP socket, a port that was closed first cannot be opened
again for 60 seconds from the time the close processing is performed for the remote socket.
However, this is not true if you specified 0 (automatic assignment by the Unit) as the port for the
SktTCPConnect instruction.
• You can open a connection by performing Connect from one socket to another socket that is open
with Accept. Connections cannot be opened if you attempt Connect from one socket to another
socket which is open with Connect.
NJ/NX-series CPU Unit Built-in EtherNet/IP Port User's Manual (W506)
9 Socket Service
9
9-29

Advertisement

Table of Contents
loading

Table of Contents