EasyManuals Logo
Home>Omron>Controller>NX102-12 Series

Omron NX102-12 Series User Manual

Omron NX102-12 Series
578 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #381 background imageLoading...
Page #381 background image
// Start sequence when Trigger changes to TRUE.
IF ((Trigger=TRUE) AND (DoTCP=FALSE) AND (_EIP_EtnOnlineSta=TRUE)) THEN
DoTCP :=TRUE;
Stage :=INT#1;
SktTCPAccept_instance(Execute:=FALSE); // Initialize instance.
SktTCPSend_instance( // Initialize instance.
Execute :=FALSE,
SendDat :=SendSocketDat[0]); // Dummy
SktTCPRcv_instance( // Initialize instance.
Execute :=FALSE,
RcvDat :=RcvSocketDat[0]); // Dummy
SktClose_instance(Execute:=FALSE); // Initialize instance.
END_IF;
IF (DoTCP=TRUE) THEN
CASE Stage OF
1 : // Request to accept a s
ocket connection
SktTCPAccept_instance(
Execute :=TRUE,
SrcTcpPort :=UINT#6000, // Local TCP port number
TimeOut :=UINT#0, // Timeout value
Socket =>WkSocket); // Socket
IF (SktTCPAccept_instance.Done=TRUE) THEN
Stage :=INT#2; // Normal end
ELSIF (SktTCPAccept_instance.Error=TRUE) THEN
Stage :=INT#10; // Error end
END_IF;
2 : // Receive request
SktTCPRcv_instance(
Execute :=TRUE,
Socket :=WkSocket, // Socket
TimeOut :=UINT#0, // Timeout value
Size :=UINT#2000, // Receive data size
RcvDat :=RcvSocketDat[0]); // Receive data
IF (SktTCPRcv_instance.Done=TRUE) THEN
Stage :=INT#3; // Normal end
ELSIF (SktTCPRcv_instance.Error=TRUE) THEN
Stage :=INT#20; // Error end
END_IF;
3 : // Send request
SendSocketDat:=RcvSocketDat;
9 Socket Service
9-27
NJ/NX-series CPU Unit Built-in EtherNet/IP Port User’s Manual (W506)
9-6 Details on Using the Socket Services
9
9-6-5 TCP Sample Programming

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NX102-12 Series and is the answer not in the manual?

Omron NX102-12 Series Specifications

General IconGeneral
BrandOmron
ModelNX102-12 Series
CategoryController
LanguageEnglish

Related product manuals