8-13
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
-6 Sample Prog
ra
mming f
or CIP Connectio
nless
(U
CMM) Message Comm
unications
Use the following procedure to create a variable in the variable table.
1
Select the Array Check Box.
2
Specify the element first number, the element last number, and the data type.
Example: UINT Array
CIP Communications Instructions That Use Array Variables
This sample uses CIP UCMM messages to write a variable, read a variable, and send a message. The
Controllers are connected to an EtherNet/IP network. The IP address of the remote node is
192.168.250.2. The following procedure is used.
1
The CIPUCMMWrite instruction is used to write the value of a variable at a remote node. The
variable name at the remote node is WritingDat and the contents of the WriteDat is written to it.
WritingDat must be defined as a global variable at the remote node and the Network Publish
attribute must be set.
2
The CIPUCMMRead instruction is used to read the value of a variable at a remote node. The
value of the variable OriginalDat at the other node is read and the read value is stored in the
ReadDat variable. OriginalDat must be defined as a global variable at the remote node and the
Network Publish attribute must be set.
3
The CIPUCMMSend instruction is used to send an explicit message to a remote node. The con-
tents of the message is to read identity information (product name). The class ID, instance ID,
attribute ID, and service code are as follows. The response data is stored in the RespDat vari-
able.
Instruction
Structure variable name
Input variable
In-out variable
Output variable
CIPRead
---
---
DstDat (Read Data)
CIPWrite
SrcDat (Write Data)
---
---
CIPSend
ServiceDat (Command
Data)
RespServiceDat (Response
Data)
---
8-2-6
Sample Programming for CIP Connectionless (UCMM) Message
Communications
Item
Value
Class ID
1
Instance ID
1
Attribute ID
7
Service code
16#0E
Specifies the data type.
Specify the array element first
number and last number.
Data type
Array
Variable name
Variable table
Summary of Contents for SYSMAC CJ1W-EIP21
Page 8: ...Manual Structure 6 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Page 42: ...Revision History 40 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Page 68: ...1 Introduction 1 26 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Page 266: ...9 FTP Server 9 20 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Page 431: ...Index 1 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495 I Index...
Page 436: ...Index 6 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495 Index...
Page 437: ......