Error correction amount creating device

10054930 ยท 2018-08-21

Assignee

Inventors

Cpc classification

International classification

Abstract

In an error correction amount creating device that creates an error correction amount for a five-axis machine controlled by a numerical controller and having three linear axes and two rotation axes, the translation error correction amount and the rotation error correction amount for each lattice point of a lattice region into which a two-dimensional coordinate system space with the rotation axes is divided is obtained from data measured for each position of division of the respective axes and given to the numerical controller.

Claims

1. An error correction amount creating device that creates an error correction amount for a five-axis machine controlled by a numerical controller and having three linear axes and two rotation axes, the error correction amount creating device comprising: for said two rotation axes of a first axis and a second axis, a measurement data input unit that inputs, as arithmetic measurement data, a translation error and rotation error at respective positions divided at equal or unequal intervals for the second rotation axis, measured by a measuring machine, when the first axis is fixed at an arbitrary angle, and a translation error and rotation error at respective positions divided at equal or unequal intervals for the first rotation axis, measured by the measuring machine, when the second axis is fixed at an arbitrary angle, wherein, when one of said two rotation axes is fixed at an arbitrary angle, the translation error and rotation errors at the respective positions in the fixed axis are all the same, and an error correction amount arithmetic unit that obtains, from the arithmetic measurement data, at least one of a rotation axis-dependent translation error correction amount that is a translation error correction amount and a rotation axis-dependent rotation error correction amount that is a rotation error correction amount, for each lattice point of a lattice region into which a two-dimensional coordinate system space with the two rotation axes is divided at the equal intervals or unequal intervals in each axis direction; and an error correction amount output unit that outputs at least one of the rotation axis-dependent translation error correction amount and the rotation axis-dependent rotation error correction amount to the numerical controller controlling the five-axis machine.

2. The error correction amount creating device according to claim 1, which is a device independent from the numerical controller.

3. The error correction amount creating device according to claim 1, which is a device present within the numerical controller.

4. The error correction amount creating device according to claim 1, wherein the five-axis machine is a table rotating five-axis machine in which a table is rotated about the two rotation axes.

5. The error correction amount creating device according to claim 1, wherein the five-axis machine is a head rotating five-axis machine in which a head is rotated about the two rotation axes.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) The above-mentioned as well as other objects and features of the present invention will become clear from the description of embodiments below with reference to the accompanying drawings. Of the drawings:

(2) FIG. 1 is a view illustrating a table rotating five-axis machine having two rotation axes without an error;

(3) FIGS. 2A to 2C are views illustrating the translation errors and rotation errors of the A-axis when the C-axis is fixed in an arbitrary position and the A-axis is at each of 0 degrees, 45 degrees, and 90 degrees;

(4) FIG. 3A is a view showing each position at which a two-dimensional coordinate system space with two rotation axes is divided at equal intervals or unequal intervals in each axis direction;

(5) FIG. 3B is a view illustrating the translation error and rotation error of the A-axis for each position of division as shown in FIG. 3A;

(6) FIGS. 4A to 4E are views illustrating the translation error and rotation error of the C-axis;

(7) FIGS. 5A and 5B are views respectively illustrating the definition and motion of an A-axis coordinate system;

(8) FIG. 6 is a view illustrating that there are a translation error (EXC.sub.0,c, EYC.sub.0,c, EZC.sub.0,c) and rotation error (EAC.sub.0,c, EBC.sub.0,c, ECC.sub.0,c) dependent on the C-axis when the C-axis is fixed at an arbitrary angle c and the A-axis is at 0 degrees;

(9) FIG. 7 is a view illustrating a case where the translation error (EXC.sub.0,c, EYC.sub.0,c, EZC.sub.0,c) and rotation error (EAC.sub.0,c, EBC.sub.0,c. ECC.sub.0,c) dependent on the C-axis that are defined with a machine coordinate system XYZ is transformed into the A-axis coordinate system;

(10) FIG. 8 is a view illustrating a case where the C-axis is fixed at the arbitrary angle c and a change is made for the A-axis to an angle a other than 0 degrees;

(11) FIG. 9 is a view illustrating the translation error and rotation error dependent on the C-axis when seen from the A-axis coordinate system for each position of division as shown in FIG. 3A;

(12) FIG. 10 is a view illustrating that the translation errors and rotation errors dependent on the A-axis are the same within a column (frame in broken line), since the translation error and rotation error dependent on the A-axis do not change depending on the C-axis position but change depending on only the A-axis position a;

(13) FIG. 11A is a view illustrating each position for measurement of error;

(14) FIG. 11B is a view illustrating measurement data with respect to the A-axis and C-axis for the position for measurement of error;

(15) FIG. 12 is a view for defining the coordinate system and the positive direction of rotation in order to obtain at least one of the translation error correction amount and rotation error correction amount dependent on the rotation axis;

(16) FIGS. 13A to 13H are views illustrating that a work coordinate system X.sub.wY.sub.wZ.sub.w when a change is made to a for the A-axis being the rotation axis and to c for the C-axis being the rotation axis is obtained by transformation of a reference coordinate system X.sub.rY.sub.rZ.sub.r;

(17) FIG. 14A is a view illustrating an error correction table of the translation error correction amount and the rotation error correction amount;

(18) FIG. 14B is a view illustrating the translation error correction amount and rotation error correction amount for each lattice point shown in FIG. 14A;

(19) FIG. 15 is a view illustrating that at least one of a translation error correction amount (X.sub.ai,cj, Y.sub.ai,cj, Z.sub.ai,cj) and a rotation error correction amount (I.sub.ai,cj, J.sub.ai,cj, K.sub.ai,cj) for (ai, cj) can be obtained to be output to and set in a numerical controller;

(20) FIG. 16 is a view illustrating the configuration in which the numerical controller includes a translation and rotation error correction amount creating device;

(21) FIG. 17 is a flowchart illustrating a process of an arithmetic measurement data input unit, a translation and rotation error correction amount arithmetic unit, and a translation and rotation error correction amount output unit in a first embodiment;

(22) FIG. 18 is a view showing a tool head rotating five-axis machine having two rotation axes without an error;

(23) FIG. 19 is a view illustrating that the tool direction of a tool head is the Z-axis direction when the two axes are without an error and A equals 0 degrees;

(24) FIG. 20 is a view showing the translation error and rotation error of the C-axis;

(25) FIGS. 21A and 21B are views respectively illustrating the definition and motion of a C-axis coordinate system;

(26) FIG. 22A is a view illustrating the translation error and rotation error dependent on the A-axis when seen from the C-axis coordinate system (when the A-axis is fixed at the arbitrary angle a and a change is made for the C-axis to 0 degrees);

(27) FIG. 22B is a view illustrating the translation error and rotation error dependent on the A-axis when seen from the C-axis coordinate system (when the A-axis is fixed at the arbitrary angle a and a change is made for the C-axis to the angle c other than 0 degrees);

(28) FIG. 23A is a view showing each position at which a two-dimensional coordinate system space with two rotation axes is divided at equal intervals or unequal intervals in each axis direction;

(29) FIG. 23B is a view illustrating a case where the translation error and rotation error dependent on the C-axis and the translation error and rotation error dependent on the A-axis when seen from the C-axis coordinate system for each position of division are respectively combined;

(30) FIG. 24A is a view illustrating each position for measurement of error;

