EasyManua.ls Logo

Omron CJ1W-EIP21 - Page 385

Omron CJ1W-EIP21
438 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
CJ-series EtherNet/IP Units Operation Manual for NJ-series CPU Unit (W495)
A-4 Variable Memory Allocation Methods
App
A-4-1 Variable Memory Allocation Rules
The alignments and the amounts of memory that are allocated for the basic data types and enumera-
tions are given below.
*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.
* BOOL arrays are an exception. Refer to Precautions for Correct Use, below, for the amount of memory that is
allocated for BOOL arrays.
Data type Alignment [bytes]
Amount of memory that
is allocated [bytes]
BOOL 22
BYTE, USINT, or SINT 11
WORD, UINT, or INT 22
DWORD, UDINT, or DINT 44
LWORD, ULINT, or LINT 88
REAL 44
LREAL 88
TIME, DATE, TIME_OF_DAY, or DATE_AND_TIME 88
STRING[N+1]
*1
1N+1
Enumerations 44
Data type Alignment Amount of memory that is allocated
Array
Same as alignment of the data type
of the elements
(Amount of memory that is allocated for the data type of the
elements) × Number of elements
*
Structure
The largest alignment of all of the
members
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
Union
The largest alignment of all of the
members
The largest amount of memory that is allocated for any of
the members

Table of Contents

Related product manuals