2 Instruction Descriptions
2-756
NJ-series Instructions Reference Manual (W502)
• The port that is specified with ScrUdpPort is already in use.
In this sample, the UDP socket service is used for data communications between the NJ-series Control-
ler and a remote node.
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.
Sample Programming
IP address: 192.168.250.1
UDP port number: 6000
Ethernet line
Built-in EtherNet/IP port
Data received.
Remote node
IP address: 192.168.250.2
UDP port number: 6001
Data sent.