Application of optical scanning system to determine the machining allowances

The paper contains a description of replacing a process of marking-out iron casts with 3D scanning operation and the profits it implies. It presents some of the available scanning methods which is a part of surface metrology. The paper includes a description of scanning operation using structured light method and all information necessary to perform such operation, from the equipment construction up to creation of a report for the CNC machinist.


Introduction
Monitoring of machine part condition is an important research field in reliability analysis of mechanical components [1][2][3].Many metrological techniques have been developed to analyse the surface quality, defect analysis and measurement of process temperature [4][5][6].These techniques can be successful in various practical applications [7].For example, surface profilometry as a method of topography inspection enables the identification of singular components for fault diagnosis of machine parts [8][9][10][11].The defects of parts are very often caused by the inappropriately selected technological input parameters, condition and properties of a machine, as well as the process dynamics [12][13][14].
Nowadays, many technologies are available making it possible to collect data concerning the shape of an object or to measure whole surfaces necessary to monitor the individual processes of production.The existing measurement systems allow for the determination of the location of the object points in space with the accuracy of micrometers, x-raying and projection of an element inside without the necessity do destroy it, as well as for analysis of stresses and temperature distribution in objects.
Tracing is one of the basic operations in the technology of machine construction, long used as the method of positioning the machining tool in relation to the object being machined.Even today, tracing is used in many enterprises whose production profile requires such operations.The major problem with this technology is its total dependence on the operator performing the task and its susceptibility to human errors (fatigue, oppression, routine) [15].
Direct setting of a casting on the machine tool is often impossible for various reasons, such as too complex shape of the part under machining, dimensional repeatability, even within one series (low quality of casting plant products) or lack of points on the model which could be a base ensuring correct machining of all the required surfaces.In such a case, the first operation to be done in the technological process used so far is tracing in which an adequately trained employee draws lines which will be a basis for the machine tool operator to adopt machining bases on the machine.The operation of tracing is more and more often avoided to reduce the cost of labour.The solution which is expected to replace tracing is collection of data on the geometrical properties of the actual casting and comparison of them to the 3D CAD model [16,17].Then, basing on the comparison, one can determine the values of machining allowances and optimum distribution of them on the casting.
The purpose of the present work was to demonstrate the application of the optical scanning system for the determination of machining allowances in the technology of machining machine tool bodies as an example.

Scanning technology
At the moment, there are many technologies of collecting data concerning the shape of an object available in the market.Unfortunately, most of them will not be applied in practice in the case of the castings under discussion due, for example, to their too big overall sizes (x-ray tomography) or to too little data collected in a unit of time (CMM).Fig. 1 shows the division of shape measurement methods, in Fig. 2, one can see the division of optical methods.The optical method, lighting with structural light, has been selected for the scanning system to determine the values of machining allowances on the example of machining the bodies of machine tools.The method has a number of advantages, i.e.: -non-contact measurement -the casting can be partially dirty or oiled without the hazard of damaging the measurement device, -possibility of collecting even as many as 4 million points as result of one measurement [20], -high quantity of data collected at a time reduces the time of operation, -possibility of automating the measurement -no need to have a trained employee to perform the measurement, -precision of measurement by an order better than in the case of tracing [20-22]measurement tolerance lower than actually necessary.

Materials and methods
The scanning stand consists of a number of elements: -overhead crane with the capacity of 5 tons, -separated space for storing scanned castings and ones to be scanned, -measuring cell, ATOS ScanBox 6130 (Fig. 3) which comprises industrial robot, Fanuc M-20iA [23], rotating table with provided with a special plate with holes for mounting the device and a measurement probe, ATOS II Triple Scan [24], -light curtain and sensors of the object presence in the prohibited zone, -PC computer with ATOS Professional 2016 software.The rotating table (Fig. 3), a part of the stand, is also the seventh controllable axis, without which execution of correct and complete scanning process would be, in most cases impossible.The maximum load of the table determined by the producer is 2000 kg; its range of motion is ±180°.The stand is secured against a man's entering into the scanning zone.The parameters of the ATOS II Triple Scan probe are: cameras -2x5 Megapixels GigE CCD with the resolving power of 2448 x 2050 pixels, impact resistant casing made of carbon fibre, dimensions about 570 mm x 340 mm x 240 mm, weight about 12 kg, LED lighting -blue light technology.The measuring gate of the measuring cell has dimensions which allow for passing objects with the dimensions of up to 3 metres, however, for practical reasons, the biggest scanned casting had just a little more than 2300 mm in the longest axis, which caused problems with moving it and setting on the rotating table.
4 Technological operations of scanning 4.1.Basing the casting on the device on the scanner stand Adequate setting of the casting is crucial for the reasons of safety and the process correctness.Incorrect setting can result in a collision because there is a hazard of the scanner probe striking the casting or the device.

