It is common for technicians to encounter the issue: why can’t my touch screen communicate with the PLC? Here are two problems that might occur:
1. Weintek Touch Screen Cannot Communicate with Siemens PLC, Always Prompting No Response from PLC. How Should I Set It Up?
Solution approach:
You need to set the same baud rate, the same bit count, and the same stop bit; the station numbers must not be the same, meaning the PLC and touch screen addresses cannot be identical. Then check if the communication line is normal…
2. How to Programmatically Determine if There is a Communication Fault Between the Touch Screen and PLC?
Solution approach:
The usual method is to use a heartbeat detection. Define a boolean variable, and the HMI sets this point at a fixed frequency. After the PLC receives this point as an ON signal, it resets 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, which uses a script to assign this byte’s value to another address within the PLC. Then the PLC checks if the returned byte values are the same over two scan cycles. If they are the same, it indicates a communication interruption.
For example, see the image below, 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 “PLC Second Switch” variable, under events, add “Invert Position” so that the “HMI Response Switch” variable changes according to 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, because after a communication anomaly, the “HMI Response Switch” will no longer change.
Good method, feel free to take it!~
In fact, when any touch screen cannot communicate with the PLC, there are four issues to confirm:
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 wiring 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 see what the PLC parameters are, and check if they match the parameters set in the project.
2. Online simulation: use our configuration software to connect the PLC with the computer using the PLC’s communication cable to see if the project communicates. You can use a numeric input component or switch to operate and check if the previous operations are still there after turning off the simulator and then turning on the online simulation; if NC is directly prompted, it means there is no communication.
Testing the 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 — you must confirm whether the PLC is connected to the COM1 or COM2 port of the touch screen.
2. Device type — this is the most important; if the protocol is not selected correctly, nothing else matters.
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 be consistent with the settings in the PLC.
2. If the parameters are confirmed and set correctly, the next step is to check the wiring issues.
Confirm whether the RS485 and RS232C wiring is correct; the wiring methods for the touch screen and various PLCs are different. You can refer to the Weikong (PLC and Touch Screen Communication Wiring Help Document) for this, which is a basic method for troubleshooting communication issues.
Next, I will teach you how to bypass the touch screen issue — online simulation. When communication fails, some customers might suspect that the touch screen or the interface is the problem. Online simulation is a way to bypass the touch screen and directly connect the PLC to the computer.
Specific steps:
1. Connect the PLC to the computer via RS232. Some PLCs have an RS232 interface, while others do not; if not, you can connect to the computer via an adapter.
2. Create a simple project. Place two components: a numeric display and a numeric input. Set the addresses to those in the PLC.
3. Ensure the project parameter settings match those in the PLC.
4. Click on the online simulation function.
Doing this will clearly show whether the PLC can communicate with the PC. If communication is possible, you can rule out issues on the PLC side and parameter setting issues.
ClickRead Original to learn about electrical engineering, PLCs, frequency servos, CNC robots, and more.
↓↓↓