EasyManuals Logo
Home>Omron>Controller>NX102-12 Series

Omron NX102-12 Series User Manual

Omron NX102-12 Series
578 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #550 background imageLoading...
Page #550 background image
A-5
Variable Memory Allocation Methods
You must be aware of the way in which memory is allocated to variables to align the memory locations
of the members of structure or union variables with variables in other devices. Adjustments are neces-
sary mainly when structure or union variables are used in the following type of communications with
other devices.
• When using EtherNet/IP tag data links or CIP messages to access variables between NJ/NX-series
CPU Units and other CPU Units
• When using structure or union variables to exchange data with devices other than CPU Units, such
as ID Tags
A-5-1
Variable Memory Allocation Rules
The amount of memory and the memory locations that are allocated for a variable depend on the data
type of the variable. The amount of memory and the memory locations that are allocated for array ele-
ments, structure members, and union members depend on the data types, but also on the declara-
tions that are made for the arrays, structures, and unions.
Data Type Alignment and Memory Allocation Amounts
The data size is determined for each data type. The data size is the minimum amount of memory that
is required to store the value or values of that data type.
On the other hand, memory for variables is automatically structured by the Controller for the most effi-
cient access. Therefore, the total amount of memory that is required for variables is not necessarily the
total of the data sizes of the variables. For example, if WORD and DWORD variables are declared, the
total of the data sizes is six bytes, but eight bytes are allocated in memory, as shown in the following
figure.
Variable Table
Name
A
B
Data type
WORD
DWORD
Variable A
Variable B
Bytes
Memory
First byte
First byte + 1
First byte + 2
First byte + 3
First byte + 4
First byte + 5
First byte + 6
First byte + 7
WORD data: 2 bytes
Not used: 2 bytes
DWORD data: 4 bytes
This information for determining the location of a variable in memory is called the alignment. The align-
ment is determined for each data type. The amount of memory and the memory locations for the varia-
bles are given below
.
Item Specification
Amount of memory that is allo-
cated
An integral multiple of the alignment. However, the minimum amount
of memory is the data size.
Appendices
A-46
NJ/NX-series CPU Unit Built-in EtherNet/IP Port User’s Manual (W506)

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NX102-12 Series and is the answer not in the manual?

Omron NX102-12 Series Specifications

General IconGeneral
BrandOmron
ModelNX102-12 Series
CategoryController
LanguageEnglish

Related product manuals