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.
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.
After installation the project tree should look like this:
Configuration BaSiteExtension
Open configuration page of BaSiteExtension.
In the opened window all settings for the BaSiteExtension can be made.
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.
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.
Now in the TwinCAT HMI Configuration the PLC should have been successfully created in the server extension.
The runtime is then listed at All Symbols in the opened window.
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.
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.
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:
Open the Properties window.
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.
The Live-View should now look like this:
UiIcon
The UiIcon can be used for various applications. It is also located in the BA | General category of the toolbox.
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:
It displays the active events of the linked view/object and enables opening of a window that contains the generic navigation from above.
The same functionalities are thus available from this window.