<9. Advanced Engineering >
● User Data Type Definitions
Some sample user data type definitions are shown below.
- Lines 2 to 4 in the figure below
Defines a data type named “AR_LREAL20”, which is an array of 20 LREAL-type
data.
- Lines 7 to 9 in the figure below
Defines a data type named “CData_REAL20”, which is an array of 20
CData_REAL-type data; CData_REAL is a system-defined structure data type.
- Lines 13 to 20 in the figure below
Defines a structure data type named “TEST_TYPE” comprising one BOOL-type
data named “A”, one REAL-type data named “B” and one DINT-type data named
“C”.
● How to Define a 2-dimensional Array
In the figure below, line 2 defines an array data type of 20 REAL-type data, while
line 3 defines an array data type of 3 data of the type defined in line 2.
The above two lines creates a two-dimensional array comprising 20 rows and 3
columns as shown below.