EasyManuals Logo

Omron NJ Series User Manual

Omron NJ Series
668 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 #621 background imageLoading...
Page #621 background image
Appendices
A-94
NJ-series CPU Unit Software User’s Manual (W501)
A continuous section of memory is allocated for the elements of the array based on the data size of the
data type of the array variable. The alignment of an array is the same as alignment of the data type of
the elements.
Example: Continuous variables in the following order: two BOOL variable, one BOOL array with five
elements, one BOOL array with 19 elements, and one BOOL array with four elements
Example: INT array with five elements
For a structure variable, the members are located in memory in the order that they are declared. Each
member is located at an integer multiple of the alignment of the data type of the member. Therefore,
there can be unused memory between members or at the end of members. The alignment of a struc-
ture is the largest alignment of all of the members. The amount of memory that is allocated is the inte-
gral multiple of the alignment that is larger than the total amount of memory that is allocated when the
members are arranged in order at integral multiples of the alignment of the data types 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.
Arrays
Structures
Variable Alignment [bytes] Amount of memory that is allocated [bytes]
A4 8
B4 8
C4 16
D4 16
Variable Table
Name
A
B
C
D
E
Data type
BOOL
BOOL
ARRAY[1..5]OF BOOL
ARRAY[0..18]OF BOOL
ARRAY[5..8]OF BOOL
Variable A,
2 bytes
Variable B,
2 bytes
Variable C,
2 bytes
Variable D,
4 bytes
Variable E,
2 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
First byte +
(integer multiple of 2)
First byte +
(integer multiple of 2)
First byte +
(integer multiple of 2)
First byte +
(integer multiple of 2)
First byte +
(integer multiple of 2)
Variable Table
Name
Variable A
Data type
ARRAY[0..4] OF INT
Memory
Bytes
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
A[0]
A[1]
A[2]
A[3]
A[4]
Variable A,
10 bytes
First byte +
(integer multiple of 2)
First byte +
(integer multiple of 2)
First byte +
(integer multiple of 2)
First byte +
(integer multiple of 2)
First byte +
(integer multiple of 2)

Table of Contents

Other manuals for Omron NJ Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ Series and is the answer not in the manual?

Omron NJ Series Specifications

General IconGeneral
Program CapacityUp to 128 MB
SD Card SlotYes
Power Supply Voltage24 VDC
Motion ControlYes
USB Ports1
Operating Temperature0°C to 55°C
Communication InterfacesEthernet/IP, EtherCAT, USB
Safety FunctionOptional
Storage Temperature-20°C to 75°C
Communication PortsUSB
DimensionsVaries by model
WeightVaries by model

Related product manuals