Reasons and Solutions for Touchscreen and PLC Communication Issues

Reasons and Solutions for Touchscreen and PLC Communication Issues

Reasons and Solutions for Touchscreen and PLC Communication Issues

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

1. The Wecon touchscreen cannot communicate with the Siemens PLC, always prompting that the PLC is unresponsive. What should be set up?

Solution approach:

You need to set the same baud rate, the same bit count, and the same stop bit. The station number must not be the same, meaning the PLC and touchscreen addresses cannot be identical. Then, ensure that the communication line is functioning properly…

2. How to determine through the program when there is a communication failure between the touchscreen and the PLC?

Solution approach:

Typically, the method is to use heartbeat detection, defining a boolean value. The HMI sets this point at a fixed frequency, and the PLC resets it after receiving the ON signal from this point. If the ON signal is not received within a certain period, such as 5 seconds, it is considered that communication has been interrupted.

The PLC sends the memory clock byte to the screen, which uses a script to assign the value of this byte to another address within the PLC. The PLC then checks whether the returned byte is the same over two scanning cycles. If it is the same, it indicates a communication interruption. For example, please see the diagram, the steps are as follows:

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”, allowing the “HMI Response Switch” variable to change with the “PLC Second Switch”;

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

Reasons and Solutions for Touchscreen and PLC Communication Issues

In fact, any touchscreen on the market that cannot communicate with the PLC usually requires confirmation of 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 correct when connecting to the screen?

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

Method:

First, check the parameters:

1. Use the PLC programming software to connect to the PLC and check what the PLC parameters are, and see if they match the parameters set in the project.

2. Online simulation: Use our configuration software to connect the PLC with its communication cable to a computer and perform online simulation to see if the project can communicate. You can use a numeric input component or a switch to operate and check if the previous operations persist after turning off the simulator, or if it directly prompts NC. (If NC appears, it means the connection is not established.)

Testing the line:

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

1. Touchscreen parameters. Check the parameter settings of the touchscreen.

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 touchscreen.

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 touchscreen is RS485 or RS232C.

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

2. If the parameters are confirmed to be set correctly, the next step is to check for issues with the wiring.

Confirm whether the RS485 and RS232C wiring is correct; the wiring methods for connecting the touchscreen to various PLCs are different.This can be referenced in the Wecon (PLC and touchscreen communication wiring help document) for guidance; this is the basic method for troubleshooting communication issues.

Next, I will teach you how to bypass touchscreen issues – online simulation.When communication fails, some customers may speculate that it could be an issue with the touchscreen or the interface. Online simulation bypasses the touchscreen 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, an adapter can be used to connect to the computer.

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

3: Ensure the project parameters match the settings in the PLC.

4: Click the online simulation function.

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

Reasons and Solutions for Touchscreen and PLC Communication Issues

Reasons and Solutions for Touchscreen and PLC Communication Issues

Leave a Comment