Reformation and Commissioning Research on Closed-Loop Control of Y Axis CNC Milling Machine

Considering its working stability, semi-closed loop control is usually used in Mid-range CNC machine tool, but Processing quality of the product is Seriously affected by wear, hot variant, screw error and backlash of machine driven system. In order to improving machining precision, reformation processing on closed -loop of Y axis in THWMZT-1B CNC milling machine is introduced, such as connecting and installing hardware, setting parameters and backlash compensating. Commissioning results have shown that repeated positioning accuracy got 0.01mm, pleased result was got.


INTRODUCTION
X, Y, Z axis of THWMZT-1B type CNC milling machine were all controlled by means of semi-closed loop.Photoelectric encoder mounted on the shaft end of the motor can real-timely read motor coaxial rotating speed signal, realtimely monitor motor angular displacement.Without monitoring the drive chain after the motor shaft, loss of precision caused by screw error, thermal deformation and backlash can't be controlled [1][2][3].At present, in the mid-range or high-end CNC machine tool, the feed axis servo control circuit generally adopts semi-closed loop or closed loop.In order to meet the needs of high-grade CNC equipment to maintenance personnel, to be familiar with the installation, the adjustment and the conversion between semi-closed loop and closed loop control, and to improve the machining accuracy, the semi-closed loop control of Y axis of THWMZT-1B CNC milling machine is transformed into closed loop control.The control block diagram is shown in Fig. (1), the closed loop control system implies that the actual location will be detected by the linear position detection device (such as a grating ruler) directly installed in the moving parts (such as a worktable), and then provides feedback into the CNC system to make a comparison with the command position value.The moving parts will be moved by the difference value of comparison, until the difference is eliminated.FANUC servo system is a full digital servo system, and the axis card system in it is a sub-CPU system, which completes PID servo operation control of position, velocity, and current, and transmits PWM control signal to the servo amplifier to control the servo motor frequency conversion.It mainly consists of the following parts.

Position Control Part
Position control part, which includes interpolator, position error register and reference counter is the core part of the servo system.Interpolation algorithm of coordinates is done in interpolator.The command position is input into the interpolator, which is converted into regular pulses after the interpolation algorithm.These pulses and the motor feedback pulses are input into the position error register, the result in position error register is equal to the difference between the command position and the actual position of the motor.The result has immediate impact on the speed of the motor.The reference counter is used when returning to zero, for further details, please read the parameter setting.

Speed Control Part
Speed control device being used for controlling motor speed is the intermediate loop of PID control.Its instruction comes from the output of the position control, and its feedback comes from the actual speed of the motor.

Current Control Part
Current control being used for stabilizing current of the motor is inner loop of servo control.Its input comes from the output of speed control, and its feedback comes from the motor current.In addition, it can achieve the three-phase current conversion control of AC motor.
The position detection of the closed loop system contains all errors of the feeding drive chain, such as clearance of ball screw and guide rail pair, thus the error compensation is capable of high control accuracy; the positioning accuracy can be within ± 0.001 mm.

Selection of Grating Scale
A serial and incremental FAGOR MKX scale was selected.Its resolution is 0.004 mm, but after four-fold frequency of CNC, the measurement device for actual detecting resolution is 0.001 mm, and its zero pulse spacing is 50mm.

The Separate Detector Interface Unit Module Mounted
As shown in Fig. ( 2), the separate detector interface unit module is mounted on the left side of the I/O link module, and an appropriate space is kept between them to facilitate heat dissipation.Tops of both are in the same horizontal line.

Grating Signal Feedback Wire Welding 1).
As shown in Fig. (3), the grating scale extension line 15 pin serial interface was replaced by 20 pin high density plug matching separation and detection unit module interface.Each pin of scale, extension line and module serial connector is defined in the Table 1.
( 2), Confirm the correctness of each welded pin of the serial interface, then plug the welded serial interface into JF102 connector of the separation module.
3).Make a connection from the COP10A connector of Z axis driver to the COP10B interface of separation module with optical cable.

4).
Make a 24V power connector ,and plug it into CP11B connector of separation module.One pin of CP11B is 24V, the other is 0V.

Mount Scale and Position Adjustment
Details of combination sheet metal and installation method are as follows: In (2) Unplug the power line of Y axis and manually shake the Y axis, verify that the maximum height error is less than 0.10 mm between the ends of the scale bracket 1 by using a lever dial indicator.(4) Fix the reading head of the scale.Verify that the space between the reading head and the scale body is about 2.0 mm.The screws that fixed the reading head are in the middle of the U-shaped hole in the fixed bracket of the reading head.At the same time, it must be ensured that the reading head paralleled with the scale body, is not tilted to other directions, and thus the location in the saddle of the fixed bracket of the reading head is probably determined.
(5) Fix the scale shield.When mounting the shield, it must cover the entire scale but the movement of machine tool cannot be affected.
(6) Each sheet metal part must be centered when installed, in order to facilitate the subsequent precision adjustment.

