Geometric abstract art background with bold shapes and contrasts
Computer Case,Online Electronics Shopping,Notebook Computer Blog - wintroncomputer.com.

How to judge the touch screen and PLC communication failure through the program?

Many engineers and technicians often face a common challenge: How can the touch screen and PLC communicate effectively? For instance, two typical issues that may arise are as follows:

1. The Weiluntong touch screen is unable to communicate with the Siemens PLC, constantly displaying an error message like “PLC not responding.” What settings should be adjusted?

Solution: Ensure that both devices have matching baud rates, data bits, and stop bits. Also, make sure that the station numbers (or addresses) of the PLC and the touch screen are different. Additionally, check if the communication cable is properly connected and functioning.

2. How can you detect communication failures between the touch screen and PLC through programming?

Solution: A common approach is to use a heartbeat mechanism. Define a boolean variable in the HMI that updates at fixed intervals. When the PLC receives the signal, it resets the variable. If the signal isn’t received within a set time (e.g., 5 seconds), it’s considered a communication failure.

Another method involves sending a memory clock byte from the PLC to the touch screen. The screen uses a script to assign this value to another address in the PLC. If the returned byte doesn’t match the expected scan cycle, it indicates a communication issue.

For example, follow these steps:

1. Create a DB1 data block in the PLC containing two switches: “PLC Seconds Switch” and “Human-Machine Response Switch.”

2. Connect these variables in the HMI project.

3. In the attributes of the “PLC Seconds Switch,” add a “reverse bit” event so that the “Human-Machine Response Switch” changes accordingly.

4. In the PLC program, toggle the “PLC Seconds Switch” every 0.5 seconds using a TON timer. Set the “Human-Machine Response Switch” to trigger an alarm if no response is received within 1 second, which would indicate a communication failure.

This is a practical and effective solution—feel free to try it out! Thanks for reading!

In fact, any communication between a touch screen and a PLC on the market typically boils down to checking four main factors:

1. Are the PLC parameters consistent with the project setup?

2. Is the communication cable connected correctly according to the wiring diagram?

3. Is the correct COM port selected in the project when connecting to the touch screen?

4. After confirming the parameters and cabling, check whether the issue lies in the PLC program or address configuration.

Here's how to troubleshoot:

First, verify the parameters:

1. Connect the PLC to the programming software and compare the actual settings with those in the project to ensure consistency.

2. Use online simulation with your configuration software by connecting the PLC directly to the computer via its communication cable. Test with a numeric input or switch component to see if the system responds correctly. If it does, the issue may lie elsewhere.

Next, test the communication line:

Use a multimeter to check the wiring against the specified pinout in the documentation.

Then, review the touch screen settings:

Several key parameters need attention:

1. Communication port setting — confirm whether it's COM1 or COM2 based on the PLC connection.

2. Device type — this is crucial; if the protocol isn’t selected correctly, nothing else will work.

3. Connection method — confirm whether it's RS485 or RS232C.

4. Interface parameters and PLC station number — they must match the PLC settings exactly.

After confirming the parameters, check the wiring again. Make sure the RS485 or RS232C connections are correct, as different PLCs may require different wiring schemes. Refer to the official communication wiring guide for your specific devices.

Finally, here’s a trick to bypass potential touch screen issues: perform an online simulation. If the communication isn't working, some users might suspect a problem with the touch screen or interface. Online simulation allows you to connect the PLC directly to the computer, skipping the touch screen entirely.

Steps to do this:

1. Connect the PLC to the computer using an RS232 cable. Some PLCs have built-in RS232 ports, while others may require an adapter.

2. Create a simple project with two components: one for displaying values and one for inputting them. Assign the appropriate PLC addresses.

3. Ensure the project settings match the PLC configuration exactly.

4. Click the "Online Simulation" button.

If the PLC communicates successfully with the computer, then the issue is likely not with the PLC itself but with the touch screen or configuration settings.

Xlr Connector

Xlr Connector,Xlr Female Speaker Cable,Speakon Xlr Male Cable,Speakon Male Xlr Female Cable

Changzhou Kingsun New Energy Technology Co., Ltd. , https://www.aioconn.com