3.4
Data Types
GX IEC Developer supports the following data types.
3.4.1
Simple Types
3.4.2
Complex Data Types
ARRAYS
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
Programming
Data Types
Training Manual GX IEC Developer
3 - 15
Data type
Value range
Size
Applicable Devices / PLCs
BOOL
Boolean
Bit Device
0 (False), 1 (True)
1 bit
X, Y, M, B
INT
Integer
Register
-32768 to +32767
16 bit
D, W, R
DINT
Double Integer
-2,147,483.648 to
2,147,483,647
32 bit
WORD
Bit String
K4M0
0 to 65,535
16 bit
X, Y, M. B
DWORD
K8M0
0 to 4,294,967,295
32 bit
REAL
Floating point value
7 digits
32 bit
FX
2N
, FX
3U
STRING
Character String
20 Characters (default)
32 bit
FX
3U
TIME
Time value
-T#24d0h31m23s64800ms to
T#24d20h31m23s64700 ms
32 bit
FX
3U
only
Identifier
Motor_Speed
Type
ARRAY [0..3] OF INT
= Motor_Speed [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: ......