EasyManua.ls Logo

Omron NJ501-1300 - Page 386

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...
Appendices
A-12
NJ-series CPU Unit Built-in EtherNet/IP Port User’s Manual (W506)
z Variables with Four-byte Alignments (e.g., DWORD)
These variables are stored in memory with a four-byte alignment. The first byte is the first of four
bytes in memory. Therefore, if a variable with a two-byte alignment, such as WORD data, is inserted,
two bytes of unused memory will remain.
Example:
z Variables with Eight-byte Alignments (e.g., LWORD)
These variables are stored in memory with an eight-byte alignment. The first byte is the first of eight
bytes in memory. Therefore, if a variable with a two-byte alignment, such as WORD data, is inserted,
six bytes of unused memory will remain. If a variable with a four-byte alignment, such as DWORD
data, is inserted, four bytes of unused memory will remain.
Example:
Variable Table
Name
A
B
C
Data type
DWORD
WORD
DWORD
Variable A
Variable B
Variable C
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
First byte + 8
First byte + 9
First byte + 10
First byte + 11
Stored with a two-byte
alignment.
Not used.
Stored with a four-byte
alignment.
Stored with a four-byte
alignment.
Variable Table
Name
A
B
C
Data type
LWORD
WORD
LWORD
Variable A
Variable B
Variable C
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
First byte + 8
First byte + 9
First byte + 10
First byte + 11
First byte + 12
First byte + 13
First byte + 14
First byte + 15
First byte + 16
First byte + 17
First byte + 18
First byte + 19
First byte + 20
First byte + 21
First byte + 22
First byte + 23
Stored with a two-byte
alignment.
Not used.
Stored with an eight-byte
alignment.
Stored with an eight-byte
alignment.

Table of Contents

Related product manuals