Arrays - Mitsubishi Electric MELSEC Q Series Programming Manual

Structured. fundamentals
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

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 Version 1 Operating Manual (Structured Project))
The maximum number of arrays differs depending on the data types.
• One-dimensional array (Number of elements: 4)
bLabel1
[0]
[1]
Label name Index
• Three-dimensional array (Number of elements: 6  5  4)
[1,0,0]
bLabel3
[0,0,0]
[0,0,1]
[0,1,0]
[0,1,1]
[0,4,0]
[0,4,1]
• Settings in the programming tool
Defining arrays
■Dimension number of multidimensional array
Up to three-dimensional array can be defined.
■Definition format
The following table lists definition format.
Number of array
Format
dimensions
One dimension
Array of elementary data type/structure name (array start value .. array end value)
(Definition example) Bit (0..2)
Two dimensions
Array of elementary data type/structure name (array start value .. array end value, array start value ..
array end value)
(Definition example) Bit (0..2, 0..1)
Three dimensions
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)
4 PROGRAM CONFIGURATION
48
4.4 Method for Specifying Data
[2]
[3]
[5,0,0]
[5,0,1]
[5,0,2]
[5,0,3]
[1,0,1]
[1,0,2]
[1,0,3]
[0,0,2]
[0,0,3]
[0,1,2]
[0,1,3]
[0,4,2]
[0,4,3]
• Two-dimensional array (Number of elements: 5  4)
[0,1]
bLabel2
[0,0]
[1,0]
[1,1]
[4,0]
[4,1]
[5,4,3]
[0,2]
[0,3]
[1,3]
[1,2]
[4,2]
[4,3]
Remarks
For elementary data types
 Page 32 Data types
For structured data types
 Page 51 Structures

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec f seriesMelsec l series

Table of Contents