Reader small image

You're reading from  Mastering PLC Programming

Product typeBook
Published inMar 2023
PublisherPackt
ISBN-139781804612880
Edition1st Edition
Right arrow
Author (1)
Mason White
Mason White
author image
Mason White

M.T. White has been programming since the age of 12. His fascination with robotics flourished when he was a child programming microcontrollers such as Arduinos. M.T. currently holds an undergraduate degree in mathematics, a master's degree in soft ware engineering, and is currently working on an MBA in IT project management. M.T. is currently working as a soft ware developer for a major US defense contractor and is an adjunct CIS instructor at ECPI University. His background mostly stems from the automation industry where he programmed PLCs and HMIs for many different types of applications. M.T. has programmed many different brands of PLCs over the years and has developed HMIs using many different tools.
Read more about Mason White

Right arrow

HMIs — UIs for PLCs

Everything has a User Interface (UI) of some type nowadays. The website you used this morning, your car’s radio, and even the app you’re reading this book on if you’re reading a digital copy, your device has a UI of some type. Automation programming is no different. Everything uses a UI of some kind to either interact with the hardware or with other software.

There are two ways that your end users will interact with your PLC. They can either use some type of control panel that is built using physical hardware (for many applications, this is no longer a viable option), or they can use a Human Machine Interface (HMI). With the drop in the cost of computing power over the past 20 or so years, HMIs are now the primary way for end users to interact with a PLC program. In short, no matter what you’re doing, chances are you’re going to have an HMI for the operator to control the machine.

HMI development, in my opinion, is...

Technical requirements

For this chapter, the example can be found at the following URL: .

There won’t be any development in this chapter as this is an introduction to HMIs. However, our final project can be pulled from the same URL.

Understanding HMIs

When I have to explain what an HMI is to a developer that does not have a background in automation, I usually describe it as an industrial UI for machines. In short, an HMI serves as a digital control panel. An HMI is a program that will have digital buttons, switches, readouts, and so on that will run on some type of touchscreen computer. The HMI serves as the control panel that the operator will use to send commands to the PLC.

In my experience, I have seen HMIs make or break projects. HMIs are presentation layers for your project. As such, a poorly designed HMI can make your machine difficult, if not impossible, to use. It is important to keep in mind that these are soft control panels and, as such, a poor layout of controls will make the machine hard to operate. The customer will also pay particular attention to the HMI. For people not familiar with software engineering, the only thing they have to gauge quality on is how the controls are organized. In other...

HMIs versus SCADA

It is very common for people, even experienced automation engineers, to confuse HMIs with SCADA systems. SCADA stands for Supervisory Control And Data Acquisition. When a person correctly refers to SCADA, they are referring to systems that include sensors, PLCs, RTUs, control software such as HMIs, and so on. SCADA systems are more for larger systems, for example, systems that will supervise whole plants.

In contrast, an HMI is designed to control a single machine. A machine’s HMI will usually be placed near the machine, and it exists to operate that machine or a very limited group of related machines. Depending on the system you used to develop the HMI, you can network HMIs to a SCADA system. To do this, you will need to have a SCADA system that can support this type of functionality.

As such, the best way to think of the differences between HMIs and SCADA systems are as follows:

  • HMIs: HMIs control a machine or small groups of machines. The HMI...

How the SDLC applies to HMIs

Sadly, HMI development is often less rigorous than PLC software, which, as we have established, gets little attention compared to physical hardware. However, as we have stated in the past, the HMI will be the focal point of the software for the end user. If the HMI is not a quality HMI, the machine will run the risk of being pushed to the wayside. As such, it is important to follow the SDLC even with HMI development.

In my opinion, the design phase is of the most importance. You will usually design the layout of the HMI during the design phase. The design phase is usually the make-or-break phase of the SDLC and in terms of HMI development, even more so. As we will see in the next section, a very important part of the HMI design is wireframing, which is a technique used to create a layout of the HMI before you try to build it. Due to the nature of HMIs, you will want to be in contact with the customer/end user during the design phase.

If you opt to...

Exploring wireframing

Wireframing is a simple yet vital concept for any type of UI development. Generally, this is a practice that isn’t carried out much in the automation world, but when it is, it can greatly benefit the overall HMI design. So, what is wireframing?

In short, wireframing is a design practice where you lay out UI/HMI designs on either paper or some type of rendering program before you start the development process. For example, a wireframe may look like Figure 11.2.

Figure 11.2 – Wireframe for mock HMI

Figure 11.2 – Wireframe for mock HMI

As can be deduced, this is a simple diagram of the mock HMI in Figure 11.1. However, in the diagram, there are labeled components such as the LEDs and so on.

Generally, you don’t have to wireframe in any particular software package as you can simply draw them out on paper or a whiteboard. You usually want to wireframe on a whiteboard or paper during things such as brainstorming sessions. If you’re using an...

Final project – creating an HMI

The easiest way to create an HMI project is to simply create a standard project as we have done throughout the book. Once you create a project, you will want to right-click Application, navigate to Add Object, and select Visualization as in Figure 11.3.

Figure 11.3 – Adding an HMI to a project

Figure 11.3 – Adding an HMI to a project

When you do this, you should be met with Figure 11.4.

Figure 11.4 – Add screen

Figure 11.4 – Add screen

Click Add and wait a few minutes for the controls to render. Once you are done, you will be met with a new area to the right of the screen with HMI controls in it, similar to Figure 11.5. As can be seen in the figure, there are many different controls, such as LEDs and switches to choose from.

Figure 11.5 – HMI controls

Figure 11.5 – HMI controls

There are also many different tabs that each have different types of controls grouped by functionality. To add a control to the screen, you simply click...

Summary

This chapter has explored HMIs. HMIs are pivotal pieces of software for any automation project. With the rise in power and drop in the cost of computing, HMIs are now permanently ingrained in the automation world. In short, you cannot be an automation programmer without knowing what an HMI is and how to develop one.

To the end user, the HMI will make or break the machine, they will gauge the quality of your machine based on the HMI. If the HMI is well designed and laid out, they will see the machine as better quality as opposed to a machine with a poor layout. In short, I always tell young automation programmers that the customer doesn’t care about the hardware or PLC software; what they care about is how easy the machines are to operate and the key to that is a quality HMI.

As such, we have explored what HMIs are and how they are made. We have also explored different ways to develop HMIs and the difference between HMIs and SCADA packages. Lastly, we learned how...

Questions

Answer the following questions based on what you've learned in this chapter. Cross-check your answers with those provided at the end of the book, under Assessments.

  1. What is an HMI?
  2. How would you describe an HMI to a person that is not an automation engineer?
  3. What is a SCADA system composed of?
  4. What is wireframing?
  5. Name three HMI development packages
  6. Can you use C# or Java to build HMIs?
lock icon
The rest of the chapter is locked
You have been reading a chapter from
Mastering PLC Programming
Published in: Mar 2023Publisher: PacktISBN-13: 9781804612880
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Author (1)

author image
Mason White

M.T. White has been programming since the age of 12. His fascination with robotics flourished when he was a child programming microcontrollers such as Arduinos. M.T. currently holds an undergraduate degree in mathematics, a master's degree in soft ware engineering, and is currently working on an MBA in IT project management. M.T. is currently working as a soft ware developer for a major US defense contractor and is an adjunct CIS instructor at ECPI University. His background mostly stems from the automation industry where he programmed PLCs and HMIs for many different types of applications. M.T. has programmed many different brands of PLCs over the years and has developed HMIs using many different tools.
Read more about Mason White