Engineers often encounter such problems: why can't my touch screen communicate with PLC? For example, the following two concrete problems.
1. The touch screen can't communicate with Siemens PLC. It always prompts that PLC doesn't respond. How to set it?
Solution:
You can set the same baud rate, the same number of bits, the same stop bit, and the station number cannot be the same, that is, the PLC and touch screen addresses cannot be the same, and then determine whether the communication line is normal.
2. How to judge the communication failure between touch screen and PLC through the program?
Solution:
The usual method is to use heartbeat detection, define a bool, set the point at a fixed frequency by HMI, and reset the point after PLC receives the ON signal. If the signal with this point ON is not received within a period of time, such as 5S, it is considered that the communication is interrupted.
The PLC transmits the memory clock byte to the screen, and the screen uses the script to assign the value of this byte to the address in another PLC, and then the PLC judges whether the two scanning cycles of the returned bytes are the same. If so, it indicates that the communication is interrupted.
For example, please see the figure. The steps are as follows:
1. Establish DB1 data block in PLC, which is equipped with two switching values "PLC second switch" and "man-machine response switch";
2. The two variables are connected in the man-machine variable;
3. Add "reverse position" in the attribute - event - value change of man-machine "PLC second switch" variable to make the "man-machine response switch" variable change with the change of "PLC second switch";
4. Program in the PLC program block to make the "PLC second switch" reverse every 0.5 seconds, and then use the TON delay command to make the "man-machine response switch" output man-machine communication failure without action within 1 second because the "man-machine response switch" will no longer change after the man-machine communication is abnormal.
In fact, the communication failure between the touch screen and PLC in the market is nothing more than need to confirm four problems:
1. Whether the PLC parameters are consistent with those in the project
2. Whether the communication line is wired according to the pin of the wiring diagram
3. Is the COM port set in the project connected correctly on the screen
5. If the parameters and lines are OK, check whether there is a problem with the PLC program or the PLC address.
Method:
Judge the parameters first:
1. Connect PLC with PLC programming software to test to see what the PLC parameters are and whether the parameters set in the project are consistent with those tested.
2. Online simulation: use the configuration software to connect the communication cable of PLC with the computer, and conduct an online simulation to see whether the project is in communication. You can use a numerical input component or switch to operate it to see whether the previous operation is still after turning off the simulator and then turning on the online simulation and whether it directly prompts NC. (NC and previous operations do not proceed, that is, they are not connected)
Test line:
Use a multimeter to test the wiring according to the pin definition of the wiring diagram.
1: Touch screen parameters. Check the parameter settings of the touch screen.
There are several parameters that need special attention.
● The setting of the communication port - be sure to confirm whether the PLC is connected to the COM1 port or the COM2 port of the touch screen.
● Equipment type - this is the most important. If the protocol is not selected correctly, there is no need to say anything else.
● Connection mode - the connection between PLC and touch screen. Confirm whether it is RS485 or RS232C.
● Interface parameters and PLC station number - must be consistent with the settings in PLC.
2: If the parameters are set correctly, then check the line.
Confirm whether the wiring of RS485 and RS232C is correct, and the wiring method of the touch screen is different from that of various PLC. This is the basic method for normal troubleshooting of communication problems.
When there is a communication failure, some customers will guess that it may be a problem from the touch screen or the interface. Then online simulation is to bypass the touch screen and connect directly with the computer with PLC.
Specific measures:
1: PLC and industrial computers shall be connected through RS232. Some PLCs have RS232 interfaces, for those that do not have RS232 interfaces can be connected to the computer through the adapter.
2: Create a new simple project. Put two components, one value display, and one value input. And set the address in PLC.
3: The engineering parameter setting must be the same as that in PLC.
4: Click the online simulation function.
In this way, you can obviously check whether the PLC can communicate with the PC. If you can communicate, you can eliminate the problems of PLC and parameter setting.
IP65 Wall-Mounted Industrial Touch Screen Monitor | Waterproof HMI Display VIEW MORE
23.8 Inch Industrial Panel PC, Slim Ultra-Thin Design, Multiple I/O Ports, Rugged Touch Computer for IIoT VIEW MORE
Embedded Fanless Computer ARM Cortex-A55 Quad-Core 64-bit Computers with 1TOPS NPU and Wi-Fi 6 Capabilities VIEW MORE
High Expandability Industrial Embedded PC with Expansion Slots PCIex16 PCIex4 9 to 36V Input VIEW MORE
Modular Embedded Computer with Intel® Core 12/13/14th-Gen Processor 2.5GbE LAN VIEW MORE
Industrial Panel PC with NFC and QR Code Scanning Functions for Smart Factory VIEW MORE
All-in-One Android Panel PCs with NFC/Camera For MES System in Digital Factory 24/7 Use VIEW MORE
VESA Mount Industrial Touch Panel PC with i3 i5 i7 Processor Desktop Computer 8GB DDR4 128GB SSD VIEW MORE
Rugged IP65 Industrial Touchscreen Computer Industrial HMI Panel PC VIEW MORE
8 inch Facial Recognition Terminal For Turnstile Access Control VIEW MORE
Android In-Vehicle Industrial Panel PC Vehicle AGV Computer VIEW MORE
Transportation Panel PC Windows Vehicle Mounted Touch Computers VIEW MORE
Copyright © Shenzhen Touch Think Intelligence Co.,Ltd. All Rights Reserved Update cookies preferences