(31) FIG. 24B is a view illustrating measurement data with respect to the C-axis and A-axis for each position for measurement of error; and

(32) FIG. 25 is a view illustrating the definition of the coordinate system and the positive direction of rotation for obtaining at least one of the translation error correction amount and rotation error correction amount dependent on the rotation axis.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

First Embodiment

(33) <1> on Intended Machine and Error

(34) FIG. 1 shows a table rotating five-axis machine having two rotation axes without an error. A table 2 rotates about the A-axis and the C-axis and moves along the X-axis. A tool head mounted with a tool 3 moves along the Y-axis and the Z-axis. The machine may be of other configurations as long as the table 2 rotates about two rotation axes.

(35) When the two rotation axes are without an error and A equals 0 degrees, the table 2 is horizontal as in FIG. 1. A nominal A-axis rotation center line N.sub.A.sub._.sub.T and a nominal C-axis rotation center line N.sub.c.sub._.sub.T with an intersection N.sub.O.sub._.sub.T are orthogonal. Herein, N means nominal, and M which appears later in M.sub.A.sub._.sub.T (misaligned A-axis rotation center line) or the like means misalignment. Also, .sub.T indicates that data forms an error of the table. The position instruction with respect to the A-axis and C-axis that are rotation axes is assumed as (a, c).

(36) When the C-axis is actually moved according to the movement instruction, an error occurs. In JIS B6190-7, FIG. 1, b) error motion of rotation axis, the error of the C-axis is represented by EXC: radial direction motion in the X-direction, EYC: radial direction motion in the Y-direction, EZC: axis direction motion, EAC: tilt motion about the X-axis, EBC: tilt motion about the Y-axis, and ECC: angle positioning error. In the present invention, EXC: radial direction motion in the X-direction, EYC: radial direction motion in the Y-direction, and EZC: axis direction motion are called translation error, and EAC: tilt motion about the X-axis, EBC: tilt motion about the Y-axis, and ECC: angle positioning error are called rotation error.

(37) For the A-axis, in a similar manner, there are EXA: radial direction motion in the X-direction, EYA: radial direction motion in the Y-direction, and EZA: axis direction motion as the translation error of the A-axis and EAA: tilt motion about the X-axis, EBA: tilt motion about the Y-axis, and ECA: angle positioning error as the rotation error of the A-axis.

(38) <2> on Translation Error and Rotation Error of A-Axis

(39) FIGS. 2A, 2B, and 2C are views showing the translation errors and rotation errors of the A-axis when the C-axis is fixed in an arbitrary position and the A-axis is at each of 0 degrees, 45 degrees, and 90 degrees. Although the actual errors are small, the errors are depicted with an exaggeration in FIGS. 2A to 2C.

(40) The translation error and rotation error of the A-axis are defined with a machine coordinate system XYZ. The translation error of the A-axis is the respective X, Y, and Z components of the distance to M.sub.A.sub._.sub.T from N.sub.A.sub._.sub.T passing through N.sub.O.sub._.sub.T that is the intersection of the nominal A-axis rotation center line and the nominal C-axis rotation center line. The rotation error of the A-axis is the tilt about the X-axis, the Y-axis, and the Z-axis of M.sub.A.sub._.sub.T with respect to N.sub.A.sub._.sub.T.

(41) As shown in FIGS. 2A, 2B, and 2C, M.sub.A.sub._.sub.T may change depending on only an A-axis position a when the C-axis is fixed at an arbitrary angle and a change is made for the A-axis to each of 0 degrees, 45 degrees, and 90 degrees. Therefore, the translation error and rotation error of the A-axis change depending on the A-axis position a. In the present invention, the translation error and rotation error of the A-axis that change depending on the A-axis position a are as follows.

(42) When A=a, the X component, the Y component, and the Z component of the distance to M.sub.A.sub._.sub.T from N.sub.A.sub._.sub.T are respectively assumed as EXA(a), EYA(a), and EZA(a).

(43) When A=a, the tilt about the X-axis, the tilt about the Y-axis, and the tilt about the Z-axis of M.sub.A.sub._.sub.T with respect to N.sub.A.sub._.sub.T are respectively assumed as EAA(a), EBA(a), and ECA(a).

(44) Hereinafter, for the sake of simplification, EXA(a), EYA(a), EZA(a), EAA(a), EBA(a), and ECA(a) that are the translation error and rotation error of the A-axis are represented as EXA.sub.a, EYA.sub.a, EZA.sub.a, EAA.sub.a, EBA.sub.a, and ECA.sub.a.

(45) FIG. 3A shows each position at which a two-dimensional coordinate system space with two rotation axes is divided at equal intervals or unequal intervals in each axis direction. The interval in the case of division at equal intervals may be an error interval set as an error interval parameter or may be an error interval instructed by a program. As an interval that changes in correspondence with the A-axis or C-axis position, the interval in the case of division at unequal intervals may be an error interval set as a plurality of error interval parameters or may be an error interval instructed by a program.

(46) The translation error and rotation error of the A-axis for each position of division are as in FIG. 3B. A column (frame in broken line) in FIG. 3B shows the translation errors and rotation errors dependent on the A-axis for respective positions where the A-axis positions are the same. Since the translation error and rotation error of the A-axis change depending on only the A-axis position a (a1, . . . , 0, . . . , am), the translation errors and rotation errors dependent on the A-axis are the same within a column in FIG. 3B (are not dependent on the C-axis position).

(47) <3> on Translation Error and Rotation Error of C-Axis

(48) FIGS. 4A, 4B, 4C, 4D, and 4E respectively show the translation errors and rotation errors of the C-axis when A equals 0 degrees and C equals 0 degrees, A equals 0 degrees and C equals 45 degrees, A equals 0 degrees and C equals 90 degrees, A equals 45 degrees and C equals 0 degrees, and A equals 90 degrees and C equals 0 degrees. Although the actual errors are small, the errors are depicted with an exaggeration in FIGS. 4A to 4E.

(49) The translation error and rotation error of the C-axis are defined with the machine coordinate system XYZ. The translation error of the C-axis is the respective X, Y, and Z components of the distance to M.sub.c.sub._.sub.T from N.sub.c.sub._.sub.T passing through N.sub.O.sub._.sub.T that is the intersection of the nominal A-axis rotation center line and the nominal C-axis rotation center line. The rotation error of the C-axis is the tilt about the X-axis, the Y-axis, and the Z-axis of M.sub.c.sub._.sub.T with respect to N.sub.c.sub._.sub.T.

(50) As shown in FIGS. 4A to 4C, M.sub.c.sub._.sub.T may change depending on the C-axis position c when the A-axis is fixed at 0 degrees and a change is made for the C-axis to each of 0 degrees, 45 degrees, and 90 degrees. Therefore, the translation error and rotation error of the C-axis change depending on the C-axis position c. Further, as shown in FIGS. 4D and 4E, M.sub.c.sub._.sub.T may change depending on the A-axis position a when the C-axis position is fixed at 0 degrees and the A-axis position is changed to each of 45 degrees and 90 degrees. Therefore, the translation error and rotation error of the C-axis also change depending on the A-axis position a.

(51) In this manner, the translation error and rotation error of the C-axis change depending on the A-axis position a and the C-axis position c. Therefore, regarding the translation error and rotation error of the C-axis that change depending on the A-axis position a and the C-axis position c in the present invention,

