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 #239 background imageLoading...
Page #239 background image
6 Programming
6-52
NJ-series CPU Unit Software User’s Manual (W501)
Additional Information
You cannot specify part of a multi-dimensional array as a parameter.
Array Protection
The following errors occur if you attempt to access an element that exceeds the number of elements
in an array.
When the Subscript Is a Constant
An error is displayed when you input the variable or when you check the program on the Sysmac
Studio.
When the Subscript Is a Variable
When an output parameter is assigned to an output variable, the CPU Unit checks to see if the num-
ber of elements was exceeded after it executes the instruction. When a subscript variable exceeds
the range of the elements of the array variable, an instruction error occurs. Even if this error occurs,
the value of ENO will be TRUE because internal processing of the instruction ends normally.
Use the range specification to restrict the values of the following integer variables to specific ranges of
values.
You can check to make sure that the entered value is within the allowed range in the following cases.
When you specify an initial value for a variable
When you write a value to a variable with CIP message communications
Range Specifications ((..))
Classification Data type
Integers SINT, INT, DINT, LINT, USINT, UINT, UDINT, and ULINT
MOVE
y[0]x[0]
Specifying One Element in the Array
Moves INT variable x[0] to y[0]
Moves INT variable x[0..199] to y[0..199]
Variable Table
Specifying the Array
EN
In
ENO
Out
MOVE
yx
EN
ENO
In
Out
Restrictions:
When you specify an array variable, it must be moved to a variable of the same data type with the same range of element numbers.
Variable name Data type
x
y
ARRAY [ 0 .. 199 ]OF INT
ARRAY [ 0 .. 199 ]OF INT
x[0]
Variable Table
x[0,1]
×
×
MOVE
y[0]
EN
In
ENO
Out
MOVE
EN ENO
In Out
y[0,1]
×
×
Variable name Data type
ARRAY [ 0..9 , 0..9 , 0..9 ]OF INT
ARRAY [ 0..9 , 0..9 , 0..9 ]OF INT
x
y
[11] INT#255
MOVE
EN
Variable Table
Variable name Data type
x ARRAY [1..
10
] OF
INT
In Out
ENO
[i]
MOVE
EN
In Out
Variable Table
Variable name Data type
xARRAY [1..
10
] OF
INT
If the value of variable i exceeds 10,
an instruction error occurs.
INT#255
ENO

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