EasyManuals Logo

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 #376 background imageLoading...
Page #376 background image
4 : // Request to close the
socket
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;
9-6-5
TCP Sample Programming
In this sample, the TCP socket service is used for data communications between the NJ/NX-series
Controller and a remote node.
In this example, programming is also required in the remote node. The order of sending and receiving
is reversed in comparison with the above procedure.
IP address: 192.168.250.1
TCP port number: Automatically assigned.
Ethernet line
Built-in EtherNet/IP Port
Data received.
Remote node
IP address: 192.168.250.2
TCP port number: 6000
Data sent.
Local Node Programming
The processing procedure at the local node is as follows:
1 The SktTCPConnect instruction is used to make a request for connection to the TCP port on
the remote node.
2 The SktClearBuf instruction is used to clear the receive buffer of a TCP socket.
9 Socket Service
9-22
NJ/NX-series CPU Unit Built-in EtherNet/IP Port User’s Manual (W506)

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