Object ‘DUT’¶
Symbol: for DUT without text list support;
for DUT (type: enumeration) with text list support
A DUT (data unit type) describes a user-specific data type. You can add a DUT object below the application or in the POUs view.
When adding the object, you can specify definition (see below: Dialog box Add DUT).
Syntax
TYPE <identifier> : <DUT component declaration>
END_TYPE
The component declaration depends on the selected type, structure, or enumeration.
Example:
The following two DUTs define the structures struct1
and struct2
, in which struct2
extends struct1
. This mean that struct2.a
can be used to access the a
variable.
TYPE struct1 :
STRUCT
\ a:INT;
\ b:BOOL;
END_STRUCT
END_TYPE
TYPE struct2 EXTENDS struct1 :
STRUCT
\ c:DWORD;
\ d:STRING;
END_STRUCT
END_TYPE
See also
Dialog Box ‘Add DUT’
Function: You use this dialog box log for configuring a new DUT. The DUT (Data Unit Type) describes a user-specific data type.
Call: Menu bar
; context menu of the application object.Name | DUT name |
Structure | The DUT consists of a structure of various data types. Extends: |
Enumeration | The DUT consists of a series of integer constants. For declaration syntax, please refer to the help page for “Enumerations”. Add text list support: By clicking the buttons on the right edge of the editor, you can switch between Example: You use the Note: Text list support can be added or removed at any time for an existing enumeration object. For this purpose, the commands Add text list support and Remove text list support are provided in the context menu of the object.
|
Alias | Definition of an alias for a Base type. You can type in the base type directly or select it using the input assistant or array assistant. |
Union | All components reserve the same storage space for this data type. The memory requirement of a union is determined by the memory requirement of its “largest” component. |
See also