Accuracy control of contour milling on CNC machines

The possibility of checking the accuracy of contours directly on a CNC machine equipped with a three-axis contact probe is proved. The technique of accuracy control of parts contours is presented, which is based on three-coordinate contact probe measurements according to the developed control program using standard CNC commands with automatic data entry into the file. The created application program performs the demonstration and visualization of the results. The application program loads the milling control program in the form of G-codes and a measurement data file, and all the necessary results for the accuracy evaluation appear in the graphics window.


Introduction
The functional capabilities of modern CNC-machines centers allow the machining of the entire part, even as complex as a turbine blade, in one operation [1,2].It is also known that when machining surfaces of complex shape, the cutting conditions vary significantly along the shaping path.This leads to the appearance of an error, the nature of which depends on many factors, a large part of which is stochastic.
Therefore, at the design stage of the control program, it is difficult to foresee possible collisions that arise during machining.In such cases it is recommended to use the principle of control over a priori information [3].To ensure the necessary accuracy, the control program is adapted to the actual processing conditions in order to distribute the allowance evenly and/or to correct the trajectory on the last pass.All these innovations require the measurement to be performed directly on the machine without removing the workpiece for measurements on the measuring and control machines.
To perform such measurements, use the measuring probes with which the CNC machines are equipped.For example, HAAS milling machining centers are equipped with Renishaw sensors that meet the accuracy requirements.Most often this is a contact three coordinate probes, which are mainly used to bind the control program to the workpiece and the machine coordinate system and cannot be used for the tasks outlined above.
At the same time, sensors of new generation from companies Blum, Renishaw and others (Fig. 1) [4] are widely used to control complex 3D surfaces.
Such sensors have a new system of transducers based on strain gauges.As a result, they can perform measurements on contact with the surface in an arbitrary direction, which is necessary when controlling complex 3D surfaces.To carry out such measurements, in addition to sensors, special software products are needed, for example, PowerINSPECT by Delcam.
Originally, this program was developed for use in monitoring and measuring machines, and then, together with Renishaw, it was transformed into a new software product, PowerINSPECT OMV (On-Machine Verification) [5,6].It is noted that the proposed technology OMV provides significant time savings, because now the accuracy of processing can be controlled at all stages of the technological operation, without removing the part (workpiece) from the machine.
To use PowerINSPECT OMV it is necessary to connect the computer to the CNC machine system, which will receive signals from the touch probe, perform their respective processing and prepare the protocol in the specified format.This kind of computer, it is necessary to provide a permanent communication with the CNC machine, in addition, only modern systems like Siemens 840D, Mazatrol 640, Fanuc 16i, Heidenhain 426 [7,8] can be used.
At the same time, the Ukrainian industry uses machines with three-coordinate measuring probes, whose measurement capabilities are limited to standard cycles that are "sewn up" in the CNC system [9].Thus, even in contour machining, the potential capabilities of existing measuring systems on machine tools cannot be used.In order to find out which contour has been processed, it is necessary to remove the part from the machine, violating dimensional technological chains for subsequent correction.Therefore, the development of a new technology aimed at expanding the functionality of the existing measuring system on the machine tool is an actual scientific and technical task.

Objective
The purpose of this study is the development of a simple technology to control the accuracy and verification of the contours of parts directly on the CNC milling machine equipped with a three-axis contact probe.For this, it is necessary, firstly, to develop a control program with automatic recording of measurement data in a file and secondly to create an application program that will display the results of the control on the loaded control program of processing (or its fragment relating to the contour) in G-codes and prepare file for the correction of the primary control program [10].

Statement of the main material
To perform the first task, it is possible to use the templates that are found in most systems of CNC machines equipped with simple touch probes.However, as practice shows, for most circuits measuring contours and surfaces of parts in order to further use the results when designing the correction of such patterns is not enough.Therefore, a special control program was developed using standard codes of movement of the touch probe, which, for example, are given in the article [11].The program is written in the G-codes, similar to the control program for milling the part contour.
This approach was used to control the machined contour of the workpiece, which consists of two straight lines and an arc of a circle (Fig. 2).The control program for milling the contour on the last pass is designed with the implementation of Siemens recommendations for controlling the feed at different sections of the trajectory (Fig. 3).

. The control program
The control program for automatic measurement must take into account the slope angles of the contour relative to the machine coordinate system.Since the probe contacts cannot be expected to accurately actuate when the slope angle of the contour is greater than 45 0 , the designed control program first moves in the direction of the X coordinate before contacting the machined surface with a given step in the Y coordinate.
In this case, the values s x of the coordinate are entered in the file, which determine the coordinate of the stopping motion on the signal from the probe.The coordinate s y is also determined automatically from the control program.Analogously, measurements are made when moving along the Y coordinate with a gradual shift along the X coordinate with the same pitch, and by the signal from the touch probe the coordinates s y are entered into the file.The coordinates of the point A of the contact of the sphere of the measuring probe with the surface of the contour are determined from the geometric relationships of Fig. 4.
and the motion is also carried out along the X coordinate: and the motion is also carried out along the Y coordinate: where are the coordinates of the contour, s R -the radius of the probe's sphere, and  is the angle of the contour at the measurement point, which is counted from the positive direction of the X axis counter clockwise (see Fig. 4).
Thus, it is evident that to perform such an algorithm, data are needed in the form of an array of the angle of inclination of the processed contour along its entire length.In addition, to estimate the accuracy, the coordinates of the theoretical contour are needed.The fulfillment of such operations is envisaged in the solution of the second research task.Since all the necessary data is contained in the contour control program, it was the basis for a specially developed application program.The recognition of the texts of the codes of the control program and the formation of equidistant coordinate arrays, coordinates of the contour being processed, and the slope angles are performed within the framework of the algorithm, the enlarged block diagram of which is presented in Fig. 5. the end of the section and the parameters J, I.In the second case, the radius of the arc is defined as: . The start and end of the section is determined in the direction of travel -indicated by the arrows in Fig. 6. of the end of the section are explicitly present in the G-codes of the control program.Therefore, the coordinates of the center of the arc of a circle can be determined from the triangle OCB:

Y X 0
where . In turn, these angles are determined from the geometric relationships in Fig. 6: Further, the calculation of the array of points of the equidistant cutter is performed with a specified step, and the array of points of the contour of the part is calculated from the known formulas [3] using a predetermined array of tilt angles of the equidistant.All these calculations are performed by numerical methods.Finally, an array of slope angles of the contour of the part is calculated and all the necessary data sets are created in the program to control the accuracy of the machined contour.
The interface of the program in the state of verification of the results for the loaded G-code file and the measurement file in the * .txtformat is shown in Fig. 7.After clear consecutive manipulations with the buttons on the interface, trajectories (equidistant) of the movement of the center of the mill (line 1) and the theoretical contour of the part (line 2) appear in its graphic window.Any part of the contour in the graphics window can be enlarged to the desired scale.For example, increasing the areas marked with rectangles allows observe the location of the coordinates of the measurement file (point 3) and the coordinates of the actual contour calculated on them (points 4).Note that the coordinates of the contour points are calculated in the program using formulas (1) and (2).As expected, the coordinates of the points that were measured by Based on the results that are presented in the graphics window, it is also possible to estimate the accuracy of the processed contour by the value  that determines the distance from the theoretical contour to the calculated control point and is measured along the normal to the theoretical contour of the part as shown in Fig. 7.
It should be noted that, since the slope angles of contour sections of the contour differ by 90 0 , this does not allow to carry out measurements by touch probe when moving along one coordinate.For comparison, using the developed technology and the created application program, the contour of the part was measured, the angles of the slope of which allow measurements by the touch probe when moving in the direction of one coordinate (Fig. 8).All the notations in Fig. 8 coincide with the notations of Fig. 7. 2. The control technique is developed, which provides for the use of the created application program that uses the control program for contour processing and the measurement file on the machine as the primary information.
3. The foundations of decision-making for correcting shaping trajectories from the results of measurements without removing the part from the machine are laid.

Fig. 1 .
Fig. 1.Probes of a new generation for the control of complex surfaces

Fig. 5 .
Fig. 5. Block diagram of the algorithmThe coordinates of the centers of the arcs representing the equidistant sections (and the contour) are determined by the formulas obtained from the geometric relationships in Fig.6,where line 1 indicates the trajectory of the equidistant of the mill 2, and the line 3 -the contour of the part.The program provides both possible options for setting the arc of the circle: the coordinates   B B y , x of the end of the section and the radius R, or the coordinates   B B y , x of

Fig. 6 .
Fig. 6.To the definition of the center of the arc

ISSN 2521- 1943 .
Mechanics and Advanced Technologies #2 (83), 2018 the probe coincide with the coordinates of the actual contour in the sections whose slope angle is a multiple and diverge in all other sections.