Omron CJ2 CPU UNIT SOFTWARE User Manual page 152

Cj2 cpu unit software
Hide thumbs Also See for CJ2 CPU UNIT SOFTWARE:
Table of Contents

Advertisement

5 Understanding Programming
Using Array Variables as Members of Data Structures
Arrays can be used as members of a data structure when there is a specific overall structure to the
data with members that each contains multiple elements in library fashion. Members can be freely
specified from the arrays. This is used when data is built from libraries.
Structure variable S
Member
A(x)
B(x)
C
Example: Communications frames can be created by selecting elements from libraries.
Structure variable for communications frames
Member
Address(x)
Command(x)
Data
For detailed information on data structure specifications and creation procedures, refer to the CX-
Programmer Operation Manual: Function Blocks and Structured Text (Cat. No. W447).
5-60
A(1) of S
Array variable that
is a member of
the data structure
A
0
1
2
B(1) of S
B
0
1
2
For communications frame address(1)
Array variable that
is a member of the
data structure
Addresses
0
0001Hex
0000 hex
1
0001 hex
0101Hex
2
000A hex
For communications frame command(1)
Commands
0
0001 hex
1
0101 hex
2
1002 hex
CJ2 CPU Unit Software User's Manual

Advertisement

Table of Contents
loading

Table of Contents