The direct control of the programmable controller of the stepper motor can significantly reduce the cost of the automatic production line control system of the combined machine tool. The article introduces the method of using PLC to control the CNC sliding table driven by stepper motor, the software logic of servo control, drive and interface and PLC control of stepper motor.
In the automatic line of combined machine tools, three slide tables are generally set according to different machining accuracy requirements:
- Hydraulic slide table is used in rough machining processes with large cutting amount and low machining accuracy requirements.
- The mechanical slide table is used in the semi-finishing process with medium cutting amount and certain machining accuracy requirements.
- CNC sliding table is used in finishing processes with small cutting amount and high machining accuracy requirements.
Programmable controller is widely used in industry due to its strong versatility, high reliability, simple command system, easy programming, easy to learn, easy to master, small size, less maintenance work, and convenient installation of field interfaces. In automatic control. Especially in the control of the automatic production line of the combined machine tool and the S, T, M function control of the CNC machine tool, it shows its excellent performance. The PLC controlled stepper motor open-loop servo mechanism is applied to the CNC slide table control on the automatic production line of the combined machine tool, which can save the CNC system of the unit and reduce the cost of the control system of the unit by 70~90%, and even only occupy the automatic line control unit. 3~5 I/O interfaces of PLC and <1KB memory. Especially in large-scale automatic lines, the cost of the control system can be significantly reduced.
The structure of CNC sliding table
The CNC sliding table in the automatic line of the general combined machine tool adopts an open-loop servo mechanism driven by a stepper motor. The CNC sliding table controlled by PLC is composed of a programmable controller, a ring pulse distributor, a stepper motor driver, a stepper motor and a servo transmission mechanism, as shown in Figure 1.
Gears Z1 and Z2 in the servo transmission mechanism should take anti-backlash measures to avoid reverse dead zone or reduce the machining accuracy; while the screw drive pair should be based on the machining accuracy requirements of the unit to determine whether to choose a ball screw pair. The ball screw pair is adopted, which has the advantages of high transmission efficiency, good system rigidity, high transmission precision and long service life, but the cost is high and it cannot be self-locking.
PLC control method of CNC sliding table
There are three main control factors for the CNC sliding table:
Generally, the stroke control of hydraulic slide table and mechanical slide table is realized by using position or pressure sensor (travel switch/dead stop iron); while the stroke of CNC sliding table is realized by digital control. It can be known from the structure of the CNC sliding table that the stroke of the sliding table is proportional to the total rotation angle of the stepper motor, so it is only necessary to control the total rotation angle of the stepper motor. From the working principle and characteristics of the stepper motor, it can be known that the total rotation angle of the stepper motor is proportional to the number of input control pulses; therefore, the number of pulses output by the PLC can be determined according to the displacement of the servo mechanism:
n = DL / d
DL – the displacement of the servo mechanism (mm)
d – the pulse equivalent of the servo mechanism (mm/pulse)
Feed speed control
The feed speed of the servo mechanism depends on the speed of the stepper motor, and the speed of the stepper motor depends on the input pulse frequency; therefore, the pulse frequency output by the PLC can be determined according to the feed speed required by the process:
f = Vf / 60d (Hz)
Vf – servo feed speed (mm/min)
Feed direction control
The feed direction control is the steering control of the stepper motor. The steering of the stepper motor can be changed by changing the power-on sequence of each winding of the stepper motor; for example, the stepper motor rotates forward when the power-on sequence of the three-phase stepper motor is A-AB-B-BC-C-CA-A… ;The stepper motor reverses when the windings are energized in the sequence A-AC-C-CB-B-BA-A…. Therefore, it can be realized by changing the output sequence of the hardware ring distributor through the direction control signal output by the PLC, or by programming to change the sequence of the output pulses to change the power-on sequence of the stepper motor windings.
PLC software control logic
It can be known from the PLC control method of the sliding table that the total number of input pulses and the pulse frequency of the stepper motor should be controlled accordingly. Therefore, a pulse signal generator with a controllable total number of pulses and pulse frequency is set on the control software; for control pulses with a lower frequency, the timer in the PLC can be used, as shown in Figure 2. The pulse frequency can be controlled by the timing constant of the timer to control the pulse period, and the total number of pulses can be controlled by setting a pulse counter C10. When the number of pulses reaches the set value, the counter C10 will act to cut off the pulse generator circuit and make it stop working. The stepper motor of the servo mechanism stops running when there is no pulse input, and the servo actuator is positioned. When the displacement speed of the servo actuator is required to be high, the high-speed pulse generator in the PLC can be used. The frequency of high-speed pulses of different PLCs can reach 4000~6000Hz. For the general servo mechanism on the automatic line, its speed can be fully satisfied.
Servo control, drive and interface
The composition of the stepper motor control system
The control system of the stepper motor is composed of a programmable controller, a ring pulse distributor and a stepper motor power driver, and its structure is shown in Figure 1.
In the control system, PLC is used to generate control pulses; a certain number of square wave pulses are output through PLC programming to control the rotation angle of the stepper motor and then the feed of the servo mechanism; at the same time, the pulse frequency is programmed to control the feed of the servo mechanism Speed; the loop pulse distributor distributes the control pulses output by the programmable controller to the corresponding windings according to the power-on sequence of the stepper motor. The stepper motor controlled by PLC can use a software ring distributor or a hardware ring distributor as shown in Figure 1. The use of soft loops occupies a lot of PLC resources, especially when the number of phases of the stepper motor winding M>4, it should be fully considered for large-scale production lines. Using the hardware ring distributor, although the hardware structure is a little more complicated, it can save the number of I/O ports occupied by the PLC. At present, there are many kinds of special chips in the market. The stepper motor power driver amplifies the control pulse output by the PLC to a driving capacity of tens to hundreds of volts and a few amperes to a dozen amperes. Generally, the output interface of PLC has a certain driving capacity, while the load capacity of the usual transistor DC output interface is only tens to tens of volts and tens to hundreds of milliamps. However, for the power stepper motor, the driving capacity of tens to hundreds of volts and several to ten amps is required, so the driver should be used to amplify the output pulse.
Programmable Controller Interface
If the servo mechanism adopts the hardware ring distributor, the number of I/O ports occupied by the PLC is less than 5 points, generally only 3 points. Among them, the I port occupies one point as the start control signal; the O port occupies 2 points, and one point is used as the pulse output interface of the PLC, which is connected to the clock pulse input end of the hard loop of the servo system, and the other point is used as the stepper motor steering control signal, which is connected to the hardware The phase sequence distribution control terminal of the ring is shown in Figure 3; when the servo system adopts a software ring distributor, its interface is shown in Figure 4.
The open-loop servo mechanism controlled by PLC is used for the CNC sliding table of a large production line. Each sliding table only occupies 4 I/O interfaces, which saves the CNC control system. The pulse equivalent is 0.01 ~ 0.05mm, and the feed speed is Vf = 3 ~ 15 m/min, fully meet the process requirements and machining accuracy requirements.