This article is one in an ongoing series about programmable logic controllers and their applications in broadcasting. You can read past articles online at radiomagonline.com.
In the last article, we discussed design of and some considerations for a PLC-based automatic transmission line pressurization system. I also indicated that, in this issue, I would go into detail regarding the programming and ladder logic, as well as provide a detailed list of the necessary components.
I have since reconsidered that plan and will defer that portion of the discussion until a later article.
Introducing the human-machine interface, commonly referred to as the “HMI.”
In the previous article, I discussed several parameters such as Set Point (SP)”EV” — or Error Value — and “PV” — or process value. There are, in fact, other values that must be monitored and set by the technician, and far and away the best way to do this is with some sort of visual interface. (Consider if you had an air conditioning unit with no thermostat!)
Let’s consider options for monitoring and controlling the PLC-based controller through an HMI.
THE HUMAN-MACHINE INTERFACE
Among the ways to interface and program the PLC, you may use a PC running the programming software and “hard-code” the program parameters such as set points, timer delays, etc. and let it fly, use a PC running HMI software which provides a GUI; or, by use of a dedicated HMI touch screen.
The latter has several benefits, not the least of which is a self-contained interface to the PLC without adding layers of complexity, i.e., the PC operating system as well as the HMI application software and the attendant hardware drivers. The HMI is usually a panel-mounted unit which comes with a cutout template. (At this point, let me suggest a company which will, based upon your design and ability to use their free software, fabricate a first-rate, manufacturer-grade front panel for your project: Front Panel Express.)
The HMI unit, depending upon which model you select, will communicate with the PLC using serial communications or by way of an Ethernet connection. HMIs are programmed using free software and via a serial port (USB, or standard DB9 port) available from the vendor.
PROGRAMMING THE HMI
The HMI is programmed, as stated earlier, by using free software provided by the vendor, similar to many Windows-based programs, making use of objects and their associated properties (like “VB” or Visual Basic).
Fig. 1 shows a sample screen of the Automation Direct C-more HMI software taken from the interface I used for a directional antenna controller. This HMI is capable of displaying up to 256 different screens, each of which is accessible by front panel function keys (which can be “context sensitive”) or by touch screen objects or by the HMI under program control. This particular HMI has a display resolution of 320×240 and a color depth of 32k.
If you’d like more color depth or higher resolution, more costly units are available, or you have the option of using HMI software which runs on a PC. Like many electronic devices, prices are dropping as manufacturing technology and fabrication techniques progress. For most of our applications, its display specifications are more than adequate.
HMI SOFTWARE OVERVIEW
Refer to Fig. 1, the C-More Micro programming software screen. As I said earlier, it’s all about objects and their associated properties.
Each of the graphic items you see on the screen is an object: The Auto Pattern button is an object as are the LED graphics. Each of these objects can interact with the ladder program of the connected PLC either by use of “tags” (discussed in earlier articles in this series) which are variables with user-friendly names such as Auto_Pattern_Toggle and refer to a ModBus address of a ladder logic object in the PLC; or alternatively, by direct access to the PLC object by ModBus address.
If you use the tag method (preferred), you first export the tag database file from the PLC programming software and import this file to the HMI software. This makes assigning a PLC ladder object (including system tags) to an HMI object a breeze.
I should note that, in addition to the tags you have created while programming the PLC, the PLC itself has a great deal of internal system tags the programmer (you) will find quite useful to display on the HMI. Examples of such tags include the internal real-time clock, PLC scan time, error codes, backup battery voltage, firmware versions and many other useful tags are there for you to use as you see fit.
HMI PROGRAMMING OBJECT AND PROPERTIES
As in many Windows programs, you access the HMI object properties by a right-click action on the object of interest (say a button or LED), which brings up the properties window for that object. Once in the properties window, you configure on/off button colors; font size/color; graphics options, such as frame style (3D or flat); the tag or ModBus address of the ladder object you wish to interact with; and finally more object-specific parameters — like whether a button is momentary or push-push.
In general, you select the type object you want on the right of the screen (object list), drag it to the display area (or form), set the properties for each object, and then save the project to a file.
The final step is to upload the project file to the HMI display.
SET UP SUMMARY
- Connect a serial port from the PC running the HMI programming software (using a USB-DB9 converter device, if required) to the HMI serial port used for programming.
- Connect the HMI port for PLC communication to the PLC port used for HMI communication (the HMI has two ports — one for each function).
- Run the HMI programming software
- Follow the software steps to select the serial port to be used and the type of PLC to be interfaced with.
- Export the tag database file from the PLC (if using a tag database)
- Import the tag database to the HMI software
- Create a new screen with some objects (pushbuttons, switches, LEDs, analog meters, digital meters, etc.)
- Assign properties to the screen objects
- Save the project file and upload to the HMI display
- Test your program by touching a screen object and observing the expected action in the PLC.
- Vendors often have videos that will walk you through this process. Here is one example: https://www.youtube.com/watch?v=fq5ScU0BI-k.
HMI FINISHED PRODUCT
After we have programmed our HMI and interfaced it with the PLC, we can have a user-friendly and intuitive (if properly laid out) interactive means of setting parameters and monitoring virtually every internal function of the PLC — including user-programmed values such as current time, next action time, set points, current values, etc.
Fig. 2 shows a touchscreen HMI for a directional antenna system controller mounted on a panel I designed, which was then fabricated by Front Panel Express.
Throughout this series, we have thrown many concepts out there: PLCs, ladder logic, HMIs, tag database, ModBus, as well as some possible applications of these devices and some control theory. Once you get the hang of it, you’ll find virtually no control system problem which cannot be solved through a PLC. The added benefits of an HMI really bring the system to a much higher level of functionality and serves to add that “manufacturer-level” quality to your project.
Next time we’ll dig deeper into the ladder logic programming and continue to tie all of these concepts together.
Sloatman is the director of engineering for SummitMedia’s Richmond, Va., radio stations.