How to Solve Communication Issues Between Touch Screen and PLC

Click the blue text

Follow us

Sometimes we follow many public accounts and miss some favorite messages, unable to see the Industrial Control Forum’s push notifications in time. We can star or pin the public account. How to star and pin? 【Open an article from the Industrial Control Forum public account, click the blue text below the article title to enter the public account, select ‘Set as Star’ from the ‘…’ in the upper right corner to pin the public account】

Masters often encounter this problem: why can’t my touch screen communicate with the PLC?

For example, here are two issues:

1. Why can’t the Weintek touch screen communicate with the Siemens PLC, always prompting that the PLC is unresponsive? How should I set it up?

Solution Approach: Ensure that the baud rate, data bits, and stop bits are the same; 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 functioning properly…

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

Solution Approach: A common method is to use heartbeat detection, defining a boolean variable that the HMI sets at a fixed frequency. After the PLC receives this point as an ON signal, it resets it. If, within a certain period (for example, 5 seconds), the ON signal is not received, it is considered a communication interruption. The PLC sends the memory clock byte to the screen, which uses a script to assign this byte’s value to another address in the PLC. Then, the PLC checks if the returned byte values are the same over two scanning cycles. If they are the same, it indicates a communication interruption.

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

1. Create a DB1 data block in the PLC, containing two switch variables: “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 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 “HMI Communication Failure” if the “HMI Response Switch” does not act within 1 second, because after the HMI communication anomaly, the “HMI Response Switch” will no longer change.

How to Solve Communication Issues Between Touch Screen and PLC

Good method, take it freely~

In fact, any communication failure between touch screens and PLCs generally involves confirming 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 OK, check if there is an issue with the PLC program or the PLC address.

1

First, check the parameters

Use the PLC programming software to connect to the PLC and test what the PLC parameters are, checking if the parameters set in the project match those tested. There are several parameters that need special attention:

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

(2) Device type: This is the most crucial; 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 inside the PLC.

2

Online simulation

Using our configuration software, connect the PLC with the communication cable to the computer and perform an online simulation to see if the project can communicate. You can use a numeric input component or switch to operate it. After closing the simulator, check if the previous operations still exist when reopening the online simulation, and if it directly indicates NC. (If NC appears and the previous operations were not recorded, it means there is no communication.) The specific approach is:

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

(2) Create a simple project. Place two components: a numeric display and a numeric input. Set the address to match the PLC’s address.

(3) Ensure the project parameter settings match those in the PLC.

(4) Click 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 with the PLC and parameter settings.

3

Test the lines

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

Source/Network, infringement deletion

Previous · Recommendations

Why is it so difficult to read complex electrical diagrams? It’s because your method is wrong!

Bus vs. Cable: Do you know which has the advantage?

60 knowledge points to help you understand motor and electrical control technology instantly!

Crafted with care, the Deep Vision SR9000 series leads the future of 3D machine vision.

CAD vs. EPLAN! Which is your first choice for electrical drafting?

Regarding PLC programming, here are 12 tips from veteran engineers; check them out!

153 basic electrical symbols are all here; say goodbye to the manual!

How to Solve Communication Issues Between Touch Screen and PLC

Share, read, and like; at least I want to have one!

Leave a Comment