Download project
The "HMI Example" package contains examples for linking CODESYS HMI to CODESYS V3 and V23 controllers.
The "HMI Example" package contains examples for the following topics:
- Use of function blocks and visualizations from libraries
- Linking of data sources
- Use of alarms
- Use of trend elements
- Use of recipe elements
- Linking of CODESYS V3 controllers
- Linking of CODESYS V23 controllers
The following components are included in the "HMI Example" package:
HMIDemo.project
Sample project for CODESYS HMI
LibForHMIDemo.library
Help library to show how to use visualizations with a parameter interface from a library and link to a data source.
V3ProjForHMIDemo.project
Sample project for V3 controllers
V23Proj.pro
Sample project for V23 controllers.
In the "HMIDemo.project" sample project, a CODESYS V3 controller and a V23 controller are linked to the CODESYS HMI.
Linking a CODESYS V3 controller
See Data Sources Manager -> DatasourceV3.
The "V3ProjForHMIDemo.project" project has to be loaded into a CODESYS Control Win beforehand (CODESYS V3.5 SP11 Patch 1 or later must be installed).
The communication settings of the data source in the "Communication" tab still have to be adapted accordingly (name or address of the controller).
Linking a CODESYS V23 controller
See Data Sources Manager -> Datasource.
The "V23Proj.pro" project has to be loaded into a PLCWinNT beforehand (CODESYS V23 must be installed).
The communication setting s in the data source must be adapted accordingly in the "Communication" tab (IP address).
Visualization
The "Visualization" shows how function blocks and visualizations from libraries can be used in the HMI (see Data Source Manager -> DatasourceV3 -> Type mappings). With the switch, the simulation of a sawtooth signal can be started and ended. The current value of the signal is displayed below it.
V23Demo
Linking to a CODESYS V23 controller (see Data Source Manager -> Datasource)
Alarms
This visualization shows how alarms of a V3 controller can be displayed and confirmed. An alarm is triggered when the slider exceeds 60% of the maximum value.
Trend
In this visualization, a CODESYS V3 trend recording of the signal (see visualization) is displayed by means of the trend element. The simulation of the sawtooth signal has to be activated for this.
Recipe
This visualization shows how recipes are loaded and saved with the HMI.