EasyManuals Logo
Home>Omron>Computer Hardware>Sysmac NJ-series

Omron Sysmac NJ-series User Manual

Omron Sysmac NJ-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 #554 background imageLoading...
Page #554 background image
Appendices
A-52
NJ/NX-series CPU Unit Built-in EtherNet/IP Port User’s Manual (W506)
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 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 variables to exchange data with devices other than CPU Units, such as ID Tags
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 declarations
that are made for the arrays, structures, and unions.
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 auto-
matically structured by the Controller for the most efficient access. Therefore, the total amount of mem-
ory 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.
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 vari-
ables are given below.
A-5-1 Variable Memory Allocation Rules
Data Type Alignment and Memory Allocation Amounts
Item Specification
Amount of memory that is allocated An integral multiple of the alignment. However, the minimum amount of
memory is the data size.
Locations in memory At an integral multiple of the alignment starting from the start of the vari-
able in memory.
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

Table of Contents

Other manuals for Omron Sysmac NJ-series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron Sysmac NJ-series and is the answer not in the manual?

Omron Sysmac NJ-series Specifications

General IconGeneral
BrandOmron
ModelSysmac NJ-series
CategoryComputer Hardware
LanguageEnglish

Related product manuals