Data Unit Types (DUT)
User defined Data Unit Types (DUT), can be created. This can be useful for programs which
contain common parts, for example; the control of six identical silos. Therefore a data unit type,
called ‘Silo’ can be created, composing patterns of different elements, i.e. INT, BOOL etc.
When completing a global variable list, identifiers of type Silo can be used. This means that the
predefined group called ‘Silo’ can be used with the elements defined as required for each silo,
thus reducing design time and allowing re-use of the DUT.
Example use of a DUT
The following example shows the creation of a data type called Silo. The variable collection of
Silo contains two variables of the INT and one variable of the type BOOL.
How to declare the DUT
Double-click on
Global_Vars
in the Project Navigator window and enter the following lines in the
global variables declaration table.
The variables are stored in the Global Variable List. The structure of both variables, Silo_1 and
Silo_2, is identical, so to reference the individual variable of each DUT you only need to prefix
their names with the name of the respective global variable.
Programming Data Types
Training Manual GX IEC Developer 3 - 17