![background image](http://html1.mh-extra.com/html/omron/sysmac-cj1w-eip21/sysmac-cj1w-eip21_operation-manuals_742257231.webp)
8-25
8 Message Communications
CJ-series EtherNet/IP Units Operation Manual for NJ-series CPU Unit (W495)
8-2 Using
CIP Messa
g
e Co
mm
un
icati
ons
8
8
-2
-7 Sample Prog
ra
mming f
o
r CIP Connection
(C
lass
3) Messa
ge Comm
unications
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;
Содержание SYSMAC CJ1W-EIP21
Страница 8: ...Manual Structure 6 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 10: ...Sections in this Manual 8 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 20: ...Read and Understand this Manual 18 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 42: ...Revision History 40 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 68: ...1 Introduction 1 26 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 80: ...2 Installing Ethernet Networks 2 12 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 130: ...6 Testing Communications 6 4 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 206: ...7 Tag Data Link Functions 7 76 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 246: ...8 Message Communications 8 40 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 266: ...9 FTP Server 9 20 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 374: ...13 Troubleshooting 13 56 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 431: ...Index 1 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495 I Index...
Страница 436: ...Index 6 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495 Index...
Страница 437: ......