How to Solve Touch Screen and PLC Communication Issues

How to Solve Touch Screen and PLC Communication Issues

Technicians often encounter the issue: why can’t my touch screen communicate with the PLC? Here are two common problems:

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, the same stop bits, and ensure that the station numbers are not the same, meaning the PLC and touch screen addresses cannot be the same. Then check if the communication line is normal…

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

Solution Approach:

The usual method is to use heartbeat detection, define a boolean, 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 ON signal is not received within a certain period, say 5 seconds, it is considered a communication interruption.

The PLC transmits the memory clock byte to the screen, and the screen uses a script to assign the value of this byte to another address inside the PLC. Then the PLC checks if the returned byte is the same for two scan cycles; if they are the same, it indicates a communication interruption.

For example, see the image below, steps are as follows:

1. Create a DB1 data block in the PLC, 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 —- event —- 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” has no action within 1 second, because after the HMI communication anomaly, the “HMI Response Switch” will no longer change.

How to Solve Touch Screen and PLC Communication Issues

Good method, take it away with no thanks~

In fact, any touch screen that cannot communicate with the PLC in the market generally 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 to the screen?

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

Method:

First, check the parameters:

1. Use the PLC programming software to connect to the PLC and test what the PLC parameters are, and see if 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 can communicate. You can use a numeric input component or switch to operate, and check if the previous operations are still there after closing the simulator and reopening the online simulation, or if it directly prompts NC. (NC means the previous operations were not recorded, indicating no communication).

Test line:

Use a multimeter to test the wiring according to 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 – be sure to confirm whether the PLC connects to COM1 or COM2 of the touch screen.

2: Device type – this is the most important; if the protocol is not selected correctly, there’s no need to say more.

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

4: Interface parameters and PLC station number – they must be consistent with the settings inside the PLC.

2. If the parameter settings are confirmed to be correct, then check the line issues.

Confirm whether the wiring for RS485 or RS232C is correct, as the wiring methods between touch screens and various PLCs are different. You can refer to the Weikong (PLC and Touch Screen Communication Wiring Help Document) to check, this is the basic method for normal troubleshooting of communication issues.

Next, I will teach you how to bypass the touch screen issue – online simulation. When communication fails, some customers may speculate that it might be the touch screen issue or the interface issue. Online simulation is a way to bypass the touch screen and connect directly between the PLC and the computer.

Specific steps:

1: Connect the PLC to the computer via RS232. Some PLCs have RS232 interfaces, while others do not; those without can connect to the computer via an adapter.

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

3: Make sure the project parameter settings are the same as those inside 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 parameter settings.

Click to read the original text,learn the knowledge of communication between touch screens and PLCs for free

↓↓↓

Leave a Comment