Application of PLC in Automatic Tapping Machine Control System

Aiming at traditional equipment’s problems, such as low tapping efficiency, poor reliability, a set of special automatic tapping machine control system is designed. The system can tap five workpieces at the same time by using Siemens S7-200 series CPU226 AC/DC/Relay PLC technology. The system will carry out technical reform of traditional equipment. The paper describes the control system scheme, work flow chat, I/O wiring diagram and program design of PLC. The operation results meet the use requirements. The system has the characteristics of good maneuverability, high operation safety and high production efficiency, which can greatly reduce the production cost.


Introduction
In the process of manufacturing mechanical parts, installing and assembling the whole machine, tapping is an important process [1] . Automatic tapping machine is a semi-automatic and automatic special-purpose machine tool for tapping. Its structure is based on general components. It equipps with special clamps and components designed according to the specific requirements of the workpiece. In general, it uses a variety of processing elements to process at the same time, such as multiple processing shafts, multiple processes, multiple knives, multiple stations. Its production efficiency far exceeds that of general machine tools [2] . Automatic tapping machine control system is an important part of automatic tapping machine, which is mainly used to control the automatic process of drilling and tapping of workpieces.
At present, relay control system is still the mainstream of automatic tapping machine control system. Due to the complex wiring, trouble diagnosis and troubleshooting of the system reliability problems, it reduces production efficiency and increases production costs. In recent years, it has gradually been replaced by other high reliability control systems such as PLC control system [3] . The application of PLC control system in tapping machine can control production process by receiving digital or analog input signals , outputting digital or analog signals and executing various operation instructions, such as logic operation, sequence operation, timing, counting and arithmetic operation. Compared with relay logic control system, PLC control system's anti-interference ability, reliability, versatility, function perfection, application flexibility and so on are greatly improved [4] . Moreover, its structure is simpler. Its design, installation and debugging are more convenient.
According to the requirements of product processing, this paper developed a set of special automatic tapping machine control system. It uses PLC to control the rotation movement of five servo motors, and converts it into the rotation movement of taps. At the same time, it taps five workpieces. It greatly improves the working efficiency and economic benefit [5] , and the operation is safe and reliable.

Control system scheme
The system is mainly controlled by the operating platform Siemens S7-200 series CPU226 AC/DC/Relay PLC to send instructions to control the cylinders and servo motors. The rotation of servo motor drives the taps to tap the workpieces [6] . Solenoid valves control and execute the movement of the worktable and the tightening action of fixtures. The operation diagram of the automatic tapping machine control system is shown in Figure 1.
After connecting the power supply and press the reset button, the cylinders start to move upward, and drag all five servo motors to the starting origins. At this time, the magnetic switches are closed and the lights are on. It indicates that the highest positions have been reached. After pressing the start button, the cylinders move downward, and the servo motors start to rotate forward until the taps are tapped. The first stop when the lower limit switch is reached and the second stop when the lower limit switch is reached. Finally, the five servo motors and cylinders all reach the lower limit switches and stop. Then the servo motors reverse, the cylinders start to move upward, and stop only when they reach the origins directly. At last, the subsequent work is not carried out until it reaches the origin. Thus a cycle of work is completed. After that, there comes the next cycle. Repeating the cycle like that will complete the tapping of batch workpiece [7] .  Figure 1. Operation diagram of automatic tapping machine control system

Work flow chart
According to the requirements of processing technology, the whole control process is sequence control [8] . The system sets five upper and five lower limits. All servo motors stop when they reach the lower limits. After that all return to the upper limits and then stop again. The work flow is shown in Figure 2.  Figure 3. I /O wiring diagram of PLC Figure 3 is the I/O wiring diagram of Siemens CPU226 PLC. There are twelve input signals as I0.0-I1.3, including reset button, start button, five magnetic switches and five limit switches. There are fifteen output control signals Q0.0-Q1.6, including five cylinders and five servo motors for forward and reverse rotation.

Program design
With the idea of modular programming [9] , the control programs of automatic tapping machine are divided into three modules: reset, advance and retreat. We use STEP7 Micro/WIN software to write control instructions. Some procedures are as follows:

Conclusion
Based on the reform of common tapping machine, this paper developed an automatic tapping machine control system which can tap five workpieces at the same time. The whole control action is mainly designed based on Siemens PLC [10] . It replaces the heavy and operationally difficult relay control system. It effectively improves the processing accuracy, production efficiency and reliability. It also reduces the cost. If this reform technology is popularized in the reform of automatic tapping machine, it can vigorously promote the economic development of our country.