EasyManua.ls Logo

Omron NX102-12 Series - Page 295

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 (CIPWrite_instance.Error=TRUE) THEN
Stage :=INT#20; // Error end
END_IF;
3 : // Request reading value
of variable.
CIPRead_instance(
Execute :=TRUE,
Handle :=CIPOpen_instance.Handle, // Handle
SrcDat :='OriginalDat', // Source variable name
Size :=UINT#1, // Number of elements to
read
DstDat :=ReadDat); // Read data
IF (CIPRead_instance.Done=TRUE) THEN
Stage :=INT#4; // Normal end
ELSIF (CIPRead_instance.Error=TRUE) THEN
Stage :=INT#30; // Error end
END_IF;
4 : // Send message
ReqPath.ClassID :=UINT#01;
ReqPath.InstanceID :=UINT#01;
ReqPath.isAttributeID:=TRUE;
ReqPath.AttributeID :=UINT#07;
CIPSend_instance(
Execute :=TRUE,
Handle :=CIPOpen_instance.Handle, // Handle
ServiceCode :=BYTE#16#0E, // Service code
RqPath :=ReqPath, // Request path
ServiceDat :=Dummy, // Service data
Size :=UINT#0, // Number of elements
RespServiceDat :=RespDat); // Response data
IF (CIPSend_instance.Done=TRUE) THEN
Stage :=INT#5; // Normal end
ELSIF (CIPSend_instance.Error=TRUE) THEN
Stage :=INT#40; // Error end
END_IF;
5 : // Request closing CIP c
lass 3 connection.
CIPClose_instance(
Execute :=TRUE,
Handle :=CIPOpen_instance.Handle); // Handle
8 CIP Message Communications
8-33
NJ/NX-series CPU Unit Built-in EtherNet/IP Port Users Manual (W506)
8-2 CIP Message Communications Client Function
8
8-2-8 Sample Programming for CIP Connection (Class 3) Message
Communications

Table of Contents

Related product manuals