l
Creating Array Variables
To input a value into the array variable of a CIP communications instruction, you must create a vari-
able with the same configuration as the array variable in advance.
Example: Creating a Variable to Input Data to the CIPSend Instruction Array V
ariables
Variable D
RespSize
(Respo
nse
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 data (
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 elemen
ts: 2
[1]
[0]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
Variable D
: 10
Array v
ariable: 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
Specifies the data type.
Variable table
A
Variable name
Data type
ARRAY[0..19] OF UINT
10 CIP Message Communications
10-17
NX-series EtherNet/IP Unit User's Manual (W627)
10-2 Client Function of CIP Mes-
sage Communications
10
10-2-6 Service Data and Response Data