Skip to main content

Element: Realization

A Realization is a UML relationship which expresses instantiation. The realizing class object implements the attributes and operations of the interface. In IEC code, this relationship corresponds to the keyword IMPLEMENTS.

A realization points from a class (type: FUNCTION_BLOCK) to an interface.

_uml_img_realization.png

Display as dashed arrow

Properties

Table 5.

Relationship

Relationship type

Optimise route

When this option is selected, the route of the relationship arrow is optimized automatically. The fixed points are the initial point at the start element and the final point at the end element. For example, if the end element is moved, then the point where the arrow points to the end element remains the same. When this option is deselected, the route remains unchanged. As soon as a relationship element is positioned manually in the class diagram, this option is deselected.

Select this option if automatic optimization is required.

Start element

Name of the element where the relationship element starts

End element

Name of the element that the relationship element points to

Identifier

For the Association and Composition relationships only

Name of the relationship element



User input

Action

Description

  1. Select the Realization _uml_icon_tool_realization.png tool .

  2. Click a class.

  3. Click the interface that should be implemented.

    The Select Implementation Language dialog opens.

  4. Select an implementation language and click OK to exit the dialog.

A realization is drawn between the elements.

The IEC code is adapted automatically by specifying the interface in the declaration part of the class. Example: Class_1 IMPLEMENTS Itf_2

  1. Select the Realization _uml_icon_tool_realization.png tool .

  2. Select a class.

  3. Click a blank area in the diagram.

    The Add Interface dialog opens.

  4. Specify a name, configure the settings, and click Add to exit the dialog.

    The Select Implementation Language dialog opens.

  5. Select an implementation language and click OK to exit the dialog.

A new interface has been added.

A realization is created that points from the class to the new interface.

The IEC code is adapted automatically by specifying the interface in the declaration part of the class. Example: Class_1 IMPLEMENTS Itf_2

  1. Select the Choice _uml_tool_selection.png tool.

  2. Click a realization.

  3. Move the line.

The lines are changed. The Optimise routing property is deselected automatically.

  1. Select the Choice _uml_tool_selection.png tool.

  2. Click a realization.

  3. Press the Del key or click Delete in the context menu.

The realization is removed from the diagram and IEC code. The statement IMPLEMENT is removed from the declaration part of the class.

Example

Example 18. Realization of an interface

Class_A implements Itf_A:

_uml_img_example_realization.png

View of Class_A in the POUs view:

_uml_img_class_example_realization_navigator.png