Construction of the scanning device
The next stage is construction of the device for scanning.The device must ensure the object stability and adequate precision of basing.It is also necessary to ensure the possibility of scanning the bottom of the casting and structure covering possibly smallest part of the scanned object.

Distribution of supports, determinatio0n of the casting position and locating the casting on the supports
The most often used method of distributing supports is setting them experimentally while creating the program.Of course, computer models of the device and the object to be scanned can be used, but one must consider the resulting discrepancies between the theoretical and the actual state.Castings always have allowances, which makes them differ from the CAD models which show a ready-made part.Determination of the centre of gravity is very important due to the centrifugal forces acting in the casting during the table rotation, particularly in case of very bug castings.In such a case, one can assume that the centre of gravity of the casting and the 3D model coincide.Location of the element on the supports, however, should be determined in the experimental way.Frequently, castings have significant allowances resulting from the reduction of the form complexity by the casting plant for technological reasons.The required accuracy of positioning the model on the scanning device supports is adopted with the tolerance of ±5 mm.This is due to practical reasons -most of the castings machined in the plant have masses of the order of several hundred kilograms and more and are carried by means of the overhead crane located under the ceiling.Very precise setting of an object with such a mass and in such conditions actually infeasible for the crane operator or senselessly time consuming.

Distribution of reference points
The reference points (RP) allow for combining the individual photos (scans) made by the scanner into an image of the whole.Although there is a technology nowadays which allows us to eliminate the use of reference points, the utilised stand does not possess adequate hardware for it.When the object is so small that can be contained in the measuring space of the scanner, the use of reference points is often not necessary.In other circumstances, particularly in the case of big objects, it is, unfortunately, inevitable.The software can combine the individual scans if there are at least three common reference points on each two scans.The software has the possibility of matching the scans basing on shapes, but the method is less precise and more unreliable.

