NON-CONTACT COPY CONTROL DEVICE

Abstract: In a copy control device wherein a model (6) and a work are moved relatively with a tracer head (4) and a tool in an X - Y plane, measured distance values to the surface of the model, which are detected by first and second non-contact detectors (5a, 5b) obliquely mounted on the tracer head (4) rotatable about a Z axis are periodically sampled to obtain the coordinate values of measured points on the surface of the model, a normal vector (Nm) on the surface of the model is calculated from three coordinate values out of four measured points (P1n-1, P1n, P2n-1, P2n) successively obtained by the both detectors, and the tracer head is rotated so as to move along a projection (N1n) of the normal vector (Nn) on the X - Y plane, so that measuring axes of the detectors are controlled to be approximately vertical to the surface of the model. After two points are selected from four measured points, such a point is selected out of the remaining two measuring two points as a third point that satisfies a condition that a point of intersection between a perpendicular from such a point to a straight line passing through the previously selected two points and the above-mentioned straight line is interposed between the previously selected two points, and that satisfies a condition that the length of the above-mentioned perpendicular is larger than a predetermined value.

Description: This invention relates to a noncontact tracing control device. Noncontact tracing control devices are known in which, while an optical distance detector mounted to a tracer head is moved along a model surface, a distance to the model surface is detected in a noncontact fashion, and the operation of a machine tool is controlled in accordance with the result of distance detection representing the model shape. This type of control device is advantageous in that the model surface is not damaged when the model surface is traced. If the angle of inclination of the model surface is large, however, the measurement axis of the optical distance detector becomes almost parallel to the model surface, and the detection spot on the model surface is enlarged to an ellipsoid, thus lowering the tracing accuracy. Particularly when using a trigonometric type distance detector, measurement sometimes becomes impossible due to an interference between the optical axis and the model surface. An object of this invention is to provide a noncontact tracing control device in which the orientation of a noncontact distance detector is controlled in accordance with an angle of inclination of a model surface in such a manner that the measurement axis of the detector is exactly or nearly perpendicular to the model surface, to thereby improve the tracing accuracy. To achieve the above object, a noncontact tracing control device according to this invention comprises: a first detector arranged to be rotatable around a rotary axis and movable relative to a model in a direction perpendicular to said rotary axis, having a measurement axis extending obliquely with respect to said rotary axis, for measuring a distance therefrom to a point on a surface of the model in a noncontact fashion; a second detector arranged to be movable together with said first detector and having a measurement axis extending obliquely with respect to the rotary axis and shifted from the measurement axis of said first detector in a direction perpendicular to the rotary axis, for measuring a distance therefrom to another point on the surface of the model in a noncontact fashion; calculating means for calculating a normal vector of the surface of said model based on four measured distance values, which include first two values and second two values successively measured by said first and second detectors, respectively, at predetermined time intervals, while said first and second detectors are moved relative to said model, and calculating an angular position of a projection of the normal vector on a plane perpendicular to said rotary axis; and positioning means for positioning said first and second detectors at the angular position thus calculated. As described above, according to this invention, while the first and second detectors for detecting the distances therefrom to respective different points on the model surface are moved relative to the model, a normal vector of the model surface is calculated based on four measured distance values successively measured by the first and second detectors, an angular position of a projection of the normal vector on the plane perpendicular to the common rotary axis of the two detectors is calculated, and the detectors are positioned at the calculated angular position. As a result, the detectors can be always oriented exactly or nearly perpendicular to the model surface, whereby the distances to the model surface can be accurately measured and the tracing accuracy is improved. Brief Description of the Drawings FIG. 1 is a schematic diagram illustrating a noncontact tracing control device according to an embodiment of this invention and a tracing machine tool; FIG. 2 is an enlarged perspective view showing in detail a tracer head and a noncontact distance detector appearing in FIG. 1; FIG. 3 is a perspective view illustrating a process for calculating the rotation angle of the tracer head by the tracing control device; FIG. 4 is a flowchart of the process for calculating the rotation angle of the tracer head; FIG. 5 is a diagram illustrating a process of selecting a third point by the tracing control device, for the calculation of the rotation angle of the tracer head; and FIG. 6 is a flowchart of the selection process. Referring to FIG. 1, a tracing machine tool 3 comprises a table 31 horizontally movable in X- and Y-axis directions, and a Z-axis unit 36 vertically movable in a Z-axis direction relative to the table 31. A model 6 and a workpiece 35 are placed on the table 31, and the Z-axis unit 36 is equipped with a tracer head 4 to which first and second detectors 5a and 5b are mounted, and a tool 34. Pulse coders 33x, 33y and 33z are mounted, respectively, to servomotors 32x and 32y for driving the table and a servomotor 32z for driving the Z-axis unit. Reference numeral 32c denotes a servomotor for rotating the tracer head 4 around a vertical rotary axis (C axis shown in FIG. 2). The first and second distance detectors 5a and 5b each comprise, for example, a distance detector utilizing a reflected light amount and having a semiconductor laser or light-emitting diode as a light source, and detect the distance therefrom to the surface of the model 6 in a noncontact fashion. As shown in FIG. 2, the first detector 5a is mounted to the tracer head 4 obliquely relative thereto, and has a measurement optical axis extending obliquely at an angle of  with respect to the rotary axis (C axis) of the tracer head. The second detector 5b is attached to an outer side surface of the first detector 5a, and has a measurement optical axis extending parallel to the optical axis of the first detector and shifted therefrom outward in a direction perpendicular to the C axis. A noncontact tracing control device 1, which controls the operation of the tracing machine tool 3 in accordance with the outputs of the first and second detectors and the outputs of the various pulse coders, comprises a processor 11, a read-only memory (ROM) 12 storing a system program for controlling the entire operation of the tracing control device, a random-access memory (RAM) 13 for temporarily storing data including the outputs of the detectors, and a nonvolatile memory 14 backed up by a battery (not shown), for storing various parameters, such as a commanded tracing direction and commanded tracing speed manually input through an operator panel 2. The tracing control device 1 further comprises an interface 15 connected to the operator panel 2, A/D converters 16a and 16b having inputs connected to the first and second detectors 5a and 5b, respectively, D/A converters 17c, 17x, 17y and 17z, servo amplifiers 18c, 18x, 18y and 18z having inputs connected to the respective D/A converters and outputs connected to the servomotors 32c, 32x, 32y and 32z, respectively, and current position registers (RG) 19x, 19y and 19z having inputs connected to the pulse coders 33x, 33y and 33z, respectively. The processor 11 is connected to the elements 12 to 17z and 19x to 19z by a bus 10. The operation of the tracing control device 1 and tracing machine tool 3 will be now described. Before the tracing machine tool 3 is operated, the operator manually inputs various parameters, such as a command tracing direction and command tracing speed, through the operator panel 2, whereupon the input parameters are stored in the nonvolatile memory 14 under the control of the processor 11. The processor 11 calculates the amounts of displacement of the individual axes, on the basis of measured distance values La and Lb detected by the first and second detectors 5a and 5b and the values stored in the current position registers 19x, 19y and 19z, and generates speed commands Vx, Vy and Vz for the respective axes in accordance with the displacements of the individual axes, the commanded tracing direction and the commanded tracing speed. The speed commands Vx, Vy and Vz are converted into digital values by the D/A converters 17x, 17y and 17z, and are supplied to the servo amplifiers 18x, 18y and 18z, respectively. The servo amplifiers 18x, 18y and 18z drive the servomotors 32x, 32y and 32z, respectively, in accordance with the speed commands, whereby the table 31 is moved in the X- and Y-axis directions and the tracer head 4 and the tool 34 are moved in the Z-axis direction. Each time the servomotors 32x to 32z make a rotation over a predetermined angle, the corresponding pulse coders 33x to 33z generate a detection pulse, and upon generation of the detection pulse, current position data Xa, Ya and Za of the X, Y and Z axes stored in the current position registers 19x, 19y and 19z are incremented or decremented depending on the direction of rotation of the corresponding motors. While in this process, the processor 11 derives a normal vector of the surface of the model 6, on the basis of the measured values La and Lb of the first and second detectors 5a and 5b sampled at predetermined time intervals. More specifically, the processor 11 samples the measured values of the first and second detectors 5a and 5b at the predetermined time intervals (Step S11 in FIG. 4), while moving the tracer head 4 and the model 6 relative to each other in the X-axis direction at the commanded tracing speed, as shown in FIG. 3, and obtains coordinates (X1 n , Y1 n , Z1 n ) of a point P1 n (n = 1, ..., n-1, n) and coordinates (X2 n , Y2 n , Z2 n ) of a point P2 n , both points being on the model 6, on the basis of the measured values of the first and second detectors 5a and 5b sampled at the present sampling time and the current position data output from the current position registers 19x, 19y and 19z. The processor 11 then obtains a surface vector S1 n (X2 n -X1 n , Y2 n -Y1 n , Z2 n -Z1 n ) from the coordinates of these two points (Step S12), and obtains a surface vector S2 n (X1 n-1 -X1 n , Y1 n-1 -Y1 n , Z1 n-1 -Z1 n ) from the coordinates of two points P1 n and P1 n-1 relating to the measured values of the first detector 5a sampled at the present and preceding sampling times (Step S13). Further, the processor 11 obtains an outer product S1 n × S2 n of the vectors S1 n and S2 n , as representing a normal vector N n at the point P n (Step S14), and calculates an angle c n (= tan -1 (J n /I n )) between a projection N1 n of the normal vector N n onto the X-Y plane and the X axis (Step S15). Symbols I n and J n represent the X-axis and Y-axis components of the vector N n , respectively. The angle c n , which is output as a command value for the C axis, varies in accordance with the inclination of the model surface, and is c q at point P1 q , for example. Consequently, the measurement optical axes of the first and second detectors 5a and 5b are always perpendicular or nearly perpendicular to the model surface. According to the above method of determining the surface vectors S1 n and S2 n by using three points P1 n , P2 n , and P1 n-1 , however, an accurate normal vector N n cannot be obtained in the case wherein the three points are located exactly or almost in a straight line. Therefore, the three points are preferably selected in the following manner: First, measurement points P1 and P11 (corresponding to points P1 n and P1 n-1 in FIG. 3) relating to the measured values of the first detector 5a sampled at the present and preceding sampling times, respectively, are selected as first and second points (see FIG. 5). Subsequently, it is determined whether or not a measurement point P2 (corresponding to P2 n ) relating to the measured value of the second detector 5b sampled at the present sampling time satisfies both first and second conditions; the first condition being that an intersection P V of a perpendicular line extending from the point P2 perpendicularly to a straight line L passing through the points P1 and P11 with a line segment L connecting the points P1 and P11 is situated on the line segment L, and the second condition being that a distance L2 between the point P2 and the straight line L is greater than or equal to a predetermined value. If the point P2 fulfills these two conditions, then it is selected as a third point. If the measurement point P2 does not satisfy the conditions, a similar determination is made with regard to a measurement point P21 (corresponding to P2 n-1 ) relating to the previous measured value of the second detector 5b. If neither the point P2 nor P21 fulfills the conditions, a more suitable one of the points P2 and P21, for example, that point of which the distance to the straight line L is greater, is selected as the third point. If a measurement point not satisfying the first condition is selected as the third point, the selected three points form an obtuse-angle triangle and the point P1 or P11 is close to the opposite side, and thus such a point selection is not suitable. On the other hand, if a measurement point of which the distance L2 to the straight line L is small and which does not satisfy the second condition is selected, it is close to the straight line L and thus is not suitable. To select the third point according to the above-mentioned procedure, the processor 11 determines whether or not the intersection P V of the perpendicular line extending from the point P2 to the straight line L with the straight line L is on the line segment L (Step S21 in FIG. 6). To this end, first, a vector A (Ax, Ay, Az) having a start point at P1 and an end point at P11 and a vector B (Bx, By, Bz) having a start point at P1 and an end point at P2 are derived, and an inner product K (= AxBx + AyBy + AzBz) of the vectors A and B is divided by the length | A | of the vector A to obtain the distance L1 (= | B |cos = K/| A |) between the points P1 and P V . Then, it is determined whether or not the distance L1 takes a value greater than or equal to zero and at the same time smaller than or equal to the length | A | of the vector A . If the result of the determination is YES ( 0 ≦ L1 ≦ | A | ), then it is determined that the intersection P V is on the line segment L. If the result of the determination in Step S21 is YES, it is determined whether or not the distance L2 (= (| B | 2 - L1 2 ) 1/2 ) between the point P21 and the straight line L takes a value greater than or equal to a predetermined value La (Step S22). Since computation of square root (| B | 2 - L1 2 ) 1/2 requires time, in practice a determination is made as to whether or not L2 2 takes a value greater than or equal to La 2 . If the result of the determination in Step S22 is YES (L2 2 ≧ La 2 ), then it means that the point P2 satisfies the aforementioned first and second conditions, and accordingly, the point P2 is selected as the third point (Step S23). If one or both of the results of the determinations in Steps S21 and S22 are NO, it is determined whether or not the point P21 satisfies the first condition (Step S24), as in Step S21, and if the result of this determination is YES, it is determined whether or not the point P21 satisfies the second condition (Step S25), as in Step S22. If the result of the determination in Step S25 is YES, then it means that the point P21 fulfills both the first and second conditions, and therefore, the point P21 is selected as the third point (Step S26). When neither the point P2 nor P21 satisfies the conditions, one of the points of which the distance to the straight line L is greater is selected as the third point. In practice, however, a situation that neither the point P2 nor P21 fulfills both the first and second conditions is very rare. After three suitable points are selected in the above manner, the processor 11 executes Steps S12 to S15 in FIG. 4, to obtain an angle c n between the projection N1 n of the normal vector N n onto the X-Y plane and the X axis, and then generates a rotation command SC corresponding to the direction of the projection N1 n . The rotation command SC is converted into a digital value by the D/A converter 17c, and the resulting value is supplied to the servo amplifier 18c. The servo amplifier 18c drives the servomotor 32c in accordance with the rotation command SC, whereby the tracer head 4 is rotated around the C axis and positioned at the commanded rotational position c n . As a result, the measurement optical axes of the first and second detectors 5a and 5b are oriented exactly or nearly perpendicular to the model surface, and accordingly, the distance measuring accuracy and thus the tracing accuracy are improved. As described above, while the table 31 is moved horizontally on the X-Y plane in the commanded tracing direction at the commanded tracing speed by the operation of the servomotors 32x, 32y and 32z, the measured value of the first detector 5a is fed back to the tracing control device 1 and the position of the Z-axis unit 36 along the Z-axis direction is controlled by the tracing control device 1 such that a distance 1a (FIG. 2) between the first detector 5a and the measurement point P1 on the surface of the model 6 is constant. The measurement point P1 remains unshifted even when the tracer head 4 is rotated, as mentioned above, and therefore, the distance 1 between the tracer head 4 and the model 6 can be maintained constant as the distance between the first detector and the model is controlled to a fixed value. As a result, the workpiece 35 on the table 31 is machined to the same shape as the model 6 by the tool 34 mounted to the Z-axis unit 36. This invention is not limited to the above-described embodiment and various modifications may be made. For example, although, in the foregoing embodiment, this invention is applied to tracing control for machining a workpiece 35, it can also be applied to tracing control for digitizing the model surface. Further, the embodiment uses a distance detector utilizing a reflected light amount, but an optical trigonometric distance detector, eddy-current type distance detector, ultrasonic distance detector, or the like may be used. Furthermore, in the embodiment, the two measurement points relating to the two points measured by the first detector 5a are selected as the first two points among the three points for calculating the normal vector, but arbitrary two points may be selected from among the four measurement points relating to the four values measured by the first and second detectors, taking account of the distance between the two detectors, the shape of the model, a required tracing accuracy, and other factors.

