![background image](http://html1.mh-extra.com/html/omron/sysmac-cj1w-eip21/sysmac-cj1w-eip21_operation-manuals_742257385.webp)
A-11
Appendices
CJ-series EtherNet/IP Units Operation Manual for NJ-series CPU Unit (W495)
A-4 V
ariab
le Mem
o
ry
Allocation
Meth
od
s
App
A-4-1
V
ar
iab
le Memor
y
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
2
2
BYTE, USINT, or SINT
1
1
WORD, UINT, or INT
2
2
DWORD, UDINT, or DINT
4
4
LWORD, ULINT, or LINT
8
8
REAL
4
4
LREAL
8
8
TIME, DATE, TIME_OF_DAY, or DATE_AND_TIME
8
8
STRING[N+1]
*1
1
N+1
Enumerations
4
4
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
Содержание SYSMAC CJ1W-EIP21
Страница 8: ...Manual Structure 6 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 10: ...Sections in this Manual 8 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 20: ...Read and Understand this Manual 18 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 42: ...Revision History 40 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 68: ...1 Introduction 1 26 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 80: ...2 Installing Ethernet Networks 2 12 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 130: ...6 Testing Communications 6 4 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 206: ...7 Tag Data Link Functions 7 76 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 246: ...8 Message Communications 8 40 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 266: ...9 FTP Server 9 20 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 374: ...13 Troubleshooting 13 56 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Страница 431: ...Index 1 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495 I Index...
Страница 436: ...Index 6 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495 Index...
Страница 437: ......