Arrays - Mitsubishi MELSEC-Q Series Programming Manual

Mitsubishi programmable controller
Hide thumbs Also See for MELSEC-Q Series:
Table of Contents

Advertisement

4.4.7

Arrays

An array represents a consecutive aggregation of same data type labels.
Arrays can be defined by the elementary data types or structures.
(
GX Works2 Version1 Operating Manual (Structured Project))
The maximum number of arrays differs depending on the data types.
One-dimensional array
Label name
boolary1
(1) Definition of arrays
The following table shows the format of definition.
Number of
array
dimensions
dimension
dimensions
Three
dimensions
(2) Expression of arrays
To identify individual labels of an array, append an index
enclosed by '[ ]' after the label name.
Values that can be specified for indexes are within the range
from -32768 to 32767.
For an array with two or more dimensions, delimit indexes in
'[ ]' by ','.
For the ST and structured ladder languages, labels (word (signed) or double word (signed)
data type) can be used for indexes as shown on the next page.
Note that Z0 or Z1 cannot be used in the programs if labels are used for indexes.
4.4 Method for Specifying Data
4-32
4.4.7 Arrays
Index
[1]
[2]
[n]
Table 4.4.7-1 Form used to define array
Array of elementary data type/structure name (array start value .. array end
One
value)
(Definition example) Bit (0..2)
Array of elementary data type/structure name (array start value .. array end
Two
value, array start value .. array end value)
(Definition example) Bit (0..2, 0..1)
Array of elementary data type/structure name (array start value .. array end
value, array start value .. array end value, array start value .. array end value)
(Definition example) Bit (0..2, 0..1, 0..3)
Two-dimensional array
Label name
Index
boolary2
[0,0]
[0,1]
[1,0]
[1,1]
[m,0]
Format
[0,n]
[m,n]
Remarks
For elementary data types
Section 4.3.5
For structured data types
Section 4.4.8
Example)
boolary1 [0]
boolary2 [0.3]
Label name
index

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-l seriesMelsec-f series

Table of Contents