Claims: A noncontact tracing control device (1, 3) comprising detector means (5a, 5b) operable to move relative to a model (6) and to detect a distance to the model (6) in a noncontact fashion, characterised by: a first detector (5a) arranged to be rotatable around a rotary axis (C) and movable relative to the model (6) in a direction perpendicular to said rotary axis (C), having a measurement axis extending obliquely with respect to said rotary axis (C), for measuring a distance from the first detector (5a) to a point (P1) on a surface of the model (6) in a noncontact fashion; a second detector (5b) arranged to be movable together with said first detector (5a) and having a measurement axis extending obliquely with respect to the rotary axis (C) and shifted from the measurement axis of said first detector (5a) in a direction perpendicular to said rotary axis (C), for measuring a distance from the second detector (5b) to another point (P2) on the surface of the model (6) in a noncontact fashion; calculating means (11) for calculating a normal vector (N) of the surface of said model (6) based on four measured distance values, which include first two values and second two values measured successively by said first and second detectors (5a, 5b), respectively, at predetermined time intervals, while said first and second detectors (5a, 5b) are moved relative to said model (6), and calculating an angular position () of a projection (N1) of the normal vector (N) on a plane (XY) perpendicular to said rotary axis (C); and positioning means (32c) for positioning said first and second detectors (5a, 5b) at the angular position thus calculated. A noncontact tracing control device (1, 3) according to claim 1, which further comprises a tracer head (4) rotatable around said rotary axis (C) and movable relative to said model (6) in a direction perpendicular to said rotary axis (C), and wherein said first and second detectors (5a, 5b) are mounted to the tracer head (4). A noncontact tracing control device (1, 3) according to claim 1 or 2, which further comprises sampling means for periodically sampling the measured distance values measured by said first and second detectors (5a, 5b), and storing means (13) for storing the measured distance values sampled by said sampling means. A noncontact tracing control device (1, 3) according to any preceding claim, which further comprises selecting means for selecting required three values from among said four measured distance values measured by said first and second detectors (5a, 5b), and wherein said calculating means (11) calculates said normal vector (N) based on the three measured distance values thus selected. A noncontact tracing control device (1, 3) according to claim 4, wherein said calculating means (11) calculates coordinates of three different points on the surface of said model (6), based on said three measured distance values, calculates first and second vectors (S1, S2) starting at one of the three points and leading to the other two points, respectively, and derives an outer product of said first and second vectors (S1, S2) as said normal vector (N). A noncontact tracing control device (1, 3) according to claim 4 or 5, wherein the selecting means selects two points from among four points relating to said four measured distance values as first and second points, and then selects one point from among the remaining two points as a third point on condition that the point selected satisfies a first condition that an intersection of a perpendicular line extending perpendicularly to a straight line passing through said first and second points with said straight line is located on a line segment connecting said first and second points and a second condition that a distance to said straight line is greater than or equal to a predetermined value. A noncontact tracing control device (1, 3) according to claim 6, wherein the selecting means selects a more suitable one of said remaining two points as the third point when neither of the remaining two points satisfies said first and second conditions.

Inventors: MATSUMOTO EIJI, MATSUURA HITOSHI, MATSUMOTO, EIJI, MATSUURA, HITOSHI, MATSUMOTO, EIJI, FANUC DAI-3 VIRA-KARAMATSU
Applicants: FANUC LTD, FANUC LTD.
Application year: 1991
Main classification: B23Q35
IPC codes: G01B11, B23Q35