11
Arrays
11.1
Overview
An array is a field or matrix of variables, of a particular type.
For example, an
ARRAY [0..2] OF INT
, is a one dimensional array of three integer elements
(0,1,2). If the start address of the array is D0, then the array consists of D0, D1 and D2.
Identifier
Address
Type
Length
Motor_Volts
D0
ARRAY
[0...2] OF INT
In software, program elements can use: Motor_Volts[1] and Motor_Volts[2], as declarations,
which in this example mean that D1 and D2 are addressed.
Arrays can have up to three dimensions, for example: ARRAY [0...2, 0...4] has three elements in
the first dimension and five in the second. Arrays can provide a convenient way of ‘indexing’ tag
names, i.e. one declaration in the Local or Global Variable Table can access many elements.
The following diagrams illustrate graphical representation of the three array types.
Single Dimensional Array
Two Dimensional Array
Arrays
Overview
Training Manual GX IEC Developer
11 - 1
Identifier
Motor_Volt
Type
ARRAY [0..3, 0...3] OF INT
= Motor_Volt [2, 3]
Содержание FX2N-32CAN
Страница 1: ...MITSUBISHI ELECTRIC FACTORY AUTOMATION Programmable Logic Controllers GX IEC Developer ...
Страница 2: ......
Страница 4: ......
Страница 6: ......
Страница 10: ...IV MITSUBISHI ELECTRIC ...
Страница 18: ...Modular PLC Training Hardware Course Overview and Requirements 1 2 MITSUBISHI ELECTRIC ...
Страница 172: ...Monitoring Instances of Function Blocks Advanced Monitoring Functions 7 12 MITSUBISHI ELECTRIC ...
Страница 176: ...Device Edit 8 4 MITSUBISHI ELECTRIC ...
Страница 190: ...Assigning DUT Variables to Function Blocks Data Unit Types DUT 10 10 MITSUBISHI ELECTRIC ...
Страница 198: ...Array Example Single Dimension Array Arrays 11 8 MITSUBISHI ELECTRIC ...
Страница 219: ...Sequential Function Chart SFC SFC Elements Training Manual GX IEC Developer 14 3 ...
Страница 220: ...14 3 SFC configuration examples SFC configuration examples Sequential Function Chart SFC 14 4 MITSUBISHI ELECTRIC ...
Страница 230: ...Structured Text Program Example IEC Structured Text 16 4 MITSUBISHI ELECTRIC ...
Страница 248: ...Configuring GX IEC Developer to access the PLC on Ethernet Ethernet Communications 18 10 MITSUBISHI ELECTRIC ...
Страница 278: ...PLC Components Glossary Appendix A 18 MITSUBISHI ELECTRIC ...
Страница 283: ......