Welcome to our websites!

Analysis of common problems in PLC automatic control system

In the actual debugging process, sometimes such a situation occurs. A software system can fully meet the technological requirements of mechanical equipment theoretically, but can not be put into normal operation in any case during the operation process. In the system debugging process, in addition to considering the software design method, we can also find solutions from the following aspects.

1 Scan cycle and response time

When designing a control system with PC, one of the most important parameters is time, how long it takes for PC to execute all instructions in the program, and how long it takes (scan time) for an input signal to pass through the PC before an output signal (response time) can master these parameters, which is undoubtedly very important for designing and debugging the control system.

When the PC starts running, it serially executes the program in the memory. We can divide the scanning time into four parts. Common parts, such as clearing time monitor and checking program memory; Data input and output; Execute instructions; Execute peripheral device instructions.

The time monitor is a timer used to measure the scanning time inside the PC. The so-called scanning time is the total time spent in executing the above four parts. The scanning time depends on the purchase of the system, the number of I/O points, the instructions used in the program and the connection of peripheral devices. When the hardware design of a system is finalized, the scanning time mainly depends on the time required for the software instructions to receive an input signal from the PC and output a control signal to the output end, called the response time. The response time is variable. For example, after the end of a scanning cycle, an input signal is received, At the end of the next scan cycle, an input signal is received, and the input signal will work as soon as the next scan cycle begins. At this time, the response time of the input signal is the shortest, which is the sum of the input delay time, the scan cycle time, and the output delay time. If an input signal is received at the beginning of the scan cycle, the input signal will not work in the scan cycle, and can only work until the next scan cycle, At this time, the response time of this input signal is the longest, which is the sum of the input delay time and the output delay time. Therefore, the formula for calculating the minimum response time and the maximum response time of a signal is:

Minimum response time=input delay time+scan time+output delay time, maximum response time=delay time+2 × Scan time+output delay time.

From the above response time estimation formula, it can be seen that the response time of the input signal is determined by the scanning cycle. The scanning cycle depends on the hardware configuration of the system on the one hand, and the number of instructions and instructions used in the control software on the other hand. This happens during the debugging of the automatic control system of the block forming machine. The automatic pushing process (the process of sending blocks from the forming table to the conveyor) is started, The start depends on the completion signal of the forming process. When the process of transporting bricks is completed, the process of feeding plates is completed, and the control system is informed that the next forming process can be completed.

From the perspective of the execution sequence of the program, the control sequence is correct. However, during the debugging process, it is found that the actual control sequence of the system is that when the first molding process is completed, the automatic plate pushing process is not performed, but the next molding process is directly started. In this case, the first reaction of designers and users is generally to suspect the program design error. After repeatedly checking the program, no error was found, and then it was considered that the response time of the command might have caused a problem. The control system of the block forming machine is a huge system, with 500 or 600 software control instructions. The start signal of the forming process is generated by the end signal of a forming process and the signal with a plate. At this time, the HR002 signal will be scanned in a certain scanning cycle, and the next forming process will be directly carried out after the process of setting and pushing the plate. This may be caused by the long response time of the input signal. In this case, because the hardware configuration cannot be changed, the number of instructions cannot be changed. During the processing, Try to adjust the software so that the end signal of the molding process occurs earlier, and the problem has been solved.

2 Software reset

The most common type used in PLC program design is the internal relay called holding relay. PLC holding relay from HR000 to HR915, 10 in total × 16, the other is 48 timers or counters from TIM00 to TIM47 (CNT00 or CNT47) (different models of PLC holding relays have different number of timers). Among them, the holding relay realizes the function of memory, which memorizes the operation status of the mechanical system and controls the normal sequence of the operation of the system. In order to achieve the safety, timeliness and accuracy of the control, when a mechanical action is completed, its control signal (generated by the holding relay) is usually used to terminate the last mechanical action, When the time relay that starts the next mechanical action cannot be reset normally, if the hold relay is not forced to reset before starting the machine, it will cause mechanical equipment misoperation. When designing the system, the usual method is to set the hardware reset button, which can force the hold relay, timer, counter and high-speed counter to reset when necessary. It is found in the commissioning of the control system that if the hold relay, timer, The number of counters and high-speed counters is too many, and the function of hardware reset will not work at many times. That is to say, the method of hardware reset sometimes can not be accurate, and the internal relay, timer and counter of PLC can not be reset in time, thus causing the control system to not operate normally. In the process of debugging, manually setting the software reset signal as the internal signal can ensure that the relay can be effectively reset, Make the system work normally under all circumstances.

3 Hardware circuit

The control system hardware circuit composed of PLC. When a two-wire sensor, such as a photoelectric switch, proximity switch or limit switch, is set as an input signal device and connected to the input end of the PLC, the leakage current may cause the input signal to be ON. During system debugging, if there is an occasional misoperation, it may be caused by the error signal generated by the leakage current. In order to prevent this from happening, when designing the hardware circuit, a calculation formula of parallel resistance and parallel resistance is connected at the input terminal.

Among them, the leakage current value of PLC of different models can refer to the product manual provided by the manufacturer. Such treatment on the hardware circuit can effectively avoid misoperation caused by leakage current.


Post time: Jan-30-2023