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, FX3U
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
Ty p e
ARRAY [0..3] OF INT
= Motor_Speed [3]