EasyManuals Logo

Omron CJ1W-EIP21 User Manual

Omron CJ1W-EIP21
438 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 #231 background imageLoading...
Page #231 background image
8-25
8 Message Communications
CJ-series EtherNet/IP Units Operation Manual for NJ-series CPU Unit (W495)
8-2 Using CIP Message Communications
8
8-2-7 Sample Programming for CIP Connection
(Class 3) Message Communications
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 class 3 connection.
CIPClose_instance(
Execute :=TRUE,
Handle :=CIPOpen_instance.Handle); // Handle
IF (CIPClose_instance.Done=TRUE) THEN
Stage :=INT#0;
ELSIF (CIPClose_instance.Error=TRUE) THEN
Stage :=INT#50;
END_IF;
0: // Processing after normal end
DoCIPTrigger:=FALSE;
Trigger :=FALSE;
ELSE // Processing after error end
DoCIPTrigger :=FALSE;
Trigger :=FALSE;
END_CASE;
END_IF;

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CJ1W-EIP21 and is the answer not in the manual?

Omron CJ1W-EIP21 Specifications

General IconGeneral
BrandOmron
ModelCJ1W-EIP21
CategoryController
LanguageEnglish

Related product manuals