Development and Optimization of Control Programs for 2.5-Coordinate Milling of Three-Dimensional Workpieces on CNC Machines

The paper presents new methods for optimizing milling operations on CNC machines when programming in САМ-systems, in particular, a method for improving the efficiency of processing threedimensional workpieces by 2.5-coordinate milling on CNC machines for contour machining and a method for improving the productivity of contour milling of products with a variable allowance at a constant optimal value of the chip thickness, with the provision of geometric parameters of surface quality. Mathematical dependences of the surface quality parameters on the milling conditions are determined. Algorithms of automated analysis are presented, and methods for designing such operations are developed.


Problem Statement
The development of control programs in САМ-systems allows to implement optimal solutions for performing milling operations on CNC machines. These include improving the efficiency of processing a number of three-dimensional workpieces by 2.5-coordinate milling on CNC machines designed for contour machining, which significantly reduces the cost of performing such an operation. Increase in processing productivity during contour milling of workpieces with a variable allowance is provided by setting the optimal chip thickness, constant in value during the entire operation. The problem of using such milling options is complicated by the lack of recommendations for managing the geometric parameters of surface quality, depending on the type of workpiece, cutting tool and milling conditions.

Control of geometric parameters of surface quality in the course of 2.5-coordinate milling of three-dimensional workpieces
When milling three-dimensional workpieces, 3 -5-coordinate CNC machines are used. A significant disadvantage of this type of machining is the high cost of the equipment used, and therefore the standard hours for machining. At the same time, the machines of enterprises include a significant part of CNC milling machines for contour machining with the possibility of programmable discrete Z axis motion. [1,2].
When programming machining in САМ-system, by setting the value of discrete Z axis motion (Fig. 1), it becomes possible to develop control programs that ensure the production of three-dimensional products of some shapes (external contours with surfaces located at an angle to Z axis, conical holes and windows with inclined walls) by 2.5-coordinate milling on CNC machines for contour machining, which significantly reduces the cost of performing such work [3,4,8]. This machining option is economically justified, because according to the company CoSPAS, the approximate cost of a standard hour for milling a three-dimensional product on a contour milling machine with a table size of 250x400 mm is 850 rubles, and for milling a similar product on a machine for three-dimensional machining of 3 axes with the same size is 1450 rubles. According to these data, savings can reach 40% of the standard hour [7,9]. A variable indicator that determines the height of surface irregularities is the value of Z axis motion, entered in the dialog box of САМ-system by the programmer based on his own experience. There are no recommendations on the interconnection of this indicator with the quality of the surface, or they are not sufficiently developed. To implement this task, a new approach has been developed to prepare control programs of machining for CNC machines in САМ-systems.
To solve the problem stated, it is necessary to determine the influence of the milling conditions, the type of cutting tool and the shape of the three-dimensional product on the surface parameters. The contour of the three-dimensional surface in the direction of Z-axis after milling, represents the residual traces of the cutter motion and consists of a chain of irregularities (ridges) [5]. The main parameters describing ridges are -height -hgr, base length -lgr and the radius of the side ridge contour, which repeats the radius profile of the cutter bit -rw (Fig. 1). In accordance with GOST on surface roughness, the ridge height hgr is numerically equal to the biggest height of the profile Rz, and the ridge base length lgr is equal to the average step of irregularities Sm, if lgr ˂ Lб, where Lб is the base length when measuring roughness. The factors that determine surface roughness are the following: workpiece shape and condition, cutter parameters, cutting modes [6]. For the study, shank-type indexable insert cutters with 90° plan relief angle and with tip radii of 0.12, 0.20 and 0.30 mm, shank-type ball-ended cutters for round inserts with radii of 4, 5 and 6 mm were used. Milling of inclined surfaces located at angles of 15°, 30°, 60° and 75° was studied. The increment of Z-axis motions was 0.005 mm.
Let us define ridge parameters formed by the radius surfaces of the cutting edge contour with a rectangular indexable inserts with a tip radius, used, as a rule, when milling nonrigid products or of easily deformable materials when fixing. This machining is performed when setting hz minimum Z axis motions to reduce the force load on the product during milling. The value of the ridge base length lgr depends on the value of a single cutter Zaxis motion and the inclination of the workpiece surface α° relative to Z axis. The maximum size of Z-axis motion, at which the contour is formed only by radius surfaces, is formed during machining with a step value along Z axis under the following conditions -hz ≤ rw for the inclination of the surface α° ≤ 45° and hz≤2*rw*(cosα°)²*cos(90°-α°) for the of the surface α°>45°.
Let us define the values of a single cutter motion hz, depending on the requirements for the surface quality Rz or Ra shown in the part drawing. The initial data for the calculation are the treated surface inclination α°, tip radius of indexable inserts, and the required surface quality parameters Rz or Ra. In this case, the ridge height for further calculations is numerically equal to hgr = Rz or hgr = 4*Rа if Rа ≥12.5 microns and hgr = 5*Rа if Rа≤12.5 microns. The ridge height is calculated as the height of the circle segment with a radius equal to the radius of the cutting edge and a chord equal to the ridge base length. Based on this condition and the analysis of the analytical model in Fig. 1, we determine the required value of a single cutter motion hz to obtain the specified roughness parameters according to the formula (1): Ridge base length lгр, depending on the calculated value hz, we define according to the formula (2).
When defining the ridge parameters after 2.5-coordinate milling with a cutter of radius or spherical cutting part during roughing and finishing of quite rigid parts, the permissible height of a single Z-axis motion, according to the recommendations of Sandvik Coromant, should not exceed 2/3 of the working part radius of the cutting edge. The value of the ridge base for these milling conditions is defined by the formula (1), and its height is calculated by the formula (1), where instead of the value of the tip radius of the cutting edge, the value of the cutter spherical part radius rсф is substituted. The value of a single cutter Z-axis motion hz, depending on the requirements for surface quality, is calculated by the formula (2).
To automate the calculation of irregularities on the three-dimensional product surface, depending on the machining conditions for 2.5 coordinate milling on a CNC machine for flat milling, an algorithm for performing computational procedures is developed (Fig. 2). The initial data for the calculation (data block 1) are the inclination of the processed surface α°, the cutting part radius rв or rсф and the required surface quality parameters Rz or Ra comparable to the ridge height in the proportions mentioned above. In the decision-making block 2, depending on the type of initial information about the roughness height, the further calculation procedure is used. When the value of the roughness height is indicated as Rz, the calculation is done through process block 5. If the roughness parameters are indicated by Ra, then the calculation for value Ra ˃12.5 microns is performed through process block 4, and for value Ra ˂ 12.5 microns -through process block 6. Further calculation of milling conditions that ensure the specified surface quality is performed in process blocks 7-9. In block 7, the arc angle of the circle segment is determined, with the cutting part radius height equal to the known ridge height. In block 8, the ridge base length or the average step of irregularities is calculated. In block 9, based on the previously performed calculations, the required value of Z-axis motion value is determined, which provides the surface roughness specified by the drawing. In data block 10, the calculation results are generated -the value of Z-axis motion, which is entered in CAM-system dialog box, and the resulting surface roughness parameters after milling.
In accordance with the algorithm in inclination α° -are performed. The calculation results presented in graphs of Fig. 3 allow to make a preliminary forecast about the ridge parameters for 2.5-coordinate milling with a rectangular indexable insert cutter with a tip radius of the cutting edge under the specified conditions: α°-15º; rw -0.120, 0.200, 0.300 mm. The graph shows with arrows that the ridge height hgr is 10 microns when hz value is 0.09 mm and when milling with a indexable insert cutter with a tip radius of the cutting edge rw equals to 0.120 mm. The analysis of the influence of Z-axis motions on the ridge height for milling cutters with a radius or spherical shape of the cutting edge is shown in Fig. 4. The graphs are given for values: α° -15°; rsf -4, 5 and 6 mm. The graph has arrows showing that the ridge height hgr equal to 20 microns can be obtained if the value of Z-axis motion hz with inclination of the processed surface α° -15° at the radius of the cutting edge rsf is 0.75 mm.
Experimental studies to determine the effect of milling conditions on the geometric parameters of irregularities were carried out on a vertical knee-type milling CNC machine 6DM12F3, using 20 mm shank-type indexable insert cutter T15K6 with 90° plan relief angle and with tip radii of 0.120, 0.20 and 0.30 mm, 25 mm shank-type cutter for round inserts with radii 4, 5 and 6 mm. Milling of inclined surfaces located at angle of 15° on samples made of steel 45 according to GOST 1050-88 with a size of 40X40X60 mm was considered. Milling was performed at a cutting speed of V = 120 m/min and feed of 300 mm/min. The increment of Z-axis motions was 0.005 mm.  Table 1 shows the results of experimental verification of calculated roughness parameters Ra and Rz, depending on the machining conditions. According to the experimental verification results of the method for calculating the parameters of irregularities when 2.5-coordinate milling of three-dimensional surfaces on CNC machines for contour milling, depending on the machining conditions given in Table  1, it follows that the relative accuracy of the design value of irregularity height compared to the one determined during machining is at least 91%, and the average relative accuracy is 93.88%. These results confirm the validity of the developed mathematical dependencies.

