![background image](http://html1.mh-extra.com/html/omron/sysmac-nx1p2-10-1-series/sysmac-nx1p2-10-1-series_user-manual_1633435383.webp)
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.
9 Socket Service
9-29
NJ/NX-series CPU Unit Built-in EtherNet/IP Port User’s Manual (W506)
9-7 Precautions in Using Socket Services
9
9-7-1
Precautions for UDP and TCP Socket Services
Содержание Sysmac NX1P2-10 1 Series
Страница 8: ...Manual Structure 6 NJ NX series CPU Unit Built in EtherNet IP Port User s Manual W506...
Страница 34: ...Revision History 32 NJ NX series CPU Unit Built in EtherNet IP Port User s Manual W506...
Страница 174: ...6 Testing Communications 6 4 NJ NX series CPU Unit Built in EtherNet IP Port User s Manual W506...
Страница 354: ...8 CIP Message Communications 8 92 NJ NX series CPU Unit Built in EtherNet IP Port User s Manual W506...
Страница 388: ...9 Socket Service 9 34 NJ NX series CPU Unit Built in EtherNet IP Port User s Manual W506...
Страница 394: ...10 Modbus TCP Master Function 10 6 NJ NX series CPU Unit Built in EtherNet IP Port User s Manual W506...
Страница 430: ...12 FTP Client 12 14 NJ NX series CPU Unit Built in EtherNet IP Port User s Manual W506...
Страница 569: ...I Index I 1 NJ NX series CPU Unit Built in EtherNet IP Port User s Manual W506 I...
Страница 576: ...Index I 8 NJ NX series CPU Unit Built in EtherNet IP Port User s Manual W506...
Страница 577: ......