A-13
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
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
Variable Table
Name
A
B
C
Data type
DWORD
WORD
DWORD
Variable A,
4 bytes
Variable B,
2 bytes
Variable C,
4 bytes
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
Not used.
First byte +
(integer multiple of 2)
First byte +
(integer multiple of 4)
First byte +
(integer multiple of 4)
Summary of Contents for SYSMAC CJ1W-EIP21
Page 8: ...Manual Structure 6 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Page 42: ...Revision History 40 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Page 68: ...1 Introduction 1 26 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Page 266: ...9 FTP Server 9 20 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495...
Page 431: ...Index 1 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495 I Index...
Page 436: ...Index 6 CJ series EtherNet IP Units Operation Manual for NJ series CPU Unit W495 Index...
Page 437: ......