MEASUREMENT OF A WORKPIECE

Abstract: A coordinate positioning machine (20) is equipped with either an optical probe or a contact measuring probe (40). Movement of the head (22) of the machine to enable the probe (40) to scan an unknown surface is controlled by predicting the position of a subsequent point to which the head of the machine is to be driven upon the basis of three most recently measured points P1, P2, P3. The prediction of the subsequent point P4 is performed by machine control (30) in real time.

Description: MEASUREMENT OF A ORKPIECE BACKGROUND OF THE INVENTION J FIELD OF THE INVENTION The present invention relates to a method for controlling a coordinate positioning machine to scan a workpiece. Such a machine, (e.g. a machine tool or coordinate measuring machine) typically comprises a head, movable in three directions (X,Y,Z) relative to a bed, and a scale, together with a scale-reader for measuring the displacement of the head relative to a datum in each of the X,Y and Z directions. The head of the machine carries a measuring probe for measuring the distance between the head and a surface; the measuring probe may be an optical probe or a touch probe. An optical probe directs a beam of light at the surface, and determines from the reflected beam the position of the surface relative to the head. A contact or touch measuring probe (also known as an analogue touch probe) resiliently supports a stylus on the head in such a manner that the stylus is movable relative to the head in the X,Y,Z directions. Transducers in the probe measure the displacement of the stylus relative to the head in each of the X,Y and Z directions. It is possible using such a machine, to scan the profile of a workpiece. This is done by moving the head of the machine to bring the probe adjacent the surface to within a range of distance over which the probe may measure the position of the surface (known as the measuring range) , and then driving the head of the machine over the surface along a path whose profile is to be measured. When driving the probe over the surface, the probe must be kept within the measuring range (a) in order to collect data, and (b) to prevent collision damage to the machine. Automatically controlling the motion of the head of the machine relative to a surface within the constraints set out above can be difficult when the workpiece contour is not known in advance. 2^ DESCRIPTION OF RELATED ART One prior art method (known from U.S. 4,769,763) of achieving this with a touch probe is to drive the head of the machine in a direction determined from the instantaneous direction of deflection of the stylus from its rest position. Friction between the stylus and the surface makes this technique inaccurate since deflection of the stylus is not perpendicular to the instantaneous path direction. A prior art method of controlling a machine with an optical probe is shown in Fig 1. An optical probe 10 directs a beam of light 12 at a surface 14. The beam 12 is reflected by the surface 14, and a position sensitive detector in the probe detects the reflected beam and thus the position of the surface. Such a probe is known from EP 0235235. Movement of the machine is controlled by determining a straight line 16 passing through two previously measured points Qχ,Q 2 , and predicting the position of the next demanded point Q 3 as lying on this line. SUMMARY OF THE INVENTION A first aspect of the present invention provides a method for controlling a machine to scan a workpiece with a contact or touch measurement probe in which the head is driven on a path determined upon the basis of previously measured points on said surface, rather than a path determined from the instantaneous direction of stylus deflection. A second aspect of the present invention provides a method of controlling a coordinate positioning machine, the machine having a head, and a measuring probe connected to the head for sensing a distance between a surface and the head, the method controlling the machine to drive the head along a path adjacent a workpiece surface, and maintain the probe within measuring range of the surface, the method comprising the steps of: measuring the position of three points on the surface of the workpiece and lying on the path traced by the head; determining from at least the three previously measured points, the position of a subsequent point; and driving the head to a position at which the measuring probe lies within measuring range of the subsequent point. This method may be implemented with any measuring probe, for example an optical analogue probe, or an analogue touch (contact measuring) probe. By using three previously measured points, the predictive procedure can take curvature of the surface into account. In a preferred embodiment of the present invention, the speed with which the head is driven to a position adjacent the further point is determined as a function of the angle between the last three measured points on the workpiece surface. BRIEF DESCRIPTION OF DRAWINGS Embodiments of the present invention will now be described, by way of example, and with reference to the accompanying drawings in which: Fig 2 shows a coordinate measuring machine equipped with a measuring probe; and SUBSTITUTESM€ET Figs 3 to 5 are diagrams illustrating calculations involved in the method of the present invention. DESCRIPTION OF PREFERRED EMBODIMENTS Referring now to Fig 2, a coordinate measuring machine 20 has a head 22 movable relative to a carriage 24 in one direction, labelled in Fig 2 as the Z direction. The carriage 24 is supported on, and movable relative to a bridge 26 in a direction perpendicular to the Z direction, and defined in the diagram as the X direction. The bridge 26 is in turn supported on a table or bed 28 of the machine 20 for movement in a direction defined as the Y direction, which is orthogonal to both X and Y directions. Movements of the head 22, carriage 24 and bridge 26 are effected by motors Mx,My,Mz which are controlled by a machine control computer 30. Displacement of the head 22 in the X,Y,Z directions is measured relative to a datum by three machine transducers (not shown) whose outputs Tx,Ty,Tz are sent to a machine control 30. An analogue touch probe (known per se from e.g. WO 90/04149) 40 having a stylus 42 for contacting a workpiece is attached to the head 22 of the machine 20. The stylus 42 is supported by the probe 40 for movement relative to the head 22 in the directions X,Y,Z. Displacement of the stylus 42 in each of these directions is determined by a probe transducer (not shown) provided in the probe 40 whose outputs tx,ty,tz are sent to the control 30. If the stylus 42 is brought into contact with a workpiece surface, then provided the length of the stylus 42 is known, the probe 40 will provide an output corresponding to the distance between the head 22 and the surface. By combining the outputs tx,ty,tz of the probe transducers with the outputs of the machine transducers Tx,Ty,Tz, the position of the point of contact between the stylus 42 and the surface relative to the datum can be determined by the control 30. SUBSTITUTE SHEET The range of distance between the head 22 and the surface over which the probe 40 may measure the surface is known as the measuring range of the probe 40. When the probe 40 is within measuring range of a surface, the probe 40 is close enough to the surface to cause the stylus 42 to contact the surface, and yet not so close at to cause collision damage. To scan an unknown surface the probe must be driven over the surface and maintained within a range of distances from the surface, corresponding to the measuring range of the probe 40. Movement of the probe is controlled by the control 30, which determines from values of Tx,Ty,Tz and tx,ty,tz, the x and y coordinates of points on a surface and predicts from this information a subsequent position to which the probe should be driven. Referring now to Fig 3, an object O has a surface S whose profile varies in an X,Y plane. Three points P x , P 2 , and P 3 have X and Y coordinates (Xχ,Yι) , (X 2/ Y 2 ) (X 3 ,Y 3 ) which are known by the machine control 30. From the known positions of these points, it is desired to predict the position of a subsequent point P lying on the surface S in order that the control can operate motors Mx,My,Mz to drive the probe 40 to within measuring range of P 4 . To this end, the machine control 30 initially determines whether the points P X ,P 2 ,P 3 lie on a straight or substantially straight line. If this proves to be the case, point P 4 is assumed to be on this line at a distance from point P 3 corresponding to a parameter known as the maximum permitted point separation I ax , which is defined later. If no such linear relationship is found to exist the position of the point P is then predicted upon the basis of an assumption that the points Pi to P 4 lie upon a circular arc. The position of the point P 4 is defined in terms of a position vector from the point P 3 : where: L is the distance of P 4 from P 3 ; and ύgή is a unit vector extending from point P 3 toward point P . The prediction of point P 4 must be performed in real time. It is therefore a requirement that the mathematical operations required to predict P A are relatively simple. For clarity of explanation, these operations will now be explained in two distinct steps; the practical implementation does not however require this. 1. DETERMINATION OF U 3 Consider position vectors of point P 2 (U 12 ) from point i? lr and point P 3 (U 2(3 ) from point P 2 : Sι.2 = i ( χ 2 - χ ι) + i (y 2 - Yi) (2) 22.3 = i ( χ 3 - *2) + i (Ys - y 2 ) (3) Where i. and j. are unit vectors in the x and y directions respectively. Taking unit vectors of the vectors U 1>2 and U 2j3 : enables the angle ø between the unit vectors ύ 1/2 and U 2 , 3 to be determined from the magnitude of their cross product: sin ø = I 0 lι2 x U 2>3 I (6) the unit vector ύ 3 A is then found by rotating _ z about point P 3 by the angle ø specifically: U 3 , 4 = (Pxi + Pyi) / I u 3>4 I (7) where : Px = (x 3 - x 2 ) cos ø + (y 3 - y 2 ) sin ø (8) Py = (x 3 - x 2 ) sin ø + (y 3 - y 2 ) cos ø (9) 2. DETERMINATION OF L Referring to Fig 4, it can be seen that: R 2 = (R - E) 2 + L 2 A (10) where E is a parameter known as the chordal error, which is preselected by the user in advance. Expanding: R 2 = R 2 + 2ER + E 2 + L 2 / A for small values of E, E 2 <(2ER L = [8ER] % (11) Referring to Fig 5, R is calculated in the following way: considering right angle triangle ABC BC/R = sin w/2 (12) now: BC = [(x 3 - xi) 2 + (y 3 - yι) 2 3 % /2 360 - w = x ; x = 2 / 3 (angle at centre - 2 angle at circumference on same arc) and 180 - β = ø .'. W = 360 - 2 (180 - 0) = 2ø so equation (12) becomes R = [ (x 3 - x 2 + (y 3 - Y ! ) 2 ] % / 2 sin ø (13) from equation (6) sin ø = | ύ 1>2 x U 2 3 | so R = [(X 3 - X 2 + (y 3 " Yι) 2 ] % / 2 |U 1>2 X U^l (14) The mathematical analysis by which the final expression for equation (1) has been obtained is set out above to provide a further understanding of the method of the present invention. However, it is not necessary for the machine control to follow this procedure each time the position of a point is to be estimated. The values of L and U 3> have each been determined solely in terms of the x and y coordinates of the points P x to P 3 and the preselected value E. It would therefore be possible to reduce the position vector LU 3A to a single expression in such terms. In practice L and U 3 A are evaluated separately. This enables the calculated value of L to be compared with a predetermined maximum permitted value of L (! % , « ) which is dependent upon the smallest feature size of the surface to be scanned. The smallest feature size should be 3 to 5 times greater than the value of L^. If the calculated value of L exceeds the value L^, L will be restricted to It should be noted that the expressions which are evaluated in order to determine the position of point P A are single- valued and have solutions which are real, enabling fast calculation to be performed. This is, as is mentioned above, important in enabling point prediction in real time. SUB ST ITUTESHEET In a modification of the present invention ø is estimated on the basis of the angle between the immediate past set of points. In a further modification, the speed with which the head of the machine is driven is determined on the basis of the angle ø. For example, the driving speed is the product of a maximum permitted speed and the cosine of angle ø. In a simple adaptation of the present invention, scanning is performed with a touch measuring probe using the method of "2 point scanning" employed in the prior art for optical probes. This simplified method does not take surface curvature into account when predicting a subsequent point, but is nonetheless free from the problems associated with the prior art method of controlling a machine for scanning with a touch probe (discussed in the introduction to the present application) . SUBSTITUTESHEET

Claims: C AIMS 1. A method of controlling a coordinate positioning machine, the machine having a head, and a measuring probe connected to the head for sensing a distance between a surface and the head, the method controlling the machine to drive the head along a path adjacent a workpiece surface, and maintain the probe within measuring range of the surface, the method comprising the steps of: measuring the position of at least three points on the surface of the workpiece and lying on the path traced by the head; determining from at least the three previously measured points, the position of a subsequent point; and driving the head to a position at which the measuring probe lies within measuring range of the subsequent point. 2. A method of controlling a coordinate positioning machine having a head, and a touch probe connected to the head for sensing a distance between a surface and the head, the method controlling the machine to drive the head along a path adjacent a workpiece surface, and maintain the probe within measuring range of the surface, the method comprising: measuring the position of two points on the surface of the workpiece and lying on the path traced by the head; determining from the two previously measured points the position of a third point; and driving the head to a position at which the measuring probe, lies within measuring range of the subsequent point. SUBSTITUTESHEET 3. A method according to claim 1 wherein the step of determining the position of a subsequent point comprises the steps of: a) determining whether the three measured points lie on a straight, or substantially straight line; b) if the three measured points do not lie on a straight line, determining the direction of a unit vector (ϋ 3 A ) pointing towards the subsequent point, and determining a point separation distance to the subsequent point. 4. A method according to claim 3 wherein the point separation distance is calculated on the basis of the radius of curvature of a circular arc joining said three measured points, and a preselected parameter, being the chordal error between said arc and a chord defined by a line joining said third and said subsequent point. 5. A method according to claim 3 or claim 4 wherein said unit vector ti^ is determined on the basis of the angle between lines joining said three measured points, and the position vector of the third of said points as defined from the second of said points. 6. A method according to any one of claims 1,3,4 or 5 further comprising the step of determining a speed for driving the head to said position adjacent said subsequent point, on the basis of the angle between lines joining said three measured points.

Inventors: MCMURTRY DAVID ROBERTS, SUTHERLAND ALEXANDER TENNANT, MCMURTRY, DAVID, ROBERTS, SUTHERLAND, ALEXANDER, TENNANT
Applicants: RENISHAW PLC
Application year: 1991
Main classification: G05B19
IPC codes: B23Q35, B24B49, G01B5, G01B11, G05B19, G05D3