Omron NJ Series User Manual page 556

Machine automation controller, cpu unit built-in ethernet/ip port
Hide thumbs Also See for NJ Series:
Table of Contents

Advertisement

Appendices
Structures
For a structure variable, the members are located in memory in the order that they are declared. Each
member is located at an integer multiple of the alignment of the data type of the member. Therefore,
there can be unused memory between members or at the end of members. The alignment of a struc-
ture is the largest alignment of all of the members. The amount of memory that is allocated is the inte-
gral multiple of the alignment that is larger than the total amount of memory that is allocated when the
members are arranged in order at integral multiples of the alignment of the data types of the members.
Example: The alignments and the amounts of memory that are allocated for the four variable declara-
tions given in the following figure are given in the following table.
Variable
A
4
B
4
C
4
D
4
A-52
Alignment [bytes]
NJ/NX-series CPU Unit Built-in EtherNet/IP Port User's Manual (W506)
Amount of memory that is allocated
[bytes]
8
8
16
16

Advertisement

Table of Contents
loading

Table of Contents