(52) the X component, the Y component, and the Z component of the distance to M.sub.c.sub._.sub.T from N.sub.c.sub._.sub.T when A=a and C=c are respectively assumed as EXC(a, c), EYC(a, c), and EZC(a, c), and

(53) the tilt about the X-axis, the tilt about the Y-axis, and the tilt about the Z-axis of M.sub.c.sub._.sub.T with respect to N.sub.c.sub._.sub.T when A=a and C=c are respectively assumed as EAC(a, c), EBC(a, c), and ECC(a, c).

(54) Hereinafter, for the sake of simplification, EXC(a, c), EYC(a, c), EZC(a, c), EAC(a, c), EBC(a, c), and ECC(a, c) that are the translation error and rotation error of the C-axis are represented as EXC.sub.a,c, EYC.sub.a,c, EZC.sub.a,c, EAC.sub.a,c, EBC.sub.a,c, and ECC.sub.a,c.

(55) As described above, the translation errors and rotation errors of the A-axis and C-axis change depending on the A-axis position a and C-axis position c. Therefore, in the present invention, the translation error and rotation error that change depending on the rotation axis position (angle) are referred to as translation error and rotation error dependent on the rotation axis, and a correction amount for correction of the error is referred to as translation error correction amount and rotation error correction amount dependent on the rotation axis.

(56) <4> on A-Axis Coordinate System

(57) When two rotation axes are without an error, A equals 0 degrees, and C equals 0 degrees as shown in FIG. 5A, a coordinate system X.sub.aY.sub.aZ.sub.a in which the origin is the intersection N.sub.O.sub._.sub.T of the nominal A-axis rotation center line and the nominal C-axis rotation center line and the directions of X, Y, and Z are the same as in a machine coordinate system is assumed as the A-axis coordinate system.

(58) The A-axis coordinate system is fixed to the A-axis that is the rotation axis. FIG. 5B shows that the A-axis coordinate system is present on the A-axis that is the rotation axis having a translation and rotation error, when there are a translation error and rotation error dependent on the A-axis, A equals 0 degrees, and C equals 0 degrees.

(59) <5> on Translation Error and Rotation Error Dependent on C-Axis when Seen from A-Axis Coordinate System

(60) When the C-axis is fixed at the arbitrary angle c and the A-axis is at 0 degrees, there are a translation error (EXA.sub.0, EYA.sub.0, EZA.sub.0) and rotation error (EAA.sub.0, EBA.sub.0, ECA.sub.0) dependent on the A-axis. Therefore, the A-axis coordinate system X.sub.aY.sub.aZ.sub.a is present on the A-axis and is as shown in FIG. 6.

(61) When the C-axis is fixed at the arbitrary angle c and the A-axis is at 0 degrees as shown in FIG. 6, there are a translation error (EXC.sub.0,c, EYC.sub.0,c, EZC.sub.0,c) and rotation error (EAC.sub.0,c, EBC.sub.0,c. ECC.sub.0,c) dependent on the C-axis. The errors are all defined with the machine coordinate system XYZ.

(62) When the translation error (EXC.sub.0,c, EYC.sub.0,c, EZC.sub.0,c) and rotation error (EAC.sub.0,c, EBC.sub.0,c, ECC.sub.0,c) dependent on the C-axis that are defined with the machine coordinate system XYZ is transformed into the A-axis coordinate system as shown in FIG. 7, the translation error and rotation error dependent on the C-axis when seen from the A-axis coordinate system are as follows.

(63) When A=0 and C=c, the X.sub.a component, the Y.sub.a component, and the Z.sub.a component of the distance to M.sub.c.sub._.sub.T from Z.sub.a in the A-axis coordinate system X.sub.aY.sub.aZ.sub.a are respectively assumed to be EXC.sub.0,c-EXA.sub.0, EYC.sub.0,c-EYA.sub.0, and EZC.sub.0,c-EZA.sub.0.

(64) When A=0 and C=c, the tilt about the Xa-axis, the tilt about the Ya-axis, and the tilt about the Za-axis of M.sub.c.sub._.sub.T with respect to Z.sub.a in the A-axis coordinate system X.sub.aY.sub.aZ.sub.a are respectively assumed to be EAC.sub.0,c-EAA.sub.0, EBC.sub.0,c-EBA.sub.0, and ECC.sub.0,c-ECA.sub.0.

(65) Next, as shown in FIG. 8, the C-axis is fixed at the arbitrary angle c, and a change is made for the A-axis to the angle a other than 0 degrees. Since the A-axis coordinate system X.sub.aY.sub.aZ.sub.a is fixed to the A-axis that is the rotation axis, the A-axis coordinate system moves with the A-axis. Since the table that rotates about the C-axis is on the rotation axis A and the C-axis is fixed at the arbitrary angle c, the misaligned C-axis rotation center line M.sub.c.sub._.sub.T (see FIG. 7) when A=0 and C=c moves together with the A-axis, when a change is made for the A-axis to the angle a other than 0 degrees.

(66) When the C-axis is fixed at the arbitrary angle c and a change is made for the A-axis to the angle a other than 0 degrees, the A-axis coordinate system X.sub.aY.sub.aZ.sub.a and the misaligned C-axis rotation center line M.sub.c.sub._.sub.T when A=0 (degrees) and C=c (degrees) simultaneously move together with the A-axis. Accordingly, even if a change is made for the A-axis to the angle a other than 0 degrees, the translation error and rotation error dependent on the C-axis when seen from the A-axis coordinate system are the same as when A=0 and C=c. Thus, the translation error and rotation error dependent on the C-axis when seen from the A-axis coordinate system are EXC.sub.0,c-EXA.sub.0, EYC.sub.0,c-EYA.sub.0, EZC.sub.0,c-EZA.sub.0, EAC.sub.0,c-EAA.sub.0, EBC.sub.0,c-EBA.sub.0, and ECC.sub.0,c-ECA.sub.0

(67) The translation error and rotation error dependent on the C-axis when seen from the A-axis coordinate system for each position of division as shown in FIG. 3A are as shown in FIG. 9. A row (frame in dashed double-dotted line) in FIG. 9 shows the translation errors and rotation errors dependent on the C-axis when seen from the A-axis coordinate system for respective positions where the C-axis positions are the same. Since the translation error and rotation error dependent on the C-axis when seen from the A-axis coordinate system change depending on only the C-axis position c, the translation errors and rotation errors dependent on the C-axis when seen from the A-axis coordinate system are the same within a row in FIG. 9.

(68) <6> on Necessary Measurement Data

(69) From FIGS. 3A, 3B, and 9, combination of the translation error and rotation error dependent on the A-axis for each position of division as shown in FIG. 3A and the translation error and rotation error dependent on the C-axis when seen from the A-axis coordinate system is shown in FIG. 10. A column (for respective positions where the A-axis positions are the same) in FIG. 10 shows the translation error and rotation error dependent on the A-axis for each position where the A-axis positions are the same and the translation error and rotation error dependent on the C-axis when seen from the A-axis coordinate system where the A-axis positions are the same. A row (for respective positions where the C-axis positions are the same) in FIG. 10 shows the translation error and rotation error dependent on the A-axis for each position where the C-axis positions are the same and the translation error and rotation error dependent on the C-axis when seen from the A-axis coordinate system where the C-axis positions are the same.

