[Dry goods] The reason why the touch screen and the PLC cannot communicate with each other and the solution sharing experience

Often engineers have encountered such a problem: how can my touch screen and PLC not communicate? For example, the following two problems encountered:

[Dry goods] The reason why the touch screen and the PLC cannot communicate with each other and the solution sharing experience

1, Wei Lun pass touch screen and Siemens PLC communication is not always prompt PLC no response, how to set it?

Solutions:

You set the same baud rate, the same number of bits, the same stop bit, the station number can not be the same, that is, plc and touch screen address can not be the same, and then determine the communication line is normal ... ...

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

Solutions:

The usual method is to use heartbeat detection, define a bool, HMI fixed frequency set the point, PLC will reset the point after receiving this point as ON signal. If the signal that the point is ON is not received within a certain period of time, such as 5s, then the communication is considered to be interrupted.

The PLC transfers the memory clock byte to the screen. The screen uses the script to assign the value of this byte to the address of another PLC. Then the plc judges whether the returned byte has the same scan cycle. If the same indicates the communication is interrupted .

For example, please look at the figure. The steps are as follows:

1. Create a DB1 data block in the PLC with two switch "PLC second switch" and "human machine response switch";

2. Connect these two variables in human-machine variables;

3. Add “inverted bit” to the value of the “PLC seconds switch” variable of the man-machine “input” variable ---- event----change, and let the “man-machine response switch” variable change with the change of “PLC second switch” ;

4, in the PLC program block programming, so that "PLC seconds switch" reverse every 0.5 seconds, and then use the TON delay command to "human response switch" does not act within 1 second to output man-machine communication failure, because man-machine communication The "human-machine response switch" will no longer change after an anomaly.

[Dry goods] The reason why the touch screen and the PLC cannot communicate with each other and the solution sharing experience

In fact, no communication between the touch screen and the PLC on the market is nothing more than to confirm four issues:

1. Is the plc parameter consistent with the project?

2. Whether the communication line is connected according to the pin diagram of the wiring diagram

3、Is the com port set in the project correct on the screen?

4, parameters and lines confirm OK, the case, see if it is plc program or plc address problems.

method:

First determine the parameters:

1. Use the PLC programming software to connect to the PLC test to see what the parameters of the PLC are and whether the parameters set in the project are consistent with the tests.

2. On-line simulation: Using our configuration software, connect the PLC's own communication cable to the computer, and online simulation to see if the project is communicating. You can use a numeric input component or switch to operate it, and see if the operation before the online simulation is started after turning off the simulator is still present. (The NC and the previous operation did not write it down and there is no communication.)

Test line:

Use a multimeter to test the wiring according to the pin definition of the wiring diagram.

A: touch screen parameters. Look at the touch screen's parameter settings.

There are several parameters that need special attention:

1: Setting of communication port---Be sure to confirm COM1 port or COM2 port of PLC connection touch screen

2: The type of equipment - this is the most important, if the agreement is not selected, the other will not have to say

3: Connection mode --- PLC connection with the touch screen, confirm a good thing RS485, or RS232C

4: Interface parameters and PLC station number - must be consistent with the settings in the PLC.

Two: If the parameter confirmation is set, then check the line problem.

Confirm whether the RS485, RS232C line is correct, and the touch screen is not the same as the various PLC wiring. This can refer to the maintenance (plc and touch screen communication line to help the document) view, this is the basic method of troubleshooting communication problems.

Then teach you how to bypass the touch screen - online simulation. In the absence of communication, some customers may guess that the problem may be a touch screen, or interface problems. On-line simulation is to bypass the touch screen and connect PLC directly to the computer.

Specific practices:

1: PLC and computer to connect through RS232. Some PLCs have RS232 interfaces, some are not, and none can be connected to a computer via an adapter.

2: Create a new simple project. Put two components, a numerical display, a numerical input. Address Set the address inside the PLC.

3: The project parameter settings must be the same as the settings in the PLC.

4: Click on the online simulation function

This way you can clearly see if the PLC can communicate with the PC. If you can communicate on the PLC can be excluded, with the parameter settings.

[Dry goods] The reason why the touch screen and the PLC cannot communicate with each other and the solution sharing experience

GFCI Outlet

Gfci Outlet,Gfci Socket,Gfci Plugs,Outdoor Gfci Outlet Box

Lishui Trimone Electrical Technology Co., Ltd , https://www.3gracegfci.com