Generic HMI

Description

The following describes how the generic functionalities of TcHmiBa are used to minimize the development work for the HMI. As a prerequisite, see the chapter Starting a project.

Procedure

Please note the system requirements of the BaSiteExtension.

Furthermore, a PLC is required that was created with the libraries from TF8040 and is already active.

Generic HMI 1:

Description of required terms.

Preparing the server

Before starting to create the visualization with generic functions, the server must be prepared.

Installation BaSiteExtension

To support the generic functionalities it is necessary to install the NuGet package Beckhoff.TwinCAT.HMI.BA.BaSite.

Generic HMI 2:

After installation the project tree should look like this:

Generic HMI 3:

Configuration BaSiteExtension

Open configuration page of BaSiteExtension.

Generic HMI 4:

In the opened window all settings for the BaSiteExtension can be made.

Generic HMI 5:
Generic HMI 6:

For more information about configuration and functions, see the server extension documentation.

IFP01 is created by default in the Runtimes entry.

Enter the respective data for the active PLC at AmsNetId and Port.
Enter the respective details for the active PLC at AmsNetId and Port.

Generic HMI 7:

No change of the settings is required if the PLC is running locally on the development computer.

Afterwards the runtime has to be activated and the dialog has to be confirmed.

Generic HMI 8:

Now in the TwinCAT HMI Configuration the PLC should have been successfully created in the server extension.

Generic HMI 9:

The runtime is then listed at All Symbols in the opened window.

Generic HMI 10:
Generic HMI 11:

If no HMI project is selected in the project tree, the display in the TwinCAT HMI Configuration remains empty.

A mapping for the runtime has also been created already. The mapping is listed under Mapped Symbols.

Generic HMI 12:
Generic HMI 13:

Note the requirements for the necessary mappings for the generic functionalities.

The configuration of the server is now complete.

Using generic controls

The generic controls can only be used with the TcHmiBaServerExtension. A small selection is briefly described below.

Generic HMI 14:

Further information can be found in the respective documentation of the individual controls.

Project navigation

The quickest way to get started with the HMI is to use the ProjectNavigationTextual control. It is located in the BA | General category of the toolbox. If the control was placed on the Desktop.view, it should look like this:

Generic HMI 15:

Open the Properties window.

Generic HMI 16:
Generic HMI 17:
Generic HMI 18:

The content of the Properties window always depends on the current selection. To see the properties of the project navigation, the control must be selected on the Desktop.view.

If the attribute BaObject is linked to the project structure (Top node) of the runtime, this control can be used to navigate through the entire project structure.

Generic HMI 19:
Generic HMI 20:
Generic HMI 21:
Generic HMI 22:

The Live-View should now look like this:

Generic HMI 23:

UiIcon

The UiIcon can be used for various applications. It is also located in the BA | General category of the toolbox.

Generic HMI 24:

Like all controls from TcHmiBa, the UiIcon has the attribute BaObject. Any BaView or any BaObject can be linked to this. Again, the ProjectStructure of the runtime (see above) serves as an example.

In Live View, the UiIcon then looks like this:

Generic HMI 25:

It displays the active events of the linked view/object and enables opening of a window that contains the generic navigation from above.

Generic HMI 26:

The same functionalities are thus available from this window.