(70) Since the translation error and rotation error dependent on the A-axis do not change depending on the C-axis position but change depending on only the A-axis position a, the translation errors and rotation errors dependent on the A-axis are the same within a column (frame in broken line) in FIG. 10. Thus, it is not necessary to measure the translation error and rotation error dependent on the A-axis for each position of division as shown in FIG. 3A.

(71) It is necessary to fix the C-axis at an arbitrary angle and measure only the translation error and rotation error dependent on the A-axis for each position of division on the A-axis. In this embodiment, the C-axis is fixed at 0 degrees. Thus, it is necessary to measure the translation error (EXA.sub.a, EYA.sub.a, EZA.sub.a) and rotation error (EAA.sub.a, EBA.sub.a, ECA.sub.a) (within a frame in broken line in FIG. 11B) dependent on the A-axis for each position (within a frame in broken line in FIG. 11A) where C=0 and A=a among the respective positions of division as shown in FIG. 3A.

(72) Since the translation error and rotation error dependent on the C-axis when seen from the A-axis coordinate system do not change depending on the A-axis position and change depending on only the C-axis position c, the translation errors and rotation errors dependent on the C-axis when seen from the A-axis coordinate system are the same within a row (frame in dashed double-dotted line) in FIG. 10. In order to obtain the translation error and rotation error dependent on the C-axis when seen from the A-axis coordinate system, only the translation error (EXC.sub.0,c, EYC.sub.0,c, EZC.sub.0,c) and the rotation error (EAC.sub.0,c, EBC.sub.0,c, ECC.sub.0,c) dependent on the C-axis are necessary.

(73) Thus, as shown in FIG. 11A, it is necessary to measure only the translation error (EXC.sub.0,c, EYC.sub.0,c, EZC.sub.0,c) and the rotation error (EAC.sub.0,c, EBC.sub.0,c, ECC.sub.0,c) (within a frame in dotted line in FIG. 11B) dependent on the C-axis for each position (within the frame in dotted line) where A=0 and C=c, among the respective positions of division as shown in FIG. 3A. An arithmetic measurement data input unit 21 (see FIG. 15) inputs the necessary measurement data. The measurement of the translation error and rotation error for each lattice point shown in FIGS. 11A and 11B may be performed using a method described in Japanese Patent Application Laid-open No. 2009-151756 mentioned above, for example.

(74) <7> on Translation Error Correction Amount and Rotation Error Correction Amount Dependent on Rotation Axis

(75) As shown in FIGS. 11A and 11B, the translation error and rotation error dependent on the A-axis for each position at which the two-dimensional coordinate system space with the two rotation axes is divided at equal intervals or unequal intervals in each axis direction and the translation error and rotation error dependent on the C-axis when seen from the A-axis coordinate system (see FIG. 10) can be calculated from a small amount of measurement data. As already described, the interval in the case of division at equal intervals may be an error interval set as an error interval parameter or may be an error interval instructed by a program. In the case of division at unequal intervals, an interval that changes in correspondence with the A-axis or C-axis position may be an error interval set as a plurality of error interval parameters or may be an error interval instructed by a program.

(76) By obtaining at least one of the translation error correction amount and rotation error correction amount dependent on the rotation axis from the translation error and rotation error dependent on the A-axis and the translation error and rotation error dependent on the C-axis when seen from the A-axis coordinate system, it is possible to obtain at least one of the translation error correction amount and rotation error correction amount dependent on the rotation axis from a small amount of measurement data. An error correction amount arithmetic unit 23 (see FIG. 15) performs this calculation. In the error correction amount calculation, a squared term of the error correction amount is ignored. Regarding an error, |e|<<1, where e is the error. Therefore, with approximation, sin(e)=e, and cos(e)=1. The same applies in an embodiment below.

(77) In order to obtain at least one of the translation error correction amount and rotation error correction amount dependent on the rotation axis, the following coordinate system and positive direction of rotation are defined as in FIG. 12. A reference coordinate system X.sub.rY.sub.rZ.sub.r (stationary coordinate system) of which the origin is the intersection of the nominal A-axis rotation center line and the nominal C-axis rotation center line and the X, Y, and Z directions are the same as in the machine coordinate system is defined. In the same manner as for the definition of the A-axis coordinate system, a work coordinate system X Y Z (moving coordinate system) fixed to the C-axis that is the rotation axis is defined. The counterclockwise direction of rotation when seen from the terminal side of the rotating coordinate axis is the positive direction of rotation of the rotation axis.

(78) By performing the following transformations [1] to [6] in order with the reference coordinate system X.sub.rY.sub.rZ.sub.r as shown in FIGS. 13A to 13H, the work coordinate system X.sub.wY.sub.wZ.sub.w in which a change is made respectively for the A-axis and C-axis as the rotation axes to a and c is obtained.

(79) [1] Rotation by EAA.sub.a, EBA.sub.a, and ECA.sub.a about the X.sub.r, Y.sub.r-, and Z.sub.r-axes, with the reference coordinate system X.sub.rY.sub.rZ.sub.r set as the reference coordinate system.

(80) [2] Translation by EXA.sub.a, EYA.sub.a, and EZA.sub.a along the X.sub.r-, Y.sub.r-, and Z.sub.r-axes (resulting in a coordinate system X.sub.1Y.sub.1Z.sub.1 (in FIG. 13B)), with the reference coordinate system X.sub.rY.sub.rZ.sub.r set as the reference coordinate system.

(81) [3] Rotation by the angle a about the X.sub.1-axis (resulting in the A-axis coordinate system X.sub.aY.sub.aZ.sub.a (in FIGS. 13C and 13D)), with the coordinate system X.sub.1Y.sub.1Z.sub.1 set as the reference coordinate system.

(82) [4] Rotation by EAC.sub.0,c-EAA.sub.0, EBC.sub.0,c-EBA.sub.0, and ECC.sub.0,c-ECA.sub.0 about the X.sub.a-, Y.sub.a-, and Z.sub.a-axes, with the A-axis coordinate system X.sub.aY.sub.aZ.sub.a set as the reference coordinate system.

(83) [5] Translation by EXC.sub.0,c-EXA.sub.0, EYC.sub.0,c-EYA.sub.0, and EZC.sub.0,c-EZA.sub.0 along the X.sub.a-, Y.sub.a-, and Z.sub.a-axes (resulting in a coordinate system X.sub.2Y.sub.2Z.sub.2 (in FIG. 13F)), with the A-axis coordinate system X.sub.aY.sub.aZ.sub.a set as the reference coordinate system.

(84) [6] Rotation by the angle c about the Z.sub.2-axis (resulting in the work coordinate system X.sub.wY.sub.wZ.sub.w (in FIGS. 13G and 13H)), with the coordinate system X.sub.2Y.sub.2Z.sub.2 as the reference coordinate system.

(85) With the transformations described above, a homogenous coordinate transformation matrix .sup.rT.sub.w for the reference coordinate system X.sub.rY.sub.rZ.sub.r to the work coordinate system X.sub.wY.sub.wZ.sub.w is obtained by the following expression (1).
.sup.rT.sub.w=.sup.rT.sub.1.sup.1T.sub.a.sup.aT.sub.2.sup.2T.sub.w(1)

