Omron NY532-5400 User Manual page 438

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

Advertisement

Appendices
The alignments and the amounts of memory that are allocated for the basic data types and enumera-
tions are given below.
BOOL
BYTE, USINT, or SINT
WORD, UINT, or INT
DWORD, UDINT, or DINT
LWORD, ULINT, or LINT
REAL
LREAL
TIME, DATE, TIME_OF_DAY, or DATE_AND_TIME
*1
STRING[N+1]
Enumerations
*1 N is the maximum number of characters handled. For example, if a maximum of 10 single-byte characters are
handled, the NULL character is added, so memory for 11 characters must be reserved.
The elements of arrays and the members of structures and unions are located in memory for the most
efficient access. The alignments and the amounts of memory that are allocated for arrays, structures,
and unions are determined by the variable declarations, as described below.
Data type
Same as alignment of the data type
Array
of the elements
The largest alignment of all of the
members
Structure
The largest alignment of all of the
Union
members
* BOOL arrays are an exception. Refer to Precautions for Correct Use, below, for the amount of memory that is
allocated for BOOL arrays.
Precautions for Correct Use
Precautions for Correct Use
Amount of Memory That Is Allocated for BOOL Arrays
Two bytes are allocated in memory for individual BOOL variables, BOOL structure members,
and BOOL union variables. However, for a BOOL array, two bytes of memory are not allocated
for each element. One bit is allocated in order for each element. For the entire array, a multiple of
two bytes of memory is allocated (including unused bits).
Variable A
First byte
First byte + 1
Variable B
First byte + 2
First byte + 3
Variable C
First byte + 4
First byte + 5
First byte + 6
First byte + 7
A-52
Data type
Alignment
Memory
Bytes
NY-series Industrial Panel PC / Industrial Box PC Built-in EtherNet/IP Port User's Manual (W563)
Alignment [bytes]
2
1
2
4
8
4
8
8
1
4
Amount of memory that is allocated
(Amount of memory that is allocated for the data type of the
elements) × Number of elements
The integral multiple of the alignment that is larger than the
total amount of memory that is allocated when the mem-
bers are arranged in order at integral multiples of the align-
ment of the data types of the members
The largest amount of memory that is allocated for any of
the members
Variable Table
Two bytes are allocated.
Two bytes are allocated
for 5 elements.
Four bytes are allocated
for 19 elements.
Amount of memory that
is allocated [bytes]
2
1
2
4
8
4
8
8
N+1
4
*
Name
Data type
A
BOOL
B
ARRAY[1..5]OF BOOL
C
ARRAY[0..18]OF BOOL

Advertisement

Table of Contents
loading

Table of Contents