How to Solve Touch Screen and PLC Communication Issues

Many technicians encounter the following problem: why can’t my touch screen communicate with the PLC?

For instance, here are two issues:

1. Weintek Touch Screen and Siemens PLC cannot communicate, always prompting that the PLC is unresponsive. How should it be set up?

Solution: Set the same baud rate, the same bit count, and the same stop bits. The station numbers must be different, meaning the PLC and touch screen addresses cannot be the same. Then, check if the communication line is functioning properly…

2. How to determine through programming if there is a communication failure between the touch screen and PLC?

Solution: The usual method is to use heartbeat detection. Define a boolean variable, and the HMI will set this point at a fixed frequency. After the PLC receives this point as an ON signal, it will reset it. If the PLC does not receive the ON signal within a certain time frame, for example, 5 seconds, it will consider the communication interrupted. The PLC sends the memory clock byte to the screen, which uses a script to assign this byte’s value to another address within the PLC. Then, the PLC checks if the returned byte’s value remains the same for two scan cycles. If it does, it indicates a communication interruption.

For example, see the image below, with the following steps:

1. Create a DB1 data block in the PLC and set 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 “PLC Second Switch” variable – Events – Value Change, add “Invert”, so that the “HMI Response Switch” variable changes with the “PLC Second Switch”;

4. In the PLC program block, program the “PLC Second Switch” to toggle every 0.5 seconds, and then use the TON delay instruction to output “HMI Communication Failure” if the “HMI Response Switch” does not change within 1 second, because after a communication anomaly, the “HMI Response Switch” will no longer change.

How to Solve Touch Screen and PLC Communication Issues

Good method, take it without thanks~

In fact, any touch screen that cannot communicate with the PLC on the market usually needs to confirm four issues:

(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 on the screen;

(4) If the parameters and lines are confirmed to be OK, check if it is a PLC program or address issue.

1

First, check the parameters

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. There are several parameters that need to be particularly noted:

(1) Communication port settings: Confirm whether the PLC connects to the touch screen via COM1 or COM2;

(2) Device type: This is the most important; if the protocol is not selected correctly, nothing else matters;

(3) Connection method: Confirm whether the PLC is connected to the touch screen via RS485 or RS232C;

(4) Interface parameters and PLC station number: Must be consistent with the settings in the PLC.

2

Online Simulation

Using our configuration software, connect the PLC to the computer with the PLC’s communication cable and perform an online simulation to see if the project can communicate. You can use a numeric input component or switch to operate it and check if the operations persist after closing the simulator and reopening the online simulation, or if it directly prompts NC. (If NC appears and the previous operations are not retained, it means there is no communication.) The specific steps are:

(1) Connect the PLC to the computer via RS232. Some PLCs have RS232 interfaces, while others do not; if not, use an adapter to connect to the computer.

(2) Create a simple project. Place two components: one numeric display and one numeric input. Set the addresses to match those in the PLC.

(3) Ensure that the project parameters are set to match the PLC settings.

(4) Click the online simulation feature.

This will allow you to clearly see whether the PLC can communicate with the PC. If communication is successful, you can rule out issues with the PLC and parameter settings.

3

Test the Wires

Use a multimeter to test the wiring according to the wiring diagram’s pin definitions. Confirm whether the wiring for RS485 and RS232C is correct, as the wiring methods for touch screens and various PLCs differ. This can be referenced in the manual, and this is a basic method for troubleshooting communication issues.

Source: Internet, copyright belongs to the original author. If there is any infringement, please contact for deletion!

Leave a Comment