(86) .sup.rT.sub.1: Homogenous coordinate transformation matrix for reference coordinate system X.sub.rY.sub.rZ.sub.r to coordinate system X.sub.1Y.sub.1Z.sub.1

(87) .sup.1T.sub.a: Homogenous coordinate transformation matrix for coordinate system X.sub.1Y.sub.1Z.sub.1 to A-axis coordinate system X.sub.aY.sub.aZ.sub.a

(88) .sup.aT.sub.2: Homogenous coordinate transformation matrix for A-axis coordinate system X.sub.aY.sub.aZ.sub.a to coordinate system X.sub.2Y.sub.2Z.sub.2

(89) .sup.2T.sub.w: Homogenous coordinate transformation matrix for coordinate system X.sub.2Y.sub.2Z.sub.2 to work coordinate system X.sub.wY Z.sub.w

(90) When the translation errors and rotation errors dependent on the A-axis and the C-axis are taken into consideration, the actual position of the table in the reference coordinate system X.sub.rY.sub.rZ.sub.r is as in the following expression (2).

(91) r p = T w r ( T ~ w r ) - 1 r p ~ = [ 1 - X 1 - Y - 1 Z 0 0 0 1 ] r p ~ where X = EXA a + ( EXC 0. c - EXA 0 ) Y = EYA a + ( EYC 0. c - EYA 0 ) cos ( a ) - ( EZC 0. c - EZA 0 ) sin ( a ) Z = EZA a + ( EZC 0. c - EZA 0 ) cos ( a ) - ( EYC 0. c - EYA 0 ) sin ( a ) = EAA a + ( EAC 0. c - EAA 0 ) = EBA a + ( EBC 0. c - EBA 0 ) cos ( a ) - ( ECC 0. c - ECA 0 ) sin ( a ) = ECA a + ( ECC 0. c - ECA 0 ) cos ( a ) - ( EBC 0. c - EBA 0 ) sin ( a ) .sup.r{tilde over (p)}: Correct position of table in reference coordinate system X.sub.rY.sub.rZ.sub.r .sup.rp: Actual position of table in reference coordinate system X.sub.rY.sub.rZ.sub.r .sup.r{tilde over (T)}.sub.w: Homogenous coordinate transformation matrix for reference coordinate system X.sub.rY.sub.rZ.sub.r to work coordinate system X.sub.rY.sub.rZ.sub.r when two rotation axes are without error
(2)

(92) When the translation error correction amount and rotation error correction amount dependent on the rotation axis are such that

(93) an X component X2.sub.a,c, a Y component Y2.sub.a,c, and a Z component Z2.sub.a,c of the translation error correction amount for movement of the rotation axis when A=a and C=c are sufficiently small and

(94) a tilt I2.sub.a,c about the X-axis, a tilt J2.sub.a,c about the Y-axis, and a tilt K2.sub.a,c about the Z-axis of the rotation error correction amount for movement of the rotation axis when A=a and C=c are sufficiently small, a transformation matrix with the correction amounts is the following expression (3).

(95) [ 1 0 0 X 2 a . c 0 1 0 0 0 0 1 0 0 0 0 1 ] [ 1 0 0 0 0 1 0 Y 2 a . c 0 0 1 0 0 0 0 1 ] [ 1 0 0 0 0 1 0 0 0 0 1 Z 2 a . c 0 0 0 1 ] [ 1 0 0 0 0 cos ( I 2 a . c ) - sin ( I 2 a . c ) 0 0 sin ( I 2 a . c ) cos ( I 2 a . c ) 0 0 0 0 1 ] [ cos ( J 2 a . c ) 0 sin ( J 2 a . c ) 0 0 1 0 0 - sin ( J 2 a . c ) 0 cos ( J 2 a . c ) 0 0 0 0 1 ] [ cos ( K 2 a . c ) - sin ( K 2 a . c ) 0 0 sin ( K 2 a . c ) cos ( K 2 a . c ) 0 0 0 0 1 0 0 0 0 1 ] [ 1 - K 2 a . c J 2 a . c X 2 a . c K 2 a . c 1 - I 2 a . c Y 2 a . c - J 2 a . c I 2 a . c 1 Z 2 a . c 0 0 0 1 ] ( 3 )

(96) Assuming that the transformation matrix in expression (2) and expression (3) are equal, the following expression (4) is obtained.
X2.sub.a.c=EXA.sub.a+(EXC.sub.0.cEXA.sub.0)
Y2.sub.a.c=EYA.sub.a+(EYC.sub.0.cEYA.sub.0)cos(a)(EZC.sub.0.cEZA.sub.0)sin(a)
Z2.sub.a.c=EZA.sub.a+(EZC.sub.0.cEZA.sub.0)cos(a)+(EYC.sub.0.cEYA.sub.0)sin(a)
I2.sub.a.c=EAA.sub.a+(EAC.sub.0.cEAA.sub.0)
J.sub.a.c=EBA.sub.a+(EBC.sub.0.cEBA.sub.0)cos(a)(ECC.sub.0.cECA.sub.0)sin(a)
K2.sub.a.c=ECA.sub.a+(ECC.sub.0.cECA.sub.0)cos(a)+(EBC.sub.0.cEBA.sub.0)sin(a)(4)

(97) While the translation error correction amount dependent on the rotation axis and the rotation error correction amount dependent on the rotation axis are obtained simultaneously in expression (4), only one of the translation error correction amount and rotation error correction amount dependent on the rotation axis may be obtained. That is, it may be such that only one of the translation error correction amount dependent on the rotation axis and the rotation error correction amount dependent on the rotation axis is obtained by the calculation described above.

(98) <8> on Input of Translation Error Correction Amount and Rotation Error Correction Amount

(99) As in the technique described in Japanese Patent Application Laid-open No. 2009-151756 mentioned above, there is a numerical controller having, within the device, an error correction table of the translation error correction amount and the rotation error correction amount as shown in FIGS. 14A and 14B. For the error correction table, a two-dimensional coordinate system space with two rotation axes is divided into lattice regions at equal intervals or unequal intervals in each axis direction (see FIG. 14A) with a method similar to the dividing method in FIG. 3A. At least one of a translation error correction amount (X.sub.ai,cj, Y.sub.ai,cj, Z.sub.ai,cj) and rotation error correction amount (I.sub.ai,cj, J.sub.ai,cj, K.sub.ai,cj) corresponding to each lattice point (ai, cj) (i=1, 2, . . . , m and j=1, 2, . . . , n) (see FIG. 14B) is set in the numerical controller.

(100) The interval in the case of dividing the rotational axes into lattice regions at equal intervals may be a correction interval set as a correction interval parameter or may be a correction interval instructed by a program. In the case of dividing the rotational axes into lattice regions at unequal intervals, an interval that changes in correspondence with the A-axis or C-axis position may be a correction interval set as a plurality of correction interval parameters or may be a correction interval instructed by a program.

(101) In contrast, in the present invention, at least one of the translation error correction amount X.sub.ai,cj, Y.sub.ai,cj, Z.sub.ai,cj) and rotation error correction amount (I.sub.ai,cj, J.sub.ai,cj, K.sub.ai,cj) for (ai, cj) can be obtained with expression (4) to be output to and set in the numerical controller. FIG. 15 is a block diagram in this case. In an error correction amount creating device 20, arithmetic measurement data is input from a measuring machine 10 by the arithmetic measurement data input unit, the error correction amount arithmetic unit 23 computes at least one of the translation error correction amount and rotation error correction amount dependent on the rotation axis with the measurement data, and an error correction amount output unit 25 outputs at least one of the translation error correction amount and the rotation error correction amount to a numerical controller 30. The configuration may be such that the translation and rotation error correction amount creating device 20 is present within the numerical controller 30, as in FIG. 16.

