REGENERATING THE NC CODE IN ORDER TO IMPROVE THE SURFACE QUALITY

Original scientific paper The paper presents the research results of the impact of variable machining parameters: feed and spindle speed on surface roughness of Aluminium alloy 6005-T6, at CNC in the up and down milling with tools of different dimensions and different materials (6 HSS, 6 VHM and 10 VHM). The properties and classification of Aluminium alloys are cited. The definition of surface roughness at end milling is given and parameters that affect it are specified. It was concluded that the feed is the parameter that has the most influence on surface roughens, while the lowest roughness is achieved by up milling. Correlation equations have provided good prediction of surface roughness in the case of machining of VHM by cutter 10. The results of the experiment will serve as an input into the model for control of input parameters of the machining process by regeneration of NC code for the purpose of quality improvement of machined surface.


Introduction
Regardless of the continuous development of CAM software, new geometries and materials of cutting tools and machining technology and machine tools, the results in end-milling still depend largely on the scope of knowledge that is inseparable from the production staff.End-milling process is one of the most important and most frequently used operations of CNC machining of metal cutting because of its ability of fast material removal with the achievement of good quality of machined surface.However, it is a complex process in terms of planning the process due to the complex geometry of tools, development of new materials and high demands for the quality of the final product.Therefore, the full potential of the system machine tool-tool is beneficial almost in all cases of machining.
CAD/CAM systems can generate CNC programs based on part geometry, but they do not help programmers in choosing the appropriate mode of cutting and other process parameters, such as feed, cutting direction, cutter entrance and exit, and type of transition between the strokes of the tool path [1], geometry of tools, as well as insufficiently known dependence of NC code and requirements for surface quality (Ra, R max , Rz).
Surface roughness is an important measure of the quality of products, because it greatly affects the performances of mechanical parts and production costs.A lot of research achievements in modelling of roughness and optimization of control parameters have been accomplished in order to obtain the fine machining of the desired level, because only the right choice of the cutting regime can produce a better surface.
Aluminium and its alloys today are considered as one of the most practical metals for many reasons.Their low cost, low weight and modern design are some of the primary reasons for their widespread use.
They are non-sparking, electrically conductive, thermally conductive, non-magnetic, reflective, nontoxicity, chemically resistant and resistance to the corrosive atmospheres of industry.Aluminium alloys are widely used in engineering, especially in automotive industry, aerospace, shipbuilding, aeronautics and medicine [2÷5].
There are different ways to classify Aluminium alloys.The most commonly used is division into eight different groups of Al alloys, which are usually denoted with 1xxx-8xxx.In Tab. 1 are presented characteristics and standard labels of aluminium alloys according to Aluminium Association standards.property levels similar to 6061-T6, 6005-T5, and 6105-T5.Alloy 6005A has improved toughness characteristics compared to 6005 and 6105 and the chemical composition of 6005A provides improved extrudability compared to 6061 alloy.6005A provides good corrosion resistance and finishing characteristics for anodizing or paint (direct contact with dissimilar metals can cause galvanic corrosion).Alloy 6005A can be welded or brazed using various commercial methods.Consult the Material Safety Data Sheet (MSDS) for proper safety and handling precautions when using 6005A alloy.Not recommended for applications requiring resistance to impact loading [6].This alloy is applied at: truck, trailer, automotive, bus, and rail components; marine applications; platforms, ladders, structures; building and construction applications.
Various studies have been conducted on the surface roughness in end milling of aluminium alloys using different materials, cutting tools, and experimental and optimization methods.
Given the different directions of movement of the working piece and tools during the machining, the surface roughness in two types of milling, which are used in practice, up milling (UM) and down milling (DM), is not the same.
In terms of different directions of movement of the working piece and tools during processing, surface roughness at two types of milling, which are used in practice, up milling (UM) and down milling (DM) is not the same.Therefore, the literature review can be made from the aspect of studying roughness and surface quality depending on the type of milling, comparing the quality of the resulting surface at UM and DM by changing parameters of machining process.Dotcheva et al. [1] deal with research of a UM and DM at fine machining of complex pocket features with a focus on machining of corner cutting with respect to the required surface accuracy (surface error) and the given deviation i.e. tolerance.Machined material is aluminium alloy 6082 and tool is end mill of high speed steel (HSS), in diameter of 16 mm.The research was conducted with different machining regimes: with constant regimes and variable regimes, that is, by optimization of feed.It is shown that the optimized feed provides significantly less errors due to radial deviation of tools (due to minor deviation of tools) and the roughness of machined surface is lower.Analysis of the results of experimental research has led to the conclusion that at UM better accuracy of machining and lower surface roughness were achieved.It was also noted that the radial cutting force is lower for UM.Alauddin et al. [7] have observed the impact of cutting regime on average cutting forces for halfimmersion end milling UM and DM milling process at the machining of material Inconel 718 (hardness 260 BHN), nickel-based alloy that is difficult to machine and large cutting forces are generated.
Material of the tool end mill is uncoated tungsten carbide.Experiments were used for measurement of tensile forces components at the change of cutting regimes for the procedure end UM and DM.It is concluded that cutting forces increase at both machining processes, UM and DM, by increasing the cutting speed, feed as well as at increase of axial depth of cut.
The horizontal component of the cutting force is highest at UM, while the DM vertical component (which causes deflection of the tool) is the biggest.Gopinath et al. [8] have carried out research on quality and surface hardness obtained after finishing machining of the reinforced alloy Aluminium 2124 T851 which is used in aviation industry, in the machining of UM and DM with three kinds of cutting tools (8 mm flat end mill cutter, 10 mm ball nose end mill cutter and 20 mm insert type flat end mill cutter, all tools are carbide tipped or carbide cutters).It was concluded that there is a significant difference between UM and DM operations in terms of the hardness of the treated surface, and that the operation DM in the final passage can be used to increase surface hardness.Wu et al. [9] were engaged in experimental research and simulation process at UM and DM of titanium alloy Ti6Al4V (high strength, excellent fracture resistance, and corrosion resistance) difficult for machining.Tool material was TiAlN-coated carbide, tool diameter 10 mm.The variable parameters are the milling depth, milling width, cutting speed and feeding speed.Procedures of UM and DM are simulated in FEM software ABAQUS 6.12.It was concluded that stress at DM is higher than for UM, the temperature of the tool when DM is higher than in UM, cutting forces increase with the increase of cutting speed, feed per tooth, the width and depth of cutting as well as the experimental results obtained by force cutting and the simulated force, especially in UM showed good compliance.Motorcu et al. [10] have studied an impact of cutting speed, the direction of milling (UM and DM), a type of coating (TiAlN and TiAlN-TiN) and the number of inserts on the surface hardness and durability of tool at dry milling of the superalloy Inconel 718, at a constant feed and cutting depth.According to these studies, the most influential factors on the surface roughness are, respectively: cutting tool, the type of coating and the number of inserts, the direction of milling and cutting speed.At low and high cutting speeds, longer durability of cutting tools is obtained by the DM method compared to the UM.
Öktem et al. [11] have studied the surface roughness of mould obtained by treating the Aluminium alloy end cutter with AlTiN-coated solid carbide.Milling experiments were carried out in the mould cavity of a 7075-T6 Aluminium block with dimensions of 120 × 120 × 50 mm.
The impact of cutting speed, feed per tooth, radial and axial depth of cut and machining tolerances on the surface roughness were tested.The obtained conclusions indicate that: machining tolerance is the most dominant factor (96 %) followed by radial depth of cut (2,5 %), axial depth of cut (1,5 %), feed per tooth (0,177 %) and cutting speed (0,09 %).Hricova et al. [4] tested the impact of tool geometry (helix angles of 0°, 10°, 20°, 40°) and cutting regimes (cutting speed and feed) on the surface roughness of the machining of alloy AlMgSi (EN-AW 6060) using end mill cutters (insert).It was concluded that the helix angle of cutters does not significantly affect the roughness at the angle of 0° and 20°, while the roughness was increased in helix angle of 40°, which means that the angle is not favourable for machining of this material.Roughness is reduced by increasing the cutting speed, but the use of a liquid for cooling and lubricating does not affect significantly the roughness, so it does not have to be used.Lo et al. [12] have carried out testing of impact of the feed rate, spindle speed, depth of cut and tool material on surface roughness in machining of parts of the aluminium alloy 6061 using CNC process of the high-speed face-milling.According to this, it was seen that depth of cut has the most dominant effect (40 %) followed by tool material (30 %) and spindle speed (21 %) in terms of order of significance.In contrast, feed rate does not have a significance effect.The average percentage error of the surface roughness value between the optical method used in this study and the mechanical measurement is about 9,9 %, and the average percentage error drops within a reasonable range.Fuh et al. [13] are dealing with analytical and experimental research of the face milling of Aluminium alloy 7075-T6 at high speeds with a single insert fly-cutter (carbide and diamond plate).The obtained findings suggest that residual stresses increase with the feed, but decrease with the increase of cutting speeds and there is dependence between cutting speed and flank width, the surface roughness is largely affected by the tool nose radius and feed.In order to obtain a good surface quality it is required that the high cutting speed with low flank width and the feed are in corresponding correlation with the radius of the tool nose.
Benardos et al. [14] have presented the neural network modelling approach to predict the surface roughness at CNC face milling.Factors considered in the experiment are depth of cut, the feed per tooth, the cutting speed, the engagement and wear of the cutting tool, the use of cutting fluid and three components of cutting force.
Optimization is carried out by using the method of artificial neural networks (ANNs) where it was concluded that ANN can be used reliably for modelling of the surface roughness and prediction of its values at face milling.
Brezocnik et al. [15] propose genetic programming for the prediction of the surface roughness at end milling of the aluminium alloy 6061, end cutter of the high-speed steel.It was concluded that roughness is mostly affected by feed.Performed genetic model showed the possibility of a good prediction of surface roughness and finding significance of impact of machining parameters on the surface roughness.Wang et al. [16] present an analysis of the impact of cutting conditions (cutting speed, feed, depth of cut, concavity and axial relief angles of the end cutting edge of the end mill) and tool geometry (2-fluted end mills of diameter 20 mm, helix angle 30°, with different angles on end cutting edges) on roughness of the surface in machining of the pocket with end cutter of AL2014-T6.It was noted that the application of cutting fluid reduces friction between the tool and the chip/working piece; i.e., the roughness is higher than the cooling conditions in the dry cutting, and surface roughness generally increases when feed, concavity and axial relief angles increase, when the concavity angle is greater than 2,5°.Simunovic et al. [17] present research of roughness of the machined surface at face milling of the aluminium alloy at low power cutting machine.Based on the results of the central-composite experimental plan of the experiments with different machining parameters (spindle speed, feed and depth of cut) and roughness observed as output variables two models were developed: regression model and model based on the use of natural networks.Regression model provides better fitting than neural networks and can be used to predict surface roughness in a wider range of conditions of experimental tests.It was concluded that the minimum roughness was achieved at the highest spindle speeds and lowest feed.

Surface roughness
Roughness of the machined surface is one of the factors that significantly affect the features of the final product (fatigue strength, corrosion resistance, or creep life).So, it is one of the output machining parameters that cannot be ignored in the design phase of the product [18].
Surface roughness plays an important role in determination of the product quality, because it significantly affects the production costs.Fig. 1 shows the fish bone diagram of the parameters affecting surface roughness [19].The roughness of the surface depends on many controlled parameters of the process (including cutting speed, depth of cut and feed) and uncontrolled parameters of the process (material properties of tool and work piece, work piece quality, tool geometry, tool machine vibrations, tool wear, etc.) which are hardly achieved and followed continuously.
A machined surface is a result of geometric and kinematics reproduction of the tool point shape and trajectory.In a milling process, material is removed from the work piece by a rotating cutter.Additionally, milling operations can be divided into up (UM) and down milling (DM).In up milling, the cutter rotates against the direction of feed of the work piece, while in down milling, the rotation is in the same direction as the feed.
The actual trajectory of the cutting teeth of the cutter is not a circle but trochoid.Up milling (UM) and down milling (DM) do not use the same part of the trochoidal path during the cutting teeth due to various directions of rotating movement of the tool, as shown in Fig. 2. At DM, height of tooth mark (height of roughness) marked as h down is higher than at UM, h up obtained by the same feed.Therefore, the surface roughness at DM is higher than in UM [1].The height of roughness in milling (h) is Technical Gazette 24, Suppl.2(2017), 355-362 associated with a feed per tooth (f z ), radius cutting tool (R), and the number of teeth (z) and can be determined from the expression: .
A positive sign in the denominator stands for UM, a negative sign stands for DM.This equation implies the equality of tooth pitch on the circumference of cutting tools and machining without run-out.

Experimental planning
Within the framework of this paper was carried out experimental study of the impact of variable machining parameters (cutting speed and feed) on the surface roughness of Aluminium alloy 6005-T6, at variable geometry of the cutting tool (diameter and material of the cutting tool) in CNC UM and DM.The test results were used to develop a model for the control of machining process in order to improve the surface quality regeneration of NC code.The machine on which the machining was carried out is the triaxial vertical milling machine Haas VF-3SS with three CNC-controlled axes.Three cutters of different materials (HSS and VHM) and geometry given in Tab. 2 were used as cutting tools.
All paths of (path of movement) tools, as well as models of work pieces used in the experiment were obtained using the software CATIA P3 V5-6R2014.Generated path tools were proven in the CIMCO Edit software v7.0.7.
Correlation equations and diagrams depending on machining parameters of surface roughness were performed in the MATLAB software.
Emulsion with 6 % of oil, measured by refractometer PCE-010 was used as a mean for both cooling and lubrication.
As cutting speeds were not great, the emulsion was used more as a lubricant rather than for cooling, in order to avoid bonding of chipping for tool, the tool overheating and possibly fracture of cutters.
The surface roughness was measured by a measuring system (profilometer) TALYSURF-6 connected to the computer (Fig. 4).This device allows: measuring of all relevant parameters of roughness and waviness, statistical processing of the measurement results of roughness parameters, display of results on the screen, their saving, printing and drawing and spatial scanning surface.Measurement of roughness was performed at three measuring points for each area of shoots.
The work piece is obtained from the plate of dimensions 180 × 140 × 20 mm out of which prismatic shoots were obtained in pre-machining.The final raw parts with shoots of dimension 20 × 20 × 12 mm (Figure 3) were obtained first by rough machining and after by fine machining with end 16 mm cutter.Such raw parts were machined by end cutters of different diameters and materials (6 HSS, 6 VHM and 10 VHM) using the same cutting conditions, Tab. 3. Machining is performed with two passes with a radial depth of cut of 0,875 mm and final passage of 0,25 mm.Bering in mind that prices of tools used for experiments are very different, it is very important to determine all their possibilities of application in specific conditions in order to get required quality of workpiece.This can significantly influence reducing of the machine preparation time and the machining process time to achieve the required quality.All of this aims to increase the cost-effectiveness of overall machining process.
As the prices of tool used in tests are very different, determination of the possibility of their application in certain conditions, to obtain the required quality of the processed work, can considerably contribute to the reducing of the machine preparation time and the processing time to achieve the required quality.All of that aims to increase the cost-effectiveness of processing.The measurement of surface roughness is performed on all the shoots for each surface (Fig. 5), and their average value was derived, which was used in further analysis.

Results and discussion
Results of measured mean values of surface roughness (Ra, µm) depending on the input parameters: feed (f, mm/min), the number of rotations (n, r/min), or feed per tooth (S z , mm/t) and cutting speed (V, m/min) with respect to the direction of milling (UM and DM) and the geometry of cutters, are given in Tab. 4.   From the diagram it can be seen that a good correlation between Ra and the feed at UM could not be established.At DM there is a range of speed of feed at which the roughness of machined surface is lowest.
These results are not consistent with previous similar studies.It can be assumed that the cause of these results is bonding of the chip to the cutting tool, which can happen in the machining of Aluminium cutters of high speed steel.Fig. 7 shows the results of measurements of surface roughness after machining with DM and UM with cutter 6 of hard metal (VHM).It can be concluded that as the Technical Gazette 24, Suppl.2(2017), 355-362 feed increases also increases the Ra, the roughness of machined surface.This increase is the same for both UD and DM.At DM the greater roughness occurs at lower cutting speed, while the UM higher roughness is achieved at higher speed cutting.
Diagram of measurement results of parameter Ra of surface roughness at UM and DM depending on the feed obtained by the cutter of diameter 10 mm VHM is presented in Fig. 8.The diagram shows that as feed increases also increases the roughness of machined surface.It can also be noted that the roughness is greater at low cutting speed and higher in machining with DM process than with UM.Based on the results of the experiment, using the software package MATLAB, the correlative equations and corresponding diagrams of dependency of machining parameters were obtained: cutting speed (V, m/min) and feed per tooth (S z , mm/t) and average surface roughness (Ra, µm) in the case of DM and UM VHM cutter of diameter 10 mm in the form of: .
The diagram shows a good prediction of machining (Fig. 9).Correlative equations give a good correlation R k (from 99,58 % to 99,52 % DM and UM).From the diagram it can be concluded that with the same machining parameters the smaller roughness is obtained at UM than in DM.CAD/CAM systems can generate CNC programs based on the geometry of the part, but do not help programmers in choosing the appropriate cutting data, tool geometry and other parameters of the process [1].Commercial CAM software develops CNC programs mainly from the mathematical point of view and usually contains constant cutting conditions for a specific tool path and does not simulate the expected quality of the machined surfaces, and does not take into account the mechanical aspects of the process such as cutting forces and deviations of cutting tools.Therefore, machining practice in most cases in the operation of end milling is conservative, and planned cutting processes are not optimal.Insufficiently known dependence of NC code and requirements for the quality of machined surface (Ra, R max , Rz) imposes the need for the development of such a model.
In this paper was analysed the developing model (Fig. 10) for control of input parameters of the machining process from the aspect of solving the problem of regeneration of NC code for the improvement of the quality of the machined surface.Model consisted of input with data on machine tools, cutting tools, and CAD data and the requirements of the work piece.The application of CAM system generates the NC code that contains the expected quality of machined surface.By comparing this information with the data contained in the database with the results of experimental survey the information on the competence of the proposed machining conditions generated in CNC code was obtained.If there is a mismatch, or if experimental investigations determine that, under the suggested milling conditions, the obtained surface quality does not match the requirements, it is necessary to correct the suggested milling conditions, that is, to input the corrected data in the CNC code: -It is started from the assumption that the milling can be performed with a 6 mm diameter mill made from HSS with up milling.-If the analysis of data from the database for suggested milling indicates unsatisfactory results, then the possibility of changing modes of milling or direction change is analysed as the initial step.-If it is not possible to fulfil the requirements for surface quality, then it is necessary to change the tools (e.g.choose the tools of same diameter, but made out of material with better characteristics -hard metal) or choose a tool with a bigger diameter.-The change of tools comprises a need to choose the milling conditions (cutting speed and feed).
The selected adequate milling conditions have to fulfil the required processed work quality, the least processing time and necessary (high) cost-effectiveness.
If there is a mismatch, or if it is concluded by experimental testing that under the proposed machining conditions the surface quality does not meet the requirements, then it is necessary to adjust the proposed machining conditions, that is, to enter adjusted data into NC code.
The presented developing model should enable correction of NC code based on the error of machining (tool wear, deflection, stability, rigidity of the system tool-work piece-machines, etc.).
The work piece is machined in the new machining conditions, and the data of final quality of the machined surface are stored in the database -surface roughness.

Conclusion
In the paper the machining parameter influence was analysed: the spindle speed and feed, or feed per tooth and cutting speed on surface roughness of Aluminium alloy 6005-T6, during the CNC machining with tools of different diameters made of different materials (6 HSS, 6 VHM and 10 VHM) with up and down end milling.The results show that the quality of the milled surface strongly depends on the cutting conditions and the appropriate selection can fulfil the demands.Knowing the influence of the parameters of cutting conditions on the quality of the milled surface allows the creation of proper CNC code or its adjustment to obtain the demanded quality, if the recommended parameters of milling do not achieve the required quality.
Based on the experimental research it can be concluded that the choice of down instead of up milling, and the choice of mill made out of hard metal with a larger diameter instead of mill made out of HSS steel with a smaller diameter, can give better quality of the mill surface.Likewise certain conclusions were derived about the influence of the mode of cutting on the surface roughness.
Further development of the model for management of the cutting conditions along with experimental testing can significantly contribute to the improvement of CNC code or its correction, and the quality data in the database can contribute with further development of the model for automatic correction of CNC code.

Figure 1
Figure 1Fishbone diagram of the parameters that affect surface roughness[19]

Figure 2
Figure 2Trochoidal tool path in up and down-milling[1]

Figure 3
Figure 3 CAD model and the work piece after the experimental tests

Figure 6
Figure 6 UM versus DM for 6 HSS cutterThe obtained results are shown in the diagrams on the pictures below.In Fig.6are shown the results of measuring of the parameter Ra values of surface roughness of the cutter diameter of 6 mm HSS at UM and DM.From the diagram it can be seen that a good correlation between Ra and the feed at UM could not be established.At DM there is a range of speed of feed at which the roughness of machined surface is lowest.These results are not consistent with previous similar studies.It can be assumed that the cause of these results is bonding of the chip to the cutting tool, which can happen in the machining of Aluminium cutters of high speed steel.Fig.7shows the results of measurements of surface roughness after machining with DM and UM with cutter 6 of hard metal (VHM).It can be concluded that as the

Figure 7
Figure 7 UM versus DM for 6 VHM cutter

Figure 8
Figure 8 UM versus DM for 10 VHM cutter

Figure 9
Figure 9 Diagrams of correlative equations for a) DM and b) UM cutter of 10 VHM, with correlation coefficients Rk

Figure 10
Figure 10 Flowchart of the model for regeneration of the NC code

Table 1
Standard characteristic of aluminium alloys -xxx series Alloy 6005A-T6 is a versatile alloy.It can be used to produce standard and custom shape extrusions that are solid or hollow in design.As a medium strength of aluminium alloy, 6005A-T61 temper has mechanical Technical Gazette 24, Suppl.2(2017), 355-362

Table 2
Geometric features of end mill cutters used in the experiment o Helix angle ω = 45° z Number of flutes z = 3

Table 3
Terms of experimental tests