![background image](http://html1.mh-extra.com/html/omron/sysmac-cj1w-eip21/sysmac-cj1w-eip21_operation-manuals_742257229.webp)
8-23
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
ST
// Start sequence when Trigger changes to TRUE.
IF ((Trigger=TRUE) AND (DoCIPTrigger=FALSE) AND (J01_ETNOnlineSta=TRUE))THEN
DoCIPTrigger:=TRUE;
Stage
:=INT#1;
CIPOpen_instance(Execute:=FALSE);
// Initialize instance.
CIPWrite_instance(
Execute
:=FALSE,
// Initialize instance.
SrcDat
:=WriteDat);
// Dummy
CIPRead_instance(
// Initialize instance.
Execute
:=FALSE,
// Dummy
DstDat
:=ReadDat);
// Dummy
CIPSend_instance(
Execute
:=FALSE,
// Initialize instance.
ServiceDat
:= Dummy,
// Dummy
RespServiceDat
:=RespDat);
// Dummy
CIPClose_instance(Execute:=FALSE);
// Initialize instance.
END_IF;
Internal
Variables
Variable
Data type
Initial value
Comment
Trigger
BOOL
False
Execution condition
DoCIPTrigger
BOOL
False
Processing
Stage
INT
0
Status change
WriteDat
INT
0
Write data
ReadDat
INT
0
Read data
RoutePathDat
string[256]
01\#10\02\192.168.250.1\01\#00
Route path
ReqPath
_sREQUEST_
PATH
(ClassID:=0, InstanceID:=0,
isAttributeID:=False, AttributeID:=0)
Request path
RespDat
ARRAY[0..10] OF
BYTE
[11(16#0)]
Response data
Dummy
BYTE
16#0
Dummy
CIPOpen_instance
CIPOpen
CIPWrite_instance
CIPWrite
CIPRead_instance
CIPRead
CIPSend_instance
CIPSend
CIPClose_instance
CIPClose
External
Variables
Variable
Data type
Constant
Comment
J01_ETNOnlineSta
BOOL
Online
Содержание 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: ......