PARAMETER SETTING
Because the closed loop control system includes large inertia link such as screw, nut and machine tool working platform, nonlinear and unstable factors such as screw tension compression, torsion and friction damping characteristics and gap can appear in the process of adjusting.Matching parameters are not appropriate that will cause system oscillation and result in the machine tool work instability.The premise of correct control of closed loop system is that CNC output command pulse number corresponding to any moving command must be equal to actual feedback pulse number.These parameters matching command pulse and feedback pulse equivalent have CMR, DMR and reference counter.The reference counter parameter (PRM1821) is mainly used for returning to zero by grid.The FANUC system returning to zero is in fact looking for a physical grid, and then moving one "offset" to form a reference grid, and finally take the grid as the zero point.According to the reference counter, one grid pulse (electrical grid) is overflowed when pulse number reaches the PRM1821 setting, the grid pulse and the physical grid, i.e.PCZ signal of photoelectric encoder offset PRM1850 setting.Take the grid after offsetting as a reference grid back to zero, as shown in Fig. (5).Because "zero reference pulse" is specified by grid, and the grid is determined by the reference counter, when the reference counter setting is "error", the electrical grid "spillover" is not regular, which will result in the inconsistency of returning to zero position every time.In other words, returning to the zero position is not correct.Setting servo parameters implies that reasonable PID control parameters are given, to achieve the optimal control  performance.In the initial stage of servo debugging, these parameters should be set by entering the "parameter setting support" picture "servo settings" menu.
The scale connector was plugged into JF102 connector of the separate detector interface unit module.In order to bring the module into effect, PRM1815.1 must be set to "1", and the connector number M1 of the separation module must be set to"2".The minimum movement unit of THWMZT-1B CNC milling machine is 0.001mm, its screw pitch is 5mm/r, and the motor and the lead screw are directly connected through the coupling.In order to make the calculation and control convenient, CMR is usually set to 1, then PRM 1820=2*CMR=2, flexible gear ratio N/M=1/1 i.e.PRM 2084=1, PRM2085=1, measurement device for detecting resolution/minimum movement unit = 0.004/4 /0.001=1/1,The position feedback pulse number per motor revolution PRM2024= The amount of movement per motor revolution/minimum movement unit=5/0.001=5000,the reference counter PRM1821= the scale zero pulse spacing/ minimum movement unit =50/0.001=50000,and set the following: 1.
The detecting element of closed loop position control system needs to connect the separate detector interface unit module.The module and CNC are connected by FSSB bus, which belongs to one of the FSSB substations.In order to establish relations among the drive letter, the interface unit module and related servo functions, the Y axis connector number M1 of the module in "axis setting" picture must be set to "2", as shown in Table 2:

2.
The 1815 #1 parameters of Y axis is set to 1, in order to bring the separate detector interface unit module into effect, as shown in Table 3.

3.
Set the feed gear of Y axis.According to flexible gear ratio N/M=1/1, the numerator N and the denominator M are respectively set to "1".The position pulse and the reference counter of Y axis are respectively set to "5000" , "50000", as shown in Table 4.

CLEARANCE COMPENSATION
The matching precision requirement of the mechanical transmission chain is relatively high for closed loop control.Because of the influence of the mechanical driving system gap, the ball screw nut pair wear, the manufacturing error and other factors, there are always some errors existing between the actual position and the command position.Especially in the case of long-term use of machine tool, with the increase of ball screw nut pair wear, the reverse gap phenomenon is more obvious.When the gap is generally greater than 0.05 mm-0.10 mm, servo oscillation is generated, which generates high-frequency noise when the machine tool works, so that the machine tool can not complete the normal processing [3].In order to improve contour accuracy, positioning accuracy and repeated positioning accuracy in the machining process, some compensation is required.PR1800.4 is usually set to "0", so that the fast and the cutting feed compensation function are valid at the same time, then set PR1851, i.e. the cutting and manual continuous feeding reverse gap parameter.For example, No. 5 machine tool in my lab, when the Y axis adopts the semi-closed loop control and backlash compensation is not done, the reverse gap of X, Y, Z is respectively 0.05 mm, 0.07 mm, 0.06 mm.After closed loop transformation of the Y axis by using scale, the backlash compensation PR1851 of X, Y, Z axis is respectively set to "-10", "50", "90", through repeated measurements, which shows that repeated positioning precision of the machine tool can reach 0.001 mm.

CONCLUSION
The machining accuracy was improved by the Y shaft semi-closed loop control transformation into the closed-loop control taking scale as the detecting element, and by setting parameter and backlash compensation.This scheme can be applied for each axis closed loop transformation of FANUC0i NC machine tool, used reversely for the closed loop transformation into the semi-closed loop, and can provide a new detecting and maintaining method for CNC machine tool maintenance personnel.Closed loop control can improve the machining precision, but the reverse error is not stable after running for a period of time, and so it must be adjusted periodically.
Fig. (4), every symbol is expressed as follows: 1-the milling bed; 2-the scale; 3-the bracket 1; 4-the bracket 2; 5-the fixed bracket of the reading head; 6-the scale shield; Specific requirements for installation: (1) Fix the scale bracket 1. Align the two central lines by finding the central line of the Y axis travel and the scale bracket 1.The centers of two holes being used for fixing bracket 1, are located at 25 mm below the scale shield .