Click the “blue text” above to follow the Industrial Control Coach!
A touch screen is short for HMI, which stands for Human-Machine Interface. As the name suggests, it is a tool for interaction between humans and machines.
The essence of a touch screen is a virtual instrument, used to replace various operational and monitoring devices such as switches, ammeters, voltmeters, and thermometers.
The control of the PLC itself is accomplished by changing the state of control registers D, input ports X, soft relay states M, and timer relay states T. Therefore, as long as we can modify the state of these variables, we can control the PLC. The touch screen can achieve these operations through communication with the PLC via the 232 or 485 ports, allowing the touch screen to control the PLC.
Ordinary switch buttons control the PLC through hard wiring, while the touch screen uses communication to control the PLC. Generally, the touch screen acts as the master station, and the PLC acts as the slave station. In the early days, serial communication such as RS232 and RS485 was commonly used. With the reduction in costs, industrial Ethernet has gradually become popular. Some systems also use bus communication, such as CANopen and ProfibusDP, but these are relatively rare and typically found in special industries or devices.
Controlling the PLC with a touch screen is similar to how the PLC uses communication to control frequency converters, with the touch screen acting as the communication master to read and write the PLC as a slave. In fact, the programming software for various PLCs can also be understood as a touch screen, as it operates the PLC through communication. Therefore, those involved in automation must understand the principles and apply them broadly to achieve better results.
First, let’s look at a piece of code.
As shown in the figure, this piece of code means to start a motor, which will automatically stop after a set time. Traditionally, we would use a button to start it, and setting the time would be quite troublesome, usually fixed. To modify the time, one would have to change the program, which is clearly impractical. The touch screen was born in such a context.
As shown in the figure, we added a PLC1 in the configuration software, indicating that the touch screen establishes a communication connection with the PLC, with the touch screen as the master and the PLC as the slave. The touch screen can read and write data from the PLC. This is similar to how the PLC acts as the master to read from the frequency converter.
The control principle of the touch screen is to read and write the slave address, which is the same as how the PLC reads and writes to the frequency converter. Therefore, mastering the principles in industrial control and applying them broadly is very important.
For example, if we want to modify the set time, d_xT0, we first check its address in the PLC tags.
As shown in the figure, the address of d_xT0 is D0, so we only need to create a component in the touch screen to write to D0.
As shown in the figure, we created a numeric input component with the operation address D0. Therefore, when we operate on the touch screen, it is equivalent to writing a value into the PLC address D0.
This is the principle of touch screen control over the PLC. Other operations, such as starting and stopping, are similar. Thus, learning industrial control is about mastering the principles and applying them broadly, rather than just being pleased with having learned a few commands.
Share with friends to broaden knowledge
Click to read the original text, enter the “Practical Case Video“