EasyManua.ls Logo

Omron NJ501-1300 - A-4 Variable Memory Allocation Methods

Omron NJ501-1300
398 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
Loading...
A-11
Appendices
NJ-series CPU Unit Built-in EtherNet/IP Port Users Manual (W506)
A-4 Variable Memory Allocation Methods
App
A-4-1 Variable Memory Allocation Rules
A-4 Variable Memory Allocation Methods
When you assign an NJ-series CPU Unit structure variable to a tag and create a tag data link between
an NJ-series CPU Unit and another CPU Unit, or when you use CIP messages to access variables, you
must align the memory locations of the structure variable members with those of the other device.
Variables are stored at locations in memory that are multiples of the alignment values shown in the fol-
lowing table.
z Variables with One-Byte Alignments (e.g., BYTE)
These variables are stored in memory with a one-byte alignment.
Example:
z Variables with Two-byte Alignments (e.g., BOOL and WORD)
These variables are stored in memory with a two-byte alignment.
Example:
A-4-1 Variable Memory Allocation Rules
Data type Size Alignment
BOOL 16 bits 2 bytes
BYTE, USINT, or SINT 8 bits 1 byte
WORD, UINT, or INT 16 bits 2 bytes
DWORD, UDINT, or DINT 32 bits 4 bytes
LWORD, ULINT, or LINT 64 bits 8 bytes
REAL 32 bits 4 bytes
LREAL 64 bits 8 bytes
TIME, DATE, TIME_OF_DAY, or DATE_AND_TIME 64 bits 8 bytes
STRING[N] (N+1) × 8 bits 1 byte
Enumerations 32 bits 4 bytes
Basic Data Types
Variable Table
Name
A
B
Data type
BYTE
BYTE
Variable A (bits 0 to 7)
Bytes
Memory
Variable B (bits 8 to 15)
Stored with
a one-byte alignment.
Variable Table
Name
A
B
Data type
BOOL
BOOL
Variable A
Bytes
Memory
Variable B
First byte
First byte + 1
First byte + 2
First byte + 3
Stored with
a two-byte alignment.
Size is 1 bit.

Table of Contents

Related product manuals