Skip to main content

Element: Custom Data Type

_uml_img_dut_selected.png
Table 3. Display

(1)

Command icons which are visible when the element is selected

(2)

. Header
  • Identification of the element

    • <<struct>>: DUT (type: structure)

    • <<enum>>: DUT (type: enumeration)

    • <<library>>: DUT from a library

    • <<missing>>: DUT from a library The library is not integrated in the project.

  • Name of the POU

(3)

Attributes



Properties

Identifier

Unique name for the element. You can also change the name in the class diagram by selecting the name and clicking again to open the line editor.

User input

Action

Description

Click _uml_icon_delete_shallow.png.

The DUT is deleted from the class diagram only. The object remains in the project.

Hint: After being deleted, the DUT is displayed in the ToolBox view in Incoming cross references or Outgoing cross references. The requirement for this is that you select an element in the class diagram that has a relationship to the deleted DUT.

Click _uml_icon_delete_deep.png.

The DUT is removed from the diagram and from the project.

The object is removed and does not exist anymore.

  1. Click _uml_icon_generalization.png.

  2. 2. Click a blank area in the diagram.

    The Add DUT dialog opens.

  3. Specify a name for the parent object.

  4. Click Add to exit the dialog.

A generalization points to the new DUT from the existing DUT. The existing DUT inherits from the new class.

The existing DUT contains the declaration TYPE Dut_B EXTENDS Dut_1 :.

  1. Click _uml_icon_generalization.png.

  2. Click an existing DUT.

A generalization arrow points to the second DUT from the first DUT.

The second DUT inherits the data from first DUT.

The first DUT contains the declaration TYPE Dut_1 EXTENDS Dut_2 :.

Click the DUT name two times.

The name is outlined in blue after the first click. After you click the second time, an input field opens for changing the name.

The object name in the device tree or POUs view and the name in the declaration part of the DUT are adapted automatically.

Double-click the element.

The corresponding object editor opens.

Example

Example 11. Generalization DUT
_uml_img_example_generalization_dut.png
TYPE Dut_A EXTENDS Dut_Base :
STRUCT
    data : ARRAY[0..9] OF WORD;
END_STRUCT
END_TYPE