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]
×
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