(102) FIG. 17 is view showing a flowchart for the arithmetic measurement data input unit, the translation and rotation error correction amount arithmetic unit, and the translation and rotation error correction amount output unit in the first embodiment. Each step will be described below.

(103) [Step ST01] Arithmetic measurement data (EXA.sub.ai, EYA.sub.ai, EZA.sub.ai, EAA.sub.ai, EBA.sub.ai, ECA.sub.ai) and (EXC.sub.0,cj, EYC.sub.0,cj, EZC.sub.0,cj, EAC.sub.0,cj, EBC.sub.0,cj, ECC.sub.0,cj) are input from the measuring machine 10.

(104) [Step ST02] At least one of the translation error correction amount (X.sub.ai,cj, Y.sub.ai,cj, Z.sub.ai,cj) and the rotation error correction amount (I.sub.ai,cj, J.sub.ai,cj, K.sub.ai,cj) is computed with expression (4).

(105) [Step ST03] At least one of the translation error correction amount (X.sub.ai,cj, Y.sub.ai,cj, Z.sub.ai,cj) and the rotation error correction amount (I.sub.ai,cj, J.sub.ai,cj, K.sub.ai,cj) is input to the numerical controller 30, and the process is terminated.

(106) Herein, step ST01 corresponds to the arithmetic measurement data input unit 21, step ST02 to the error correction amount arithmetic unit 23, and step ST03 to the error correction amount output unit 25.

Second Embodiment

(107) <1> on Intended Machine and Error

(108) FIG. 18 shows a tool head rotating five-axis machine having two rotation axes without an error. A tool head rotates about the C-axis and A-axis and moves along the X-axis and the Z-axis. A table moves along the Y-axis. The machine may be of other configurations as long as the tool head rotates about two rotation axes.

(109) When the two rotation axes are without an error and A=0 (degrees), the tool direction of the tool head is the Z-axis direction, as in FIG. 19. A nominal A-axis rotation center line N.sub.A.sub._.sub.H and a nominal C-axis rotation center line N.sub.c.sub._.sub.H are orthogonal at an intersection N.sub.O.sub._.sub.H to each other. Herein, .sub.H indicates data that forms an error of the tool head. The position instruction with respect to the A-axis and C-axis that are the rotation axes is assumed as (c, a).

(110) As the translation error of the C-axis, there are the radial direction motion EXC in the X-direction, the radial direction motion EYC in the Y-direction, and the axis direction motion EZC. As the rotation error of the C-axis, there are the tilt motion EAC about the X-axis, the tilt motion EBC about the Y-axis, and the angle positioning error ECC. As the translation error of the A-axis, there are the radial direction motion EXA in the X-direction, the radial direction motion EYA in the Y-direction, and the axis direction motion EZA. As the rotation error of the A-axis, there are the tilt motion EAA about the X-axis, the tilt motion about EBA about the Y-axis, and the angle positioning error ECA.

(111) <2> on Translation Error and Rotation Error of C-Axis

(112) FIG. 20 shows the translation error and rotation error of the C-axis. Although the actual errors are small, the errors are depicted with an exaggeration in FIG. 20. The translation error and rotation error of the C-axis are defined with the machine coordinate system XYZ. The translation error of the C-axis is the respective X, Y, and Z components of the distance to M.sub.c.sub._.sub.H from N.sub.c.sub._.sub.H at N.sub.O.sub._.sub.H that is the intersection of the nominal C-axis rotation center line and the nominal A-axis rotation center line. The rotation error of the C-axis is the tilt about the X-axis, the Y-axis, and the Z-axis of M.sub.c.sub._.sub.H with respect to N.sub.c.sub._.sub.H.

(113) The translation error and rotation error of the C-axis change depending on the C-axis position c. Therefore, regarding the translation error and rotation error of the C-axis that change depending on the C-axis position c in the present invention,

(114) the X component, the Y component, and the Z component of the distance to M.sub.c.sub._.sub.H from N.sub.c.sub._.sub.H are respectively assumed as EXC(c), EYC(c), and EZC(c) when C=c, and

(115) the tilt about the X-axis, the tilt about the Y-axis, and the tilt about the Z-axis of M.sub.c.sub._.sub.H with respect to N.sub.c.sub._.sub.H are respectively assumed as EAC(c), EBC(c), and ECC(c) when C=c.

(116) Hereinafter, for the sake of simplification, EXC(c), EYC(c), EZC(c), EAC(c), EBC(c), and ECC(c) that are the translation error and rotation error of the C-axis are represented as EXC.sub.c, EYC.sub.c, EZC.sub.c, EAC.sub.c, EBC.sub.c, and ECC.sub.c.

(117) <3> on Translation Error and Rotation Error of A-Axis

(118) FIG. 20 shows the translation error and rotation error of the A-axis. Although the actual errors are small, the errors are depicted with an exaggeration in FIG. 20. The translation error and rotation error of the A-axis are defined with the machine coordinate system XYZ. The translation error of the A-axis is the respective X, Y, and Z components of the distance to M.sub.A.sub._.sub.H from N.sub.A.sub._.sub.H at N.sub.O.sub._.sub.H that is the intersection of the nominal C-axis rotation center line and the nominal A-axis rotation center line. The rotation error of the A-axis is the tilt about the X-axis, the Y-axis, and the Z-axis of M.sub.A.sub._.sub.H with respect to N.sub.A.sub._.sub.H.

(119) The translation error and rotation error of the A-axis change depending on the C-axis position c and the A-axis position a. Therefore, regarding the translation error and rotation error of the A-axis that change depending on c and a in the present invention,

(120) the X component, the Y component, and the Z component of the distance to M.sub.A.sub._.sub.H from N.sub.A.sub._.sub.H are respectively assumed as EXA(c, a), EYA(c, a), and EZA(c, a) when C=c and A=a, and

(121) the tilt about the X-axis, the tilt about the Y-axis, and the tilt about the Z-axis of M.sub.A.sub._.sub.H with respect to N.sub.A.sub._.sub.H are respectively assumed as EAA(c, a), EBA(c, a), and ECA(c, a) when C=c an A=a.

(122) Hereinafter, for the sake of simplification, EXA(c, a), EYA(c, a), EZA(c, a), EAA(c, a), EBA(c, a), and ECA(c, a) that are the translation error and rotation error of the A-axis are represented as EXA.sub.c,a, EYA.sub.c,a, EZA.sub.c,a, BAA.sub.c,a, EBA.sub.c,a, and ECA.sub.c,a.

(123) <4> on C-Axis Coordinate System

(124) When two rotation axes are without an error, C=0, and A=0 as shown in FIG. 21A, a coordinate system X.sub.cY.sub.cZ.sub.c in which the origin is the intersection N.sub.O.sub._.sub.H of the nominal C-axis rotation center line and the nominal A-axis rotation center line and the directions of X, Y, and Z are the same as in a machine coordinate system is assumed as the C-axis coordinate system.

