EasyManuals Logo

Omron CJ1W-EIP21 User Manual

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
Page #392 background imageLoading...
Page #392 background image
Appendices
A-18
CJ-series EtherNet/IP Units Operation Manual for NJ-series CPU Unit (W495)
For a union variable, the members overlap in the same memory locations. The alignment of a union is
largest alignment of all of the members. The amount of memory that is allocated is the largest amount
of memory that is allocated for any of the members.
Example: The alignments and the amounts of memory that are allocated for the four variable declara-
tions given in the following figure are given in the following table.
Unions
Variable Alignment [bytes] Amount of memory that is allocated [bytes]
A4 4
B4 4
C4 8
D4 8
Data Type Definitions
Name
Union UNI_A
a
b
Data type
UNION
DWORD
WORD
Variable A,
4 bytes
Variable B,
4 bytes
Variable C,
8 bytes
Variable D,
8 bytes
A.a A.b
B.c B.d
C[0].a C[0].b
C[1].a C[1].b
D[0].c D[0].d
D[1].c D[1].d
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
First byte + 12
First byte + 13
First byte + 14
First byte + 15
First b
yte + 16
First byte + 17
First byte + 18
First byte + 19
First byte + 20
First byte + 21
First byte + 22
First byte + 23
Variable Table
Name
Variable A
Variable B
Variable C
Variable D
Data type
Union UNI_A
Union UNI_B
ARRAY[0..1] OF UNI_A
ARRAY[0..1] OF UNI_B
Name
Union UNI_B
c
d
Data type
UNION
WORD
DWORD
First byte +
(integer multiple of 4)
First byte +
(integer multiple of 4)
First byte +
(integer multiple of 4)
First byte +
(integer multiple of 4)

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CJ1W-EIP21 and is the answer not in the manual?

Omron CJ1W-EIP21 Specifications

General IconGeneral
BrandOmron
ModelCJ1W-EIP21
CategoryController
LanguageEnglish

Related product manuals