Var
iable D
RespSize
(Re
sponse
Data Size)
ResServiceDat
(Response Data)
Size
(Number of Elements)
ServiceDat
(Command Data)
Variable C
Variable B
Variable A
CIP communications instruction
(1)
(2)
CIPSend
(1) Input the service data to send
The data to send is stored in array variable A.
If only certain elements are specified in array var-
iable A, specify the number of elements in varia-
ble B.
(2) Store received response data
The data that is received is stored in variable C.
The byte size of the data that was actually re-
ceived is stored in variable D.
If the service d
ata (ServiceDat) is
Array[2] and
number of elements
(Size) = 2, Array[2] and Array[3]
are sent.
Array variable: A
[0]
[1
]
[2]
[3]
Number of ele
ments: 2
[1]
[0]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
Variable D
: 1
0
Array variable: C[0..9
]
Use the following procedure to create a variable in the variable table.
Specify the element first number
, the element last number, and the data type.
Example: UINT Array
Specifi
es the data type.
Specify the array element first
number and last number.
Data type
Array
Variable name
Variable table
CIP Communications Instructions That Use Array Variables
Instruction
Structure variable name
Input variable In-out variable Output variable
CIPRead --- --- DstDat (Read Data)
CIPWrite SrcDat (Write Data) --- ---
CIPSend ServiceDat (Command Da-
ta)
ResServiceDat (Response
Data)
---
8 CIP Message Communications
8-21
NJ/NX-series CPU Unit Built-in EtherNet/IP Port User’s Manual (W506)
8-2 CIP Message Communications Client Function
8
8-2-6 Service Data and Response Data