Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

• You can execute a maximum of 32 of the following instructions at the same time: SktUDPCreate,
SktUDPRcv, SktUDPSend, SktTCPAccept, SktTCPConnect, SktTCPRcv, SktTCPSend, SktGetTCP-
Status, SktClose, SktClearBuf, and SktSetOption.
• An error occurs in the following cases. Error will change to TRUE.
• There is a setting error for the local IP address.
• The value of SrcUdpPort is outside of the valid range.
• The port that is specified with SrcUdpPort is already open or close processing is in progress for it.
• The port that is specified with ScrUdpPort is already in use.
Version Information
• The number of sockets that you can open at the same time depends on the unit version of the
CPU Unit as shown in the following table. These limits are the totals for both UDP and TCP
sockets.
Unit version of CPU Unit
1.03 or higher
1.02 or lower
• For CPU Unit version 1.10 or later, the value of Socket does not change even if Error changes
to TRUE. For version 1.09 or earlier, the value of Socket changes to 0.
Sample Programming
In this sample, the UDP socket service is used for data communications between the NJ/NX-series
Controller and a remote node.
IP address: 192.168.250.1
UDP port number: 6000
Built-in EtherNet/IP port
The processing procedure is as follows:
1
The SktUDPCreate instruction is used to request creating a UDP socket.
2
The SktUDPSend instruction is used to request sending data. The data in SendSocketDat[] is
sent.
3
The SktUDPRcv instruction is used to request receiving data. The received data is stored in
RcvSocketDat[].
4
The SktClose instruction is used to close the socket.

NY-series Instructions Reference Manual (W560)

Number of sockets
30 max.
16 max.
IP address: 192.168.250.2
UDP port number: 6001
Data sent.
Remote node
Data received.
Ethernet line
2 Instruction Descriptions
2-1047
2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents