6-41
6 Programming
NJ-series CPU Unit Software User’s Manual (W501)
6-3 Variables
6
6-3-6 Derivative Data Types
Data Types of Structure Members
Arrays and Structures
You can set an array in which the elements are structures. You can also set a structure in which the
members are arrays.
Specifying Structure Member Offsets
When you specify an offset for a member, you can set the memory configuration of the members as
required for each structure data type. This allows you to align the memory configuration of the mem-
bers of the structure data type when you use tag data links with CJ-series CPU Units or with other
external devices. You can select NJ, CJ, or User as the offset type for structure members. If you
select NJ, the memory configuration that is optimum for the NJ Series is automatically used. Refer to
A-7 Variable Memory Allocation Methods for details on the memory configuration of NJ-series Con-
trollers. Refer to A-7-2 Important Case Examples for examples of tag data lings with CJ-series CPU
Units.
The meanings of the offset type are as follows:
Number of mem-
bers
1 to 2,048
Nesting depth of
structures
Maximum of 8 levels (however, a member name must be 511 bytes or less, including the
variable name)
Maximum size of
one structure vari-
able
No restrictions
Classification Data type Usage
Basic data types Boolean, bit string, integer, real, duration, date, time of day, date
and time, or text string data
Supported.
Array of Boolean, bit string, integer, real, duration, date, time of
day, date and time, or text string data
Supported.
Derivative data types Arrays (see note), unions, and enumerations
Note Recursions and loops are not allowed. (An error will occur
when the program is checked.)
Supported.
Array specifications for structures, unions, and enumerations Supported.
POU instances Not sup-
ported.
Offset type Meaning
NJ The memory configuration that is optimum for the NJ-series Controllers is
automatically used and operating speed is maximized.
CJ The memory configuration for CJ-series PLCs is automatically used. This
allows you to use the same memory configuration as a CJ-series CPU Unit.
User You can set the memory offsets for each member. This allows you to use the
same memory configuration as external devices other than CJ-series CPU
Units.
Item Specification