EasyManua.ls Logo

Omron NX102-12 Series - Page 373

Omron NX102-12 Series
578 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Stage :=INT#3; // Normal end
ELSIF (SktUDPSend_instance.Error=TRUE) THEN
Stage :=INT#20; // Error end
END_IF;
3 : // Receive request
SktUDPRcv_instance(
Execute :=TRUE,
Socket :=WkSocket, // Socket
TimeOut :=UINT#0, // Timeout value
Size :=UINT#2000, // Receive data size
RcvDat :=RcvSocketDat[0]); // Receive data
IF (SktUDPRcv_instance.Done=TRUE) THEN
Stage :=INT#4; // Normal end
ELSIF (SktUDPRcv_instance.Error=TRUE) THEN
Stage :=INT#30; // Error end
END_IF;
4 : // Requestto close the s
ocket
SktClose_instance(
Execute :=TRUE,
Socket :=WkSocket); // Socket
IF (SktClose_instance.Done=TRUE) THEN
Stage :=INT#0; // Normal end
ELSIF (SktClose_instance.Error=TRUE) THEN
Stage :=INT#40; // Error end
END_IF;
0 : // Normal end
DoSendAndRcv :=FALSE;
Trigger :=FALSE;
ELSE // Interrupted by error.
DoSendAndRcv :=FALSE;
Trigger :=FALSE;
END_CASE;
END_IF;
Remote Node Programming
The processing procedure at the remote node is as follows:
1 The SktUDPCreate instruction is used to make a request to create a UDP socket.
9 Socket Service
9-19
NJ/NX-series CPU Unit Built-in EtherNet/IP Port Users Manual (W506)
9-6 Details on Using the Socket Services
9
9-6-4 UDP Sample Programming

Table of Contents

Related product manuals