(125) The C-axis coordinate system is fixed to the C-axis that is the rotation axis. FIG. 21B shows that the C-axis coordinate system is present on the C-axis that is the rotation axis having a translation and rotation error, when there are a translation error and rotation error dependent on the C-axis, C=0, and A=0.

(126) <5> on Translation Error and Rotation Error Dependent on A-Axis when Seen from C-Axis Coordinate System

(127) When the A-axis is fixed at an arbitrary angle a and the C-axis is at 0 degrees as shown in FIG. 22A and a translation error (EXA.sub.0,a, EYA.sub.0,a, EZA.sub.0,a) and rotation error (EAA.sub.0,a, EBA.sub.0,a, ECA.sub.0,a) dependent on the A-axis that are defined with the machine coordinate system XYZ are transformed into the C-axis coordinate system, the translation error and rotation error dependent on the A-axis when seen from the C-axis coordinate system are such that

(128) the X.sub.c component, the Y.sub.c component, and the Z.sub.c component of the distance to M.sub.A.sub._.sub.H from Z.sub.0 in the C-axis coordinate system X.sub.cY.sub.cZ.sub.c are respectively EXA.sub.0,a-EXC.sub.0, EYA.sub.0,a-EYC.sub.0, and EZA.sub.0,a-EZC.sub.0 when C=0 and A=a, and

(129) the tilt about the X.sub.c-axis, the tilt about the Y.sub.c-axis, and the tilt about the Z.sub.n-axis of M.sub.A.sub._.sub.H with respect to Z.sub.c in the C-axis coordinate system X.sub.cY.sub.cZ.sub.c are respectively EAA.sub.0,a-EAC.sub.0, EBA.sub.0,a-EBC.sub.O, and ECA.sub.0,a-ECC.sub.0 when C=0 and A=a.

(130) When the A-axis is fixed at the angle a and a change is made for the C-axis to the angle c other than 0 degrees as shown in FIG. 22B, the C-axis coordinate system X.sub.cY.sub.cZ.sub.c and the misaligned A-axis rotation center line M.sub.A.sub._.sub.H when C=0 and A=a move simultaneously together with the C-axis. Therefore, even if a change is made for the C-axis to the angle c other than 0 degrees, the translation error and rotation error dependent on the A-axis when seen from the C-axis coordinate system are the same as when C=0 and A=a at EXA.sub.0,a-EXC.sub.0, EYA.sub.0,a-EYC.sub.0, EZA.sub.0,a-EZC.sub.0, EAA.sub.0,a-EAC.sub.0, EBA.sub.0,a-EBC.sub.0, and ECA.sub.0,a-ECC.sub.0.

(131) <6> on Necessary Measurement Data

(132) FIG. 23A shows each position at which a two-dimensional coordinate system space with two rotation axes is divided at equal intervals or unequal intervals in each axis direction. Combination of the translation error and rotation error dependent on the C-axis for each position of division and the translation error and rotation error dependent on the A-axis when seen from the C-axis coordinate system is shown in FIG. 23B. A column (for respective positions where the C-axis positions are the same) in FIG. 23B shows the translation error and rotation error dependent on the C-axis for each position where the C-axis positions are the same and the translation error and rotation error dependent on the A-axis when seen from the C-axis coordinate system where the C-axis positions are the same. A row (for respective positions where the A-axis positions are the same) in FIG. 23B shows the translation error and rotation error dependent on the C-axis for each position where the A-axis positions are the same and the translation error and rotation error dependent on the A-axis when seen from the C-axis coordinate system where the A-axis positions are the same.

(133) From FIGS. 23A and 23B, necessary measurement data as shown in FIGS. 24A and 24B is obtained. It is necessary to measure the translation error (EXC.sub.c, EYC.sub.c, EZC.sub.c) and rotation error (EAC.sub.c, EBC.sub.c, ECC.sub.c) (within a frame in broken line in FIG. 24B) dependent on the C-axis for the respective positions (within a frame in broken line in FIG. 24A) where A=0 and C=c, and it is necessary to measure the translation error (EXA.sub.0,a, EYA.sub.0,a, EZA.sub.0,a) and the rotation error (EAA.sub.0,a, EBA.sub.0,a, ECA.sub.0,a) (within a frame in dotted line in FIG. 24B) dependent on the A-axis for the respective positions (within a frame in dotted line in FIG. 24A) where C=0 and A=a, among the respective positions of division as shown in FIG. 23A. The arithmetic measurement data input unit 21 (see FIG. 15) performs input of the necessary measurement data.

(134) <7> on Translation Error Correction Amount and Rotation Error Correction Amount Dependent on Rotation Axis

(135) In order to obtain at least one of the translation error correction amount and rotation error correction amount dependent on the rotation axis, the following coordinate system and positive direction of rotation are defined as in FIG. 25. The reference coordinate system X.sub.rY.sub.rZ.sub.r (stationary coordinate system) of which the origin is the intersection of the nominal A-axis rotation center line and the nominal C-axis rotation center line and the X, Y, and Z directions are the same as in the machine coordinate system is defined. In the same manner as for the definition of the C-axis coordinate system, a tool coordinate system X.sub.tY.sub.tZ.sub.t (moving coordinate system) fixed to the A-axis that is the rotation axis is defined. The counterclockwise direction of rotation when seen from the terminal side of the rotating coordinate axis is the positive direction of rotation of the rotation axis.

(136) By performing the following transformations [1] to [6] in order with the reference coordinate system X.sub.rY.sub.rZ.sub.r, the tool coordinate system X.sub.tY.sub.tZ.sub.t in which a change is made to c for the C-axis as the rotation axis and to a for the A-axis as the rotation axis is obtained.

(137) [1] Rotation by EAC.sub.c, EBC.sub.c, and ECC.sub.0 about the X.sub.r-, Y.sub.r-, and Z.sub.r-axes, with the reference coordinate system X.sub.rY.sub.rZ.sub.r set as the reference coordinate system.

(138) [2] Translation by EXC.sub.c, EYC.sub.c, and EZC.sub.c along the X.sub.r-, Y.sub.r-, and Z.sub.r-axes (resulting in the coordinate system X.sub.1Y.sub.1Z.sub.1), with the reference coordinate system X.sub.rY.sub.rZ.sub.r set as the reference coordinate system.

(139) [3] Rotation by c about Z.sub.1 (resulting in the C-axis coordinate system X.sub.cY.sub.cZ.sub.c), with the coordinate system X.sub.1Y.sub.1Z.sub.1 set as the reference coordinate system.

(140) [4] Rotation by EAA.sub.0,a-EAC.sub.0, EBA.sub.0,a-EBC.sub.0, and ECA.sub.0,a-ECC.sub.0 about the X.sub.c-axis, the Y.sub.c-axis, and the Z.sub.c-axis, with the C-axis coordinate system X.sub.cY.sub.cZ.sub.c set as the reference coordinate system.

(141) [5] Translation by EXA.sub.0,a-EXC.sub.0, EYA.sub.0,a-EYC.sub.0, and EZA.sub.0,a-EZC.sub.0 along the X.sub.c-axis, the Y.sub.c-axis, and the Z.sub.c-axis (resulting in the coordinate system X.sub.2Y.sub.2Z.sub.2), with the C-axis coordinate system X.sub.cY.sub.cZ.sub.c set as the reference coordinate system.