IManE&E 2017
One of the two major factors to be considered when distributing the p[points on the scanned element is the above mentioned required visibility of the common points.Too long distance between them can make it difficult to ensure the presence of 3 reference points in the space of an individual scan.The other factor is masking of the casting surface by the reference points.The points should be located in places which are not subjected to machining because those surfaces are most important in the process.
When distributing the reference points, we can use two methods: gluing (Fig. 4) or magnetic beams (Fig. 5).The simplest method of distributing the points is gluing them on the element (Fig. 4).Fig. 6 shows an example of distribution of magnetic beams on the castings.Another solution of distributing RP is the use of previously marked and additionally made magnetic beams (Fig. 5) set on the casting and kept on it thanks to the magnets built into them.The solution shows many advantages and, in a longer period, a more costeffective option: -once marked beam can be put on the element and taken off it as many times as necessary, -much easier ensuring of RP distribution repeatability, -much shorter time of RP distributing.Magnetic beams have one important drawback as compared to the RP glued directly on the casting; they mask much larger surface of it thus limiting the number of useful data collected by the scanner.However, the problem can be eliminated by adequate positioning of the scanner probe while creating the program.

Creation of the scanning program
The possibility of automation of the scanning process is one of its most important advantages as it reduces the task of the stand operator to merely adequate setting of the device, putting the casting on the device and taking it off the device, putting the beams on the casting and taking them off it and actuation of the prepared program.
The program controlling the robot's motions can be created in automatic and manual way.Both in the case of automatic and manual process, writing the program begins with entering the ATOS SCABOX cell into the program or opening of a pattern already possessing the cell.Next models of the scanned object and the scanning device are imported.The device is imported as a VMR element (Visual Measuring Room) while the object as a network of medium solution.The program enables a test scan to be performed in order to match the 3D model with the actual object.In  Although the option of automatic creation of measuring points is available, most measurement series created by the program require manual corrections.When the program is created in the offline mode, the subsequent positions of the scanner probe are created basing on a CAD model located in the measuring space.The program makes it possible to determine which surfaces will theoretically be subjected to scanning (Fig. 8 left) in the given position of the probe.The problem is the discrepancies between the actual state (Fig. 8 right) and the theoretical one (Fig. 8   The reason might have been various kinds of physical disturbances, such as, for example light reflexes or ordinary differences between the casting and the theoretical model.The right approach, under the circumstances, is verification of the program written offline on a number of actual castings prior to proceeding to further activities. When the program is already prepared (regardless of the method applied), the scanning parameters are set and the proper scan is performed in order to collect the data for further processing.

Traversing
The subsequent stages of the process involve data processing.The data obtained as result of scanning must be adequately processed in order to determine the allowance values and to prepare a report for the machine tool operator.
Scanning renders data in the form of a cloud of points.Often, the device elements or even the rotating table are scanned.Correct performance of further operations requires removal of the unnecessary data.At the same time, it also reduces the file size and the quantity of information for the processor to cope with, which positively influences the time of calculations.Once the unnecessary data are removed, the next step is traversing of the possessed cloud of points.

Scan basing on a 3D model
The network obtain after traversing can be "described" on the 3D model.In order to perform basing on the basis of definite geometries, it is necessary to mark them on the model and to create separate surfaces.Next, a part of the network corresponding to the defined geometry is marked (Fig. 9).Selection of adequate basing parameters is a very important issue.Inadequate zone of tolerance or the upper or lower limit can result in incorrect basing of the network on the model and, consequently, result in negative allowances on the surfaces not machined.This is inadmissible, particularly in the case when the casting can be set in a way enabling all the surfaces to be correctly machined.Unfortunately those parameters are selected by the method of trial and error checking the allowance values obtained with the subsequent combinations of the parameters.Setting optimum values is often very difficult, particularly when scanning castings from different casting plants.

Preparation of report
The objective of scanning process is the determination and presentation of the machining allowance values distribution onto the mold.On the basis of the obtained data one can ascertain if the machining of the mold would cause the generation of shortage.Therefore, it is necessary to prepare a report including all required information.The coloristic dimension deviations maps -visual representation of machining allowances on the model are being created (Fig. 10).Since the zero (or negative) machining allowance values are unacceptable, the lower tolerance boundary is set to 0 mm.It results in a contrast occurring between the positive and non-positive values.It is applied in order to quick identification of a shortage.Despite the common visibility, as well as the possibility of approximate valuation of machining allowance on the basis of the legend located on the right side, the precise determination of allowances in a few points is advisable.It is made by the creation of the allowance labels (Fig. 11).The next stage is the determination of allowance values in the cantilever points.The most important areas are the cantilever points located on the machine tool's device.They are often located on the machined surfaces (they are being machined in the subsequent fix).The determination of these values is essential for the appropriate positioning of the mold in the device.
The last parts of creating the report involve the determination of control and fixing points.The control points are being created in the same way as cantilever points.They are prepared in order to define the machining base and validation of fixing carried out on the device.Knowing the machining program, the definition of values which have to be entered during fixing of machine base is possible.The exemplary fixing and control points together with the allowance values are presented in Fig. 12 left and Fig. 12 right respectively.The visible negative allowance is not a problem, because the PBX1 and PBY1 fixing points are not located on the machined surfaces.The prepared report should contain any information necessary for the appropriate determination of mold machining validity, as well as its positioning on the machining device.

Fixing on the machining device
Hitherto the positioning of the mold on the device has been carried out on the basis of linemarking.The adjusting of the level has been checked with the application of altimeter, whereas the rotation of the machine table has been set on the basis of line-marking in the two points.In the process which applies the report generated by scanner, the device is set to the appropriate dimensions without the fixed mold.

Conclusions
The introduction of scanner is accompanied by the two primary advantages for company: -shortening of technological times in relation to line-marking.The time savings obtained on the different mold models differ significantly because of drawing time.In case of some parts, the line-marking in the three different positions is necessary.Furthermore, the change of molds positioning on the line-marking plate is time consuming, especially in case of objects characterized by the mass in range of hundreds of kilograms.The scanning is always carried out in one position, which additionally decreases the preparation and completion times.
-the higher scanning accuracy and possibility of shortage detection.The elimination of such mold during the scanning stage allows the complaint in the casting division and generates substantial savings resulting i.e. from the lack of tool wear during machining and limitation of non-productive machine's application.

Fig 7 ,
one can see the arrangement of the probe measuring space on the scanned model.It is also visible, basing on the test scan performed, that shifting in relation to the actual object is insignificant.

Fig. 10 .
Fig. 10.Setting the lower limit of the display to 0 mm.