Precautions In Using Socket Services; Precautions For Udp And Tcp Socket Services; Precautions For Udp Socket Services; Precautions For Tcp Socket Services - Omron NY532-5400 User Manual

Ny-series ipc machine controller industrial panel pc / industrial box pc
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

9 Socket Service
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 Ether-
Net/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 from a send request instruction immediately before the
close processing is sometimes not 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 buf-
fer is full, data received by that socket is discarded. Make sure that the user application always exe-
cutes 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 lengths broken into multiple fragments (1,473 bytes or more in UDP) cannot be sent.
• For UDP socket, controls to confirm the reliability of communications, such as the confirmation of
send data, are not performed. To improve the reliability of communications when you use UDP sock-
ets, make sure the user program confirms that data is sent and resends 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. How-
ever, this is not true if you specified 0 (automatic assignment by the Unit) as the port for the SktTCP-
Connect instruction.
• You can use Connect from another socket to open a connection to a socket that was opened with
Accept. A connection is not opened if you try to use Connect from another socket to open a connec-
tion to a socket that was opened with Connect. Also, a connection is not opened if you attempt to use
Accept from another socket to open a socket that was opened with Accept. Furthermore, you cannot
use Connect from more than one other node to establish multiple connections with a single TCP
socket that was opened with Accept on the built-in EtherNet/IP port.
• You can use the keep-alive function for TCP sockets at the built-in EtherNet/IP port. The keep alive
function checks whether a connection is normally established when no data is sent or received for a
certain period on the communications line where the connection was established. The built-in Ether-
Net/IP port responds to checks from other nodes even if keep alive is not specified.
9-30
NY-series Industrial Panel PC / Industrial Box PC Built-in EtherNet/IP Port User's Manual (W563)

Advertisement

Table of Contents
loading

Table of Contents