Skip to main content

Example: HMI

Product: CODESYS Visualization

The example package HMI Example contains examples for connecting CODESYS HMI to a CODESYS V3 and V2.3 control.

Description

_example_img_visu_hmi_demo.png

The example project HMIDemo.project shows the following features:

  • Use of function blocks and projects from libraries

  • Linking of data sources

  • Use of alarms

  • Use of trend elements

  • Use of recipe elements

Additional information

To successfully run the HMIDemo.project sample project, you also need the following library and projects:

  • LibForHMIDemo.library

    The LibForHMIDemo library is used to show how to use visualizations with a parameter interface from a library and link them to a data source.

  • V3ProjForHMIDemo.project

    Sample project for V3 controllers. It provides data for the HMIDemo in a V3 controller.

  • V23Proj.pro

    Sample project for V2.3 controllers. It provides data for the HMIDemo of a V2.3 controller.

Connecting a CODESYS V3 controller:

  1. Install CODESYS V3.5 SP11 Patch 1 or higher and download the V3ProjForHMIDemo.project project to the CODESYS Control Win controller.

  2. On the Communication Settings tab of the data source, adjust the "Name" and "Address" communication settings of the controller accordingly. To do this, in the device tree under the Data Sources Manager object, double-click the DatasourceV3 object and select the Communication Settings tab.

    For more information, see: Device Editor – Editing the Communication

Connecting a CoDeSys V2.3 controller

  1. Install CoDeSys V2.3 and load the V23Proj.pro project on a PLCWinNT.

  2. On the Communication Settings tab of the data source, adjust the IP address communication setting of the controller accordingly. To do this, in the device tree under the Data Sources Manager object, double-click the Datasource object and select the Communication Settings tab.

    For more information, see: Device Editor – Editing the Communication

Visualizations

  • Visualization

    The Visualization visualization shows how to use function blocks and visualizations from libraries in the HMI. (For more precise information about this, in the device tree under the Data Source Manager object, double-click the DatasourceV3 object and select the Type Mappings tab.) The switch can be used to start and stop the simulation of a sawtooth signal. The current value of the signal is displayed below.

  • V23Demo

    Connection to a CoDeSys V2.3 controller

  • Alarms

    This visualization shows how to display and acknowledge alarms of a V3 controller connected via a data source. An alarm is triggered when the slider exceeds 60% of the maximum value.

    _example_img_visu_hmi_alarms.png
  • Trend

    In this visualization, the trend element is used to display a CODESYS V3 trend recording of a controller connected via a data source. For this, the simulation of the sawtooth signal has to be activated.

    _example_img_visu_hmi_trend.png
  • Recipe

    This visualization shows how to use the HMI to load and save recipes. The recipes read and write values of the connected controllers.

    _example_img_visu_hmi_recipe.png

System requirements and restrictions

Programming system

CODESYS Development System (version 3.5.14.0 or higher)

Runtime system

CODESYS Control Win (version 3.5.14.0)

Add-on components

-

Note

_example_icon.png DOWNLOAD Project