8-67
8 CIP Message Communications
NJ/NX-series CPU Unit Built-in EtherNet/IP Port User’s Manual (W506)
8-7 Variable Data Types
8
8-7-4 Derived Data Types
• Handling Multi-dimensional Array
Elements for a multi-dimensional array are given in order from the deepest elements. For exam-
ple, the data is read in the following format when Var is specified for a variable defined with UINT
Var[2][2].
Data Format
The following data format is used for a BOOL array (using BOOL b[2][3] as an example).
Data Format
• Exceptions When Specifying the Num of Element Field
The following data format is used if a specification is made in the Num of Element field for a BOOL
array. (Refer to 8-4-5 Specifying Variable Names in Request Paths for information on the Num of
Element field.) The status (TRUE/FALSE) is given in order for each element of the BOOL variable.
Data Format
Structure Variables
• Accessing an Entire Structure
If a structure variable is specified, it is treated as an access request for all of the members of the
structure.
Data Format
USINT C7 hex Data type code for UINT
USINT 00 hex
UINT Value of Var[0][0] (L)
(H)
UINT Value of Var[0][1] (L)
(H)
UINT Value of Var[1][0] (L)
(H)
UINT Value of Var[1][1] (L)
(H)
USINT C1 hex (data type code for BOOL)
USINT 00 hex
(WORD)
rsv rsv rsv rsv rsv rsv rsv rsv
rsv rsv b[1][2] b[1][1] b[1][0] b[0][2] b[0][1] b[0][0]
USINT Data Type C1 hex
USINT 00 hex
UINT Num of Elem (L) Gives the number of elements in the array.
(H)
USINT Status 01 hex: TRUE, 00 hex: FALSE
::
USINT Status
USINT Data Type A0 Hex (Abbreviated STRUCT)
USINT 02 hex
UINT CRC (L) CRC value for the structure definition
(H)
UINT Num of Elem (L) 01 hex
(H) 00 hex
:
Data
: