In the current industrial production process control, the PLC control system is widely used. The software program is used to realize the interlocking control between the control equipment, that is, automatic control. The factory mechanical equipment driven by the control equipment is used to complete the production process to meet the process requirements. Here, the operation of the equipment is divided into two ways: manual operation and automatic control. In the single manual operation, it is generally in the local (machine side) operation of the equipment. PLC program control is mainly for automatic control, but it also includes single manual operation. Its function is the same as local (machine side) operation. The difference is that it is realized by program, and it is generally carried out by clicking the mouse in the monitoring screen of the upper computer, That is to say, it is carried out in the machine room or control room instead of local (machine side). The main difference between manual operation (including manual single operation in the program) and automatic control program is that the automatic control program runs when all equipment can work normally without fault after formal production. And the manual operation is used in the debugging period, commonly known as “dot”, or in normal operation, when there is equipment failure. For example, for the liquid level control of a water supply tank, when the water level is high, start the outlet pump to supply water, and when the water level is low, stop the pump to supply water. If the liquid level sensor of the water tank fails, the automatic control cannot be carried out. In order to continue the production, the operator needs to operate manually on site, According to the liquid level indicator of the water tank to manually start and stop the operation of the water pump and the corresponding valve switch. It should be pointed out that the equipment mentioned in this paper is the switching equipment controlled by PLC output, and the analog equipment is not included in this paper.
Manual and automatic switching mode of equipment
In this paper, equipment refers to the factory machinery and its control equipment. Control equipment refers to motors, valves, etc., and the manual and automatic operation of the equipment is mainly reflected in the manual and automatic operation of the control equipment. For example, the control of motor is generally carried out through the electrical control system of MCC (motor control center). The remote and local signals of motor, i.e. automatic and manual switching signals, as well as start, stop, fault and other signals are provided by MCC and connected to PLC hardware system. When the remote local transfer switch on the MCC cabinet is turned to the local position, the local manual operation shall be carried out; When it is remote, it can be automatically controlled by PLC program or manually operated by clicking the mouse on the upper computer screen. We can understand the relationship between PLC control system, local electrical control system, control equipment and factory mechanical equipment in this way, that is, automatic control (including manual operation in PLC program) is controlled by PLC control system. Through the electrical control system, the electrical control system controls the control equipment like motor, and finally the control equipment drives the operation of factory mechanical equipment. The electrical control system, like the MCC cabinet itself, can be operated manually and locally.
For the control of motor, in normal operation, the first is the automatic control of PLC program. At this time, the remote local transfer switch is in the remote position. If there are problems or faults that cannot be handled by PLC, it is necessary to manually operate the single equipment on the upper computer screen to maintain production or carry out safety interlock operation. Finally, if the problem still can not be solved, it needs to be operated locally (by the machine), generally to stop the motor.
For valves, there is also corresponding electrical control system, just like MCC, which is usually local solenoid valve control cabinet (box), and generally has remote local transfer switch for manual and automatic operation. Like the motor control, in normal operation, the first is the automatic control of PLC. At this time, the remote local transfer switch is in the remote position. If there are problems or faults that cannot be handled by PLC, it is necessary to manually operate the single equipment on the upper computer screen to maintain production or carry out safety interlock operation. Finally, if the problem still can not be solved, the remote local transfer switch is turned to the local position for on-site local control. If the problem cannot be solved, the manual valve can only be used for safe operation.
Obviously, the local manual and remote automatic operation is realized by the transfer switch on the local control cabinet (box). PLC program in the manual and automatic switching function, you can also do this, in the program to achieve similar operations as the transfer switch is no problem.
Program realization method of equipment manual and automatic switching
When the remote local signal is 1, it means that the change-over switch on the field control cabinet (box) is turned to the remote position, which can be automatically controlled by PLC; When it is 0, it means manual operation on site. In order to realize the manual and automatic switching within the program, just like the remote local signal, an intermediate variable is set, which is used as the symbol of the manual single device operation of the program and is assigned by the upper computer monitoring program. When its value is 1, the manual operation of the single device of the program is carried out; When it is 0, PLC program will control automatically. It can be seen that every equipment in automatic control runs under these two conditions.
Where (L) is the set instruction and (U) is the reset instruction. The reason why the set and reset commands are used here is mainly considering that the start (open) condition and stop (close) condition may be pulse type (such as rising edge pulse) and need to be maintained (Note: if the control circuit in MCC uses the “start hold stop” mode, it is more appropriate to use the pulse output, just like the self reset button. This is not done here in order to simplify the ladder program. Interested readers might as well have a try. The start or stop condition of the motor is the interlock condition of the automatic control, and the automatic control program can not be executed when the upper computer carries out the manual operation. Similarly, the PLC program control can not be executed when the local operation, the program can reset the motor start and stop control signals at this time according to the needs. The same is true of valve control. In this way, each equipment can be operated automatically or manually according to the situation.
Program realization method of equipment manual and automatic switching 2
The above method considers all kinds of situations when the hand switches automatically. When the program is designed, it needs to pay attention to the hand switch automatically all the time, and the amount of program is increased compared with that when there is no hand switch automatically. If the manual program in the program is separated from the automatic program, the program will be clearer and clearer. At the same time, it is not necessary to pay attention to the hand automatic switching problem when designing the automatic program. Is this feasible? We might as well transform the ladder program as shown in Figure 2.
Obviously, this is feasible. Since the manual program is executed at last, the start, stop, open and close of the motor or valve are determined by the manual program. In other words, when the automatic control program is running, if there is a manual operation of the upper computer, the manual operation of the upper computer has priority. For example, when the automatic program requires the motor to stop, if the upper computer starts it manually, the motor will start. The reason is that the last executed program is valid when the program assigns values to the same variables or IO tags.
Editor in charge: LQ