Reasons and Solutions for Touch Screen and PLC Communication Issues

Reasons and Solutions for Touch Screen and PLC Communication Issues

Engineers often encounter the following problem: why can’t my touch screen communicate with the PLC? For example, here are two common issues:

1. Weintek Touch Screen and Siemens PLC Cannot Communicate, Always Prompting PLC No Response. How Should I Set It Up?

Solution Approach:

You need to set the same baud rate, the same data bits, and the same stop bits. The station number cannot be the same, meaning the PLC and the touch screen addresses cannot be identical. Then, check if the communication cable is functioning properly…

2. How to Determine If There Is a Fault in Communication Between the Touch Screen and PLC Through Programming?

Solution Approach:

The usual method is to use a heartbeat detection. Define a boolean variable, and the HMI will set this point at a fixed frequency. After the PLC receives the ON signal for this point, it will reset it. If the ON signal is not received within a certain time, say 5 seconds, it is considered that the communication is interrupted.

The PLC sends the memory clock byte to the screen, and the screen uses a script to assign this byte value to another address within the PLC. Then, the PLC checks if the returned byte values are the same for two scanning cycles. If they are the same, it indicates a communication interruption.

For example, please see the image, and follow these steps:

1. Create a DB1 data block in the PLC, containing two digital switches: “PLC Second Switch” and “HMI Response Switch”;

2. Connect these two variables in the HMI variables;

3. In the properties of the HMI variable “PLC Second Switch” – events – value change, add “Invert”, so that the “HMI Response Switch” variable changes according to the “PLC Second Switch”;

4. In the PLC program block, program to reverse the “PLC Second Switch” every 0.5 seconds, and then use the TON delay instruction to output “HMI Communication Failed” if there is no action from the “HMI Response Switch” within 1 second, because after the HMI communication anomaly, the “HMI Response Switch” will no longer change.

Reasons and Solutions for Touch Screen and PLC Communication Issues

In fact, any communication issues between touch screens and PLCs in the market can be attributed to confirming four questions:

1. Are the PLC parameters consistent with those in the project?

2. Is the communication line connected according to the wiring diagram?

3. Is the COM port set in the project correctly connected to the screen?

4. If the parameters and wiring are confirmed OK, check if there is an issue with the PLC program or its address.

Method:

First, check the parameters:

1. Use the PLC programming software to connect to the PLC and test what the PLC parameters are, and whether they match the parameters set in the project.

2. Online simulation: Use our configuration software, connect the PLC’s communication cable to the computer, and simulate online to see if the project communicates. You can use a numeric input component or a switch to operate it, and see if the previous operations are still present after closing the simulator and reopening the online simulation. If NC is directly prompted (NC means the previous operation was not written down, indicating no communication), then it is not connected.

Test the wiring:

Use a multimeter to test the wiring according to the pin definitions in the wiring diagram.

1. Touch Screen Parameters. Check the parameter settings of the touch screen.

There are several parameters that need special attention:

1: Communication port settings – you must confirm whether the PLC is connected to COM1 or COM2 of the touch screen.

2: Device type – this is the most important; if the protocol is not selected correctly, there is no need to discuss anything else.

3: Connection method – confirm whether the connection between the PLC and touch screen is RS485 or RS232C.

4: Interface parameters and PLC station number – must match the settings inside the PLC.

2. If the parameter settings are confirmed, the next step is to check the wiring issues.

Confirm whether the RS485 and RS232C wiring is correct; the wiring methods for touch screens and various PLCs are different. This can be referenced in the Weikong (PLC and Touch Screen Communication Wiring Help Document), which is the basic method for troubleshooting communication issues.

Next, I will teach you how to bypass touch screen issues – online simulation. When communication fails, some customers may speculate that it is a problem with the touch screen or the interface. Online simulation bypasses the touch screen and directly connects the PLC to the computer.

Specific steps:

1: Connect the PLC to the computer via RS232. Some PLCs have RS232 interfaces, while others do not; if not, they can be connected to the computer via an adapter.

2: Create a simple project. Place two components, one numeric display and one numeric input. Set the address to the PLC’s internal address.

3: The project parameter settings must match those inside the PLC.

4: Click on the online simulation function.

This way, you can clearly see if the PLC can communicate with the PC. If communication is successful, you can rule out issues on the PLC side and parameter setting issues.

Reasons and Solutions for Touch Screen and PLC Communication Issues

Leave a Comment