(142) [6] Rotation by a about the X.sub.2-axis (resulting in the tool coordinate system X.sub.tY.sub.tZ.sub.t), with the coordinate system X.sub.2Y.sub.2Z.sub.2 set as the reference coordinate system.

(143) With the transformations described above, a homogenous coordinate transformation matrix .sup.rT.sub.t for the reference coordinate system X.sub.rY.sub.rZ.sub.r to the tool coordinate system X.sub.tY.sub.tZ.sub.t is obtained by the following expression (5).
.sup.rT.sub.t=.sup.rT.sub.1.sup.1T.sub.c.sup.cT.sub.2.sup.2T.sub.t(5)

(144) .sup.rT.sub.1: Homogenous coordinate transformation matrix for reference coordinate system XrYrZr to coordinate system X.sub.1Y.sub.1Z.sub.1

(145) .sup.1T.sub.c: Homogenous coordinate transformation matrix for coordinate system X.sub.1Y.sub.1Z.sub.1 to C-axis coordinate system X.sub.cY.sub.cZ.sub.c

(146) .sup.cT.sub.2: Homogenous coordinate transformation matrix for C-axis coordinate system X.sub.cY.sub.cZ.sub.c to coordinate system X.sub.2Y.sub.2Z.sub.2

(147) .sup.2T.sub.t: Homogenous coordinate transformation matrix for coordinate system X.sub.2Y.sub.2Z.sub.2 to tool coordinate system X.sub.tY.sub.tZ.sub.t

(148) When the translation errors and rotation errors dependent on the C- and A-axes are taken into consideration, the actual position of the tool in the reference coordinate system X.sub.rY.sub.rZ.sub.r is as in expression (6).

(149) r p = T t r ( T ~ t r ) - 1 r p ~ = [ 1 - X 1 - Y - 1 Z 0 0 0 1 ] r p ~ X = EXC c + ( EXA 0. a - EXC 0 ) cos ( c ) - ( EYA 0. a - EYC 0 ) sin ( c ) Y = EYC c + ( EYA 0. a - EYC 0 ) cos ( c ) + ( EXA 0. a - EXC 0 ) sin ( c ) Z = EZC c + ( EZA 0. a - EZC 0 ) = EAC c + ( EAA 0. a - EAC 0 ) cos ( c ) - ( EBA 0. a - EBC 0 ) sin ( c ) = EBC c + ( EBA 0. a - EBC 0 ) cos ( c ) + ( EAA 0. a - EAC 0 ) sin ( c ) = ECC c + ( ECA 0. a - ECC 0 ) .sup.r{tilde over (p)}: Correct position of tool head in reference coordinate system X.sub.rY.sub.rZ.sub.r .sup.rp: Actual position of tool head in reference coordinate system X.sub.rY.sub.rZ.sub.r .sup.r{tilde over (T)}.sub.t: Homogenous coordinate transformation matrix for reference coordinate system X.sub.rY.sub.rZ.sub.r to tool coordinate system X.sub.tY.sub.tZ.sub.t when two rotation axes are without error
(6)

(150) When the translation error correction amount and rotation error correction amount dependent on the rotation axis are such that

(151) an X component X2.sub.c,a, a Y component Y2.sub.c,a, and a Z component Z2.sub.c,a of the translation error correction amount for movement of the rotation axis when C=c and A=a are sufficiently small and

(152) a tilt I2.sub.c,a about the X-axis, a tilt J2.sub.c,a about the Y-axis, and a tilt K2.sub.c,a about the Z-axis of the rotation error correction amount for movement of the rotation axis when C=c and A=a are sufficiently small, a transformation matrix with the correction amounts is expression (7).

(153) [ 1 0 0 X 2 c . a 0 1 0 0 0 0 1 0 0 0 0 1 ] [ 1 0 0 0 0 1 0 Y 2 c . a 0 0 1 0 0 0 0 1 ] [ 1 0 0 0 0 1 0 0 0 0 1 Z 2 c . a 0 0 0 1 ] [ 1 0 0 0 0 cos ( I 2 c . a ) - sin ( I 2 c . a ) 0 0 sin ( I 2 c . a ) cos ( I 2 c . a ) 0 0 0 0 1 ] [ cos ( J 2 c . a ) 0 sin ( J 2 c . a ) 0 0 1 0 0 - sin ( J 2 c . a ) 0 cos ( J 2 c . a ) 0 0 0 0 1 ] [ cos ( K 2 c . a ) - sin ( K 2 c . a ) 0 0 sin ( K 2 c . a ) cos ( K 2 c . a ) 0 0 0 0 1 0 0 0 0 1 ] [ 1 - K 2 c . a J 2 c . a X 2 c . a K 2 c . a 1 - I 2 c . a Y 2 c . a - J 2 c . a I 2 c . a 1 Z 2 c . a 0 0 0 1 ] ( 7 )

(154) Assuming that the transformation matrix in expression (6) and expression (7) are equal, the following expression (8) is obtained.
X2.sub.c.a=EXC.sub.c+(EXA.sub.0.aEXC.sub.0)cos(c)(EYA.sub.0.aEYC.sub.0)sin(c)
Y2.sub.c.a=EYC.sub.c+(EZC.sub.0.cEYC.sub.0)cos(c)+(EXA.sub.0.cEXC.sub.0)sin(c)
Z2.sub.c.a=EZC.sub.c+(EZA.sub.0.aEZC.sub.0)
I2.sub.c.a=EAC.sub.c+(EAA.sub.0.aEAC.sub.0)cos(c)(EBA.sub.0.aEBC.sub.0)sin(c)
J2.sub.c.a=EBC.sub.c+(EBA.sub.0.aEBC.sub.0)cos(c)+(EAA.sub.0.aEAC.sub.0)sin(c)
K2.sub.c.a=ECC.sub.c+(ECA.sub.0.aECC.sub.0)(8)

(155) Since correction is performed to compensate for an error in the tool head, a value of the error in the tool head with an inverted sign from expression (8) is the correction amount (see the following expression (9)).
X2.sub.c.a=EXC.sub.c(EXA.sub.0.aEXC.sub.0)cos(c)+(EYA.sub.0.aEYC.sub.0)sin(c)
Y2.sub.c.a=EYC.sub.c(EZA.sub.0.aEYC.sub.0)cos(c)(EXA.sub.0.aEXC.sub.0)sin(c)
Z2.sub.c.a=EZC.sub.c(EZA.sub.0.aEZC.sub.0)
I2.sub.c.a=EAC.sub.c(EAA.sub.0.aEAC.sub.0)cos(c)+(EBA.sub.0.aEBC.sub.0)sin(c)
J2.sub.c.a=EBC.sub.c(EBA.sub.0.aEBC.sub.0)cos(c)(EAA.sub.0.aEAC.sub.0)sin(c)
K2.sub.c.a=ECC.sub.c(ECA.sub.0.aECC.sub.0)(9)

(156) While the translation error correction amount and rotation error correction amount dependent on the rotation axis are obtained simultaneously in expression (9), only one of the translation error correction amount and rotation error correction amount dependent on the rotation axis may be obtained. That is, it may be such that only one of the translation error correction amount dependent on the rotation axis and the rotation error correction amount dependent on the rotation axis is obtained by the calculation described above.

(157) For <8> On input of translation error correction amount and rotation error correction amount and thereafter, it is similar to the first embodiment, and therefore description is omitted.