Increasing the productivity of contour milling of workpieces with variable allowance taking into account the quality of the treated surface
When developing the control program in CAM-system, the feed value is programmed to ensure the consistency of the chip thickness with a variable thickness of the removed layer [2,3]. There are no programs for calculating the optimal value of the chip thickness during contour milling with a variable thickness of the removed layer, depending on the irregularity height parameters of the milled surface set by the drawing and taking into account the machining conditions.
When assigning the optimal value of the chip thickness at maximum productivity it is necessary to proceed from ensuring the quality of the surface and the condition of the product (rigidity, easily deformable materials when fixing the part), as well as the capabilities of the equipment (power, maximum and minimum values of the minute feed), the cutter parameters (diameter, number of teeth) and predetermined cutting speed. With a decrease in the metal removal, with a constant value of amax, it is possible to increase the value of the linear feed. The dependence of factors influence on these indicators is determined by formulas (3) and (4): At the beginning of the calculation, the number of revolutions of the cutter n is determined depending on the previously determined cutting speed V and the cutter diameter D according to the formula (5): The main criterion for determining the next parameter -feed per tooth Sz is providing roughness height parameters. The surface contour after milling represents the remaining traces of the cutter motion and consists of a chain of irregularities (ridges) [5]. The main parameters describing the ridge are: height-hgr, base length equal to Sz (Fig. 5). In accordance with GOST on the surface roughness, ridge height hgr is numerically equal to the biggest profile height Rz, and the ridge base length Sz equals to the average step of irregularities Sm. In this case, ridge height for further calculations is numerically equal to hgr = Rz microns or hgr = 4*Rа microns if Rа ≥12.5 microns and hgr = 5* Rа microns if Rа ≤12.5 microns.
By analyzing the calculation scheme in Fig. 5 let us determine the formula for calculating the feed per tooth Sz depending on the roughness height: Sz = 2* √ D*hgr/10³, mm/tooth. To obtain the optimal value of amax, which guarantees the desired roughness over the entire range of Sz changes, we assume that the maximum value of Sz, determining the maximum roughness height hgr, is realized at a constant chip thickness during milling of the minimum allowance. In calculating the chip thickness, we use value tmin putting it in formula (4). As a result we get: When milling the maximum allowance and when calculating constant chip thickness, value Sz will be minimal, which guarantees roughness height values in this area within the requirements of the drawing.
Based on analyzing the scheme of the cutter contact with the product surface (Fig. 5), a program for calculating these indicators has been developed, the calculation algorithm is shown in Fig. 6. The initial data for the calculation are (Data block 1) -roughness indicators of the machined contour Rz or Ra, allowance values tmax and tmin, the height of the milled contour h, cutter parameters -diameter D and the number of teeth z, cutting speed V, specific cutting force for the machined material kc. In decision blocks 3 and 4, the calculation procedure is determined depending on the type of surface quality required. In process blocks 5 -7, the feed per tooth is calculated depending on the height parameters of the irregularities on the treated surface. The optimal chip thickness is calculated in calculation block 8, one of the criteria is the minimum allowance value, since in this case the tool feed value will be maximum while ensuring the required surface quality. When machining parts with the maximum allowance, the feed value will decrease, which guarantees that the height of irregularities will be obtained within the limits specified in the drawing. To obtain complete information about the process of contour milling of products with a variable allowance, the maximum and minimum minute feed in blocks 9 -12 are calculated, as well as the cutting power necessary for the implementation of this operation (Calculation block 13). The calculated value of the optimal chip thickness, at which the specified surface quality is provided, is printed. As well as reference materials describing the milling process -indicators of surface roughness, minimum and maximum values of allowances, the range of feed changes and the power required for cutting.  Fig. 6. Flow diagram of the algorithm for determining the optimal chip thickness value depending on the specified parameters of the surface quality Verification of the program reliability for calculating the conditions of contour milling of products with variable allowance, providing the parameters of surface irregularities, was performed by large-scale computer flat and three-dimensional modeling and confirmed the results of the developed methods. To perform comparative calculations of the efficiency indicators of the method for optimizing milling conditions, the contour machining of a straight workpiece section with the height of 40 mm and the length of 600 mm was evaluated when removing a layer of different thickness: two mm (the length of the section is 300 mm) and four mm (the length of the section is 300 mm). Initial data are the optimal value of chip thickness amax = 0.04 mm, cutter diameter D = 20 mm, the number of cutter teeth z = 5, cutting speed V = 80 m/min. The value of minute feed without optimization is focused on the removal of the maximum allowance and is constant throughout the entire milling process, for these machining conditions it is equal to Smin = 300 mm/min. When optimizing the milling conditions for constant chip thickness, the minute feed will automatically change from Smin = 300 mm/min (with layer thickness of 4 mm) to Smin = 450 mm/min (with layer thickness of 2 mm). The results of the calculations are shown in Fig. 7 and 8. The graph in Fig. 7 shows that when the milling conditions are optimized for the chip thickness, the machining performance increases, in this particular case, it is 16%. The graph in Fig. 8 shows that when the milling conditions are optimized for the chip thickness, the machining conditions are improved, the power is equalized throughout the entire milling cycle, the impact load on the cutting tool and the machine kinematics are reduced by changing the feed value depending on the thickness of the removed layer.

Conclusions
According to the study results the following conclusions can be made: 1. The developed mathematical dependencies reflect the process of forming irregularities on the treated surface, depending on the milling conditions, the shape of the three-dimensional product, the profile of the cutting part, and the developed algorithm allows to automate the necessary calculations, predict the state of the surface after 2.5coordinate milling and select the conditions for obtaining the specified geometric parameters of irregularities.
2. When using 2.5-coordinate milling for machining three-dimensional products, taking into account the requirements for surface quality, savings can reach 40% of the standard hour.
3. The developed mathematical dependencies and calculation algorithms provide the determination of effective conditions for contour milling of workpieces with variable allowance and constant chip thickness, taking into account the requirements for surface quality.
4. The reliability of the theoretical developments carried out to ensure the surface quality during 2.5-coordinate milling and contour milling of workpieces with variable allowance is confirmed by computer modeling and experimental studies.