Omron NY532-5400 User Manual page 439

Ny-series ipc machine controller industrial panel pc / industrial box pc
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

Therefore, the following formula gives the amount of memory that is allocated for a BOOL array.
For 1 to 16 elements, 2 bytes are allocated. For 17 to 32 elements, 4 bytes are allocated.
Amount of memory = 2
Specific examples of the rules for memory allocation for variables of each data type are given below.
Basic Data Types
 Variables with One-Byte Alignments (e.g., BYTE)
One byte of memory is allocated for the one-byte alignment.
Example: Two consecutive BYTE variables
First byte
First byte + 1
 Variables with Two-byte Alignments (e.g., BOOL and WORD)
Two bytes of memory are allocated for the two-byte alignment.
Example: Two consecutive BOOL variables
First byte +
(integer multiple of 2)
First byte +
(integer multiple of 2)
 Variables with Four-byte Alignments (e.g., DWORD)
Four bytes of memory are allocated for the four-byte alignment.
The location of the first byte of data in memory is an integer multiple of four bytes. Therefore, if a
variable with a two-byte alignment, such as WORD data, is inserted, two bytes of unused memory
will remain.
Example: Consecutive variables in the following order: DWORD, WORD, and DWORD
First byte +
(integer multiple of 4)
First byte +
(integer multiple of 2)
First byte +
(integer multiple of 4)
NY-series Industrial Panel PC / Industrial Box PC Built-in EtherNet/IP Port User's Manual (W563)
Number of
elements − 1
+2
16
Truncate the decimal portion of the result
of the calculation in brackets.
Memory
Bytes
Variable A, 1 byte
Variable B, 1 byte
Memory
Bytes
First byte
First byte + 1
First byte + 2
First byte + 3
Memory
Bytes
First byte
First byte + 1
First byte + 2
First byte + 3
First byte + 4
First byte + 5
First byte + 6
Not used.
First byte + 7
First byte + 8
First byte + 9
First byte + 10
First byte + 11
Variable Table
Name
Data type
A
BYTE
B
BYTE
Variable Table
Name
A
Variable A, 2 bytes
B
Variable B, 2 bytes
Variable Table
Name
Data type
A
DWORD
B
WORD
Variable A,
C
DWORD
4 bytes
Variable B,
2 bytes
Variable C,
4 bytes
Appendices
Data type
BOOL
BOOL
A-53
A

Advertisement

Table of Contents
loading

Table of Contents