How Touch Screens Communicate with PLCs: A Simple Guide

How Touch Screens Communicate with PLCs: A Simple Guide

In practical control projects centered around PLCs, most cases rely on the cooperation of touch screens or upper-level computers. This is because we use PLCs for control, primarily dealing with some analog quantities, which are the values we need to monitor, such as pressure, temperature, and flow on the equipment. These detected values are then used to control electric valves, fans, and pumps based on certain conditions. However, we cannot see these values directly from the PLC; to view them, we need to use a touch screen or an industrial computer (which is essentially a computer).

First, it should be noted that this article only outlines the general working principle and process of touch screens; it is not a step-by-step guide on how to use a touch screen. I believe it is more important to understand its principles and workflow before using and operating a touch screen.

As shown in Figure 1 below, once we connect the touch screen and the PLC, we can see the data we want on the touch screen. In addition to data, we can also control various controlled objects on-site through the touch screen. For example, if we configure a switch on the touch screen, simply clicking this switch can start a motor on the site.

How Touch Screens Communicate with PLCs: A Simple Guide

Figure 1

So what is the principle of communication between the touch screen and the PLC? Look at Figure 2 below, which shows a real touch screen from the front and back. The front is, of course, the display surface.

We mainly look at the back, which has three interfaces:

1. Power Interface: This supplies power to the touch screen, with most voltages being DC24V. The parameter label on the touch screen indicates this.

2. Configuration Download Interface: This is where we use the configuration software provided by the touch screen manufacturer to design the screens and functions we want on a computer, and then download them to the touch screen through this interface. Each touch screen manufacturer has its own software, which is not universally compatible, but it doesn’t matter; the principles are the same. Once you learn one, you only need to familiarize yourself with the software interface of others.

3. Communication Interface: This interface is used for communication with the PLC. The interface types are mainly divided into RS232, RS485, and Ethernet (if you are unclear about what 232 and 485 are, you can refer to my previous articles, which provide a dedicated introduction). It is important to note that the form of this interface must match the form of the PLC’s interface. The touch screen brand in Figure 2 is Kunlun Tongtai, and its interface is RS485, so when connecting to the PLC, the PLC’s interface must also be RS485.

How Touch Screens Communicate with PLCs: A Simple Guide

Figure 2

Having looked at the exterior of the touch screen, let’s now examine its interior. Look at Figure 3 below, which is an internal schematic I created for the touch screen. It may not be comprehensive or rigorous, but the important parts are drawn out, and as long as you can understand it, that’s okay.

The internal structure of the touch screen can be roughly divided into: communication interface unit, driving unit, memory variable unit, and display unit. Except for the display unit, the other three units are not visible inside the touch screen.

1. Communication Interface Unit: This unit is primarily responsible for sending the data packets packaged by the driving unit to the communication interface on the back of the touch screen, which then sends them to the PLC. We do not need to intervene in these processes; the touch screen will complete them automatically. What we need to do is choose a driver from the driving unit, which essentially means telling the touch screen which driver data packet to send.

2. Driving Unit: This unit stores many communication files that connect to the PLC, with one file corresponding to one communication protocol (if you are unsure about communication protocols, refer to my earlier articles). We refer to these files as drivers. In other words, one driver corresponds to one communication protocol. For example, if the Siemens S7-200 PLC uses the PPI communication protocol, then the touch screen manufacturer will write a file that can communicate with the Siemens S7-200 PLC using the PPI protocol and place it in the driving unit.

For instance, when our touch screen wants to connect with a Siemens 200 PLC, we select the PPI driver in the touch screen. If we want to connect with a Siemens 300 PLC, we choose the MPI (MPI is the communication protocol for Siemens 300 PLC) driver. These driver files are pre-written by the touch screen manufacturer; we can only select them and cannot modify them. The more drivers the touch screen has, the broader the range of PLC brands or communication protocols we can choose from. Currently, mature touch screen manufacturers have built-in drivers that cover most commonly used PLCs and communication protocols on the market.

Therefore, when we have a touch screen and want to choose a PLC for communication, we must check if there is a driver in the touch screen that can communicate with this PLC.

3. Memory Variable Unit: This unit is also built into the touch screen by the manufacturer. It is essentially a storage area that can hold various types of data, which can be roughly divided into numeric, switch, character, and special types.

For example, if we want to display the water temperature of a boiler on the touch screen, we can create a variable in the memory variable unit of the touch screen and name it “Boiler Water Temperature” (the name can be arbitrary), selecting the numeric type as the data type. The touch screen will automatically allocate a small area in the memory unit for this variable. When the touch screen communicates with the PLC, it will store the water temperature data read from the PLC in this small area, which is the variable “Boiler Water Temperature.” When we need to display multiple data points, we simply create multiple variables.

At this point, you may still not fully understand; no worries, I will explain it systematically according to Figure 4 below, and you will understand.

4. Display Unit: This unit is straightforward; everything we can see on the touch screen display is in the display unit. Taking the “Boiler Water Temperature” as an example, if we want to display the water temperature of the boiler, we simply place a display component (this component is available on every touch screen, just drag it onto the screen) in the display unit and connect it to the “Boiler Water Temperature” variable we created earlier.

How Touch Screens Communicate with PLCs: A Simple Guide

Figure 3

Having explained each unit, the most challenging to understand are the driving unit and memory variable unit. You may still not fully grasp it; however, I will explain it systematically according to Figure 4 below, and you will understand.

Figure 4 illustrates the functionality to be achieved: connecting the touch screen with the Siemens S7-200 PLC. 1. The touch screen can display a pressure value from the PLC. 2. It can control a switch quantity in the PLC through a switch component on the touch screen.

In the first step, we first select the driver in the touch screen, and since we are connecting with the Siemens S7-200 PLC, we need to choose the “Siemens S7-200 PPI Communication Driver” from the driving unit. Once the driver selection is complete, the touch screen will automatically connect the selected driver with the communication interface unit and the memory variable unit. Next, let’s take a look at the internal structure of this driver (the orange part in Figure 4), which contains many addresses like V0.0, VB10, VW10, etc. These addresses correspond one-to-one with the addresses in the PLC, and the data and status inside are also the same as those in the PLC. For example, if the data in PLC’s VD10 is 123.5, then the data in the touch screen driver’s VD10 will also be 123.5. Thus, the touch screen has the data, but this data still cannot be displayed because it has not been transmitted to the display unit. How can we do that?

In the second step, we create a variable in the memory variable unit called “Tank Pressure,” and we connect this variable with VD10 in the driving unit. Now the “Tank Pressure” variable will contain the data 123.5. However, the data still cannot be displayed because it has not yet been transmitted to the display unit.

In the final step, we place a display component with a display function in the display unit and connect this display component with the “Tank Pressure” variable in the memory variable unit. This way, we can see the data 123.5. It seems quite complex, but essentially, we only need to connect these units through a newly created variable, and the touch screen will handle the rest automatically.

Once you understand the workflow for displaying numerical values on the touch screen, controlling switch quantities becomes simple. You just place a switch component in the display unit and create a variable to connect it with the driving unit and the display unit. As for how the touch screen transmits this data to the PLC, you don’t need to worry; the communication interface unit will take care of that.

How Touch Screens Communicate with PLCs: A Simple Guide

Figure 4

Figure 5 is an overall connection schematic, which is the most basic combination method. Through this PLC + touch screen combination, we achieve true human-machine dialogue. The data within the PLC is clear at a glance, and by adding a few switch components on the touch screen, we can reduce the actual use of physical switches, thereby minimizing the impact of poor contact of actual switch contacts on the control system and improving system stability.

How Touch Screens Communicate with PLCs: A Simple Guide

Figure 5

Source: Da Hua Industrial Control, please delete if infringed.

How Touch Screens Communicate with PLCs: A Simple Guide
How Touch Screens Communicate with PLCs: A Simple Guide
Explosion!Complete National Question Bank for Low Voltage Electricians 2020
How Touch Screens Communicate with PLCs: A Simple Guide
The Electrician Growth Plan from 0 to 1, worth a look for confused electricians!

How Touch Screens Communicate with PLCs: A Simple Guide

How Touch Screens Communicate with PLCs: A Simple Guide
Click here if you like
How Touch Screens Communicate with PLCs: A Simple Guide
Learn PLC and Electrical Courses for Free, click to read the original text

Leave a Comment