Bespoke GUIs for SCADA?
Human Machine Interfaces (HMIs) are what the operators use in the control room to supervise and manage the industrial or scientific control system. In essence, they are the graphical user interfaces and the underlying logic that help operators achieve high-level supervisory management.
It makes little sense to create customised GUIs for specific SCADA projects every time from scratch. It does make sense to use a software framework or tool-set that enables the developer team to reuse the GUI logic and layout from one project to the other as much as possible.
Furthermore, in today’s world of mobile applications and cloud-based web solutions, users have become familiar with the all-pervasive new “look and feel” of modern GUIs aimed at the mass user market and based on usability studies.
Beckhoff TwinCAT HMI to the Rescue!
When we started a recent new project, we were faced with the dilemma of which tool to choose for HMI development that would guarantee long-time support and reusability.
The visualisation solution that comes with TwinCAT 3 and produces application running on the PLC was running out of support. As its successor, Beckhoff introduced TC3 HMI (human-machine interface). The latter is a new industry solution for a modern web-oriented HMI which comes in two packages:
- * TE2000 – TC3 HMI Engineering, and
- * TF2000 – TC3 HMI Server.
The TC3 HMI Server is the webserver on which the HMI application (developed with the TC3 HMI Engineering) can be published and served as a web page. It connects to the PLC on one side and serves the web browser that renders the content to the user. Even though the solution was initially not quite stable yet for our purposes, we chose the latter but promised support and fast release cycles with updates. We accomplished most of the engineering work with the TC3 HMI Engineering package, publishing it on TC3 HMI Server.
TC3 HMI Engineering (TE2000)
The engineering tool, TE2000, comes as a Visual Studio extension. In the beginning, it gave us some hard times regarding stability and occasional corruption of project files. Things got better with the tool’s updates, and Git also turned out to be of great help. Putting aside TE2000’s teething problems, we grew to know the tool as a complex environment with a rich set of possibilities and a user interface with many buttons, tabs and dialogues. The learning curve was steep, and the changes consumed time. Luckily, TE2000 has features that support the object-oriented approach.
What I will present
I will describe some practices I found helpful in speeding up HMI construction by taking the object-oriented approach and reducing the number of buttons (clicks) and dialogues. Secondly, I will present specific controls that we find essential, are complex to use, or both. In the end, I will discuss an example of binding/mapping the process variables and commands from PLC to the HMI. The main goal there will be to “define once and reuse many times”. This way, your code will be more robust and easier to maintain.
By employing CSS classes, we can avoid defining the style properties like colors and borders directly for each control. When using CSS classes and putting them on the controls property list (i.e. Common->ClassNames of type ClassNameList) it is much easier to change the whole list once than changing several color properties on an event (i.e. status change).