Recently, while debugging a production line at a beverage factory, operator Lao Wang complained, “This touchscreen is too difficult to use, the button positions are unreasonable, and there are frequent issues with inaccurate data display.” This made me realize that many factories face similar problems. In fact, the interaction design between PLCs and Human-Machine Interfaces (HMIs) is a key aspect of automation systems. When done well, it can not only improve operational efficiency but also reduce failure rates. Today, let’s discuss the interaction design between PLCs and HMIs.
plchmi
What is the relationship between PLC and HMI?
Simply put, the PLC acts like the brain of the factory, responsible for logic control and signal processing; while the HMI serves as the “translator” between humans and machines, allowing operators to intuitively monitor and control equipment. The relationship between PLC and HMI is akin to that of a computer’s main unit and monitor, with one responsible for computation and processing, and the other for display and input.
I remember when I first entered the industry, I treated PLCs and HMIs as two independent systems during design, which led to numerous issues during debugging. It was only later that I understood that their data interaction and communication methods are the core of the design.
1
Selecting the Appropriate Communication Method
The most commonly used communication methods between PLCs and HMIs include RS232/485 serial communication, Ethernet communication, and fieldbus. For small systems, I usually recommend RS485 communication due to its low cost and good stability; for larger systems, Ethernet is recommended for its fast transmission speed and ability to connect multiple devices simultaneously.
Once, at a textile factory, I used a Siemens S7-1200 PLC with a Weintek touchscreen, utilizing Ethernet communication. The operators reported that the interface switching was particularly smooth, and the monitoring data had almost no delay, which was mainly due to the high bandwidth of Ethernet. Different brands of PLCs and HMIs may have different communication protocols, so it’s essential to consult the technical manuals to confirm compatibility before making a selection.
2
Data Mapping is Key
The core of data interaction between PLCs and HMIs lies in address mapping. For example, if I want to display a temperature value on the touchscreen, and this value is stored in the D100 data register in the PLC, then in the HMI software, I need to create a display object associated with the D100 address.
A useful tip is to place frequently used data in consecutive addresses. For instance, I usually place all temperature values that need to be displayed on the HMI in D100-D110, and pressure values in D200-D210. The benefit of this approach is that the HMI can read data in batches, improving communication efficiency and reducing lag.
Recently, I encountered an interesting problem: a client reported that the temperature displayed on the HMI was fluctuating and unstable. Upon inspection, I found that the refresh rate of the temperature data in the PLC program was too high, while the HMI’s reading frequency could not keep up. The solution was to add a buffer in the PLC, updating the HMI’s reading area only after a certain time interval, which immediately resolved the issue.
3
Practical Principles of Interface Design
The HMI interface design follows a “three-second principle”: operators should be able to find the required information or function within three seconds. This requires us to consider the actual operational logic during design. The most important information and the most frequently used buttons should be placed in the most prominent positions, such as the center or the upper left corner.
At an injection molding factory, I redesigned the HMI interface, consolidating the temperature monitoring that was previously scattered across three pages into one page, using different colors to distinguish the temperatures of different areas. This small change improved the operators’ work efficiency by 30%, as they no longer needed to frequently switch pages to check data.
Additionally, don’t forget to design anti-misoperation features. For critical operations such as starting the production line or changing important parameters, it’s best to add a secondary confirmation pop-up or permission control. I once had a client who suffered significant losses because a lack of such design led to an operator’s misoperation that caused the entire production line to stop for half a day.
4
Common Problems and Solutions
Communication interruptions are the most common issue. When encountering this situation, first check if the physical connections are secure, then check if the communication parameters (such as baud rate, data bits, parity bits, etc.) match, and finally consider whether there is a device failure.
Data desynchronization is also common, for example, the value in the PLC has changed, but the HMI still displays the old value. This is usually due to an unreasonable refresh cycle set for the HMI, or issues with the data update logic in the PLC program. My experience is that for rapidly changing data, a buffer can be set in the PLC, updating the HMI’s reading area only when the change exceeds a certain threshold.
Remember one thing: when debugging automation systems, do not modify multiple parts of the program simultaneously, as this will make fault location difficult. Use a step-by-step debugging method, changing only one part at a time, and confirming correctness before proceeding to the next modification.
5
Safety is Always the Top Priority
Finally, I would like to remind everyone that safety measures are essential when designing PLC and HMI systems. Emergency stop buttons should be easily accessible on every page of the HMI, and it’s best to configure a hardware emergency stop button as well. The system should have a self-diagnostic function that automatically shuts down and alarms in case of abnormalities.
Through years of project experience, I have found that good PLC-HMI interaction design not only improves production efficiency but also reduces operational errors and equipment failures. I hope these experiences are helpful to you, and feel free to leave comments for discussion. Next time, we will talk about how to optimize PLC program structure for more stable and efficient system operation.