Numerical control

The numerical control system for five-axis machine tools addresses tool direction deviations at singular points by employing error compensation methods that ensure accurate tool positioning and direction control, minimizing operational errors and collisions.

DE102019003286B4Active Publication Date: 2026-01-15FANUC LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
DE102019003286
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Priority Date
2018-05-24
Filing Date
2019-05-09
Publication Date
2026-01-15
Estimated Expiration
2039-05-09

AI Technical Summary

Technical Problem

Existing numerical control systems for five-axis machine tools face issues with tool direction deviation when commands intersect singular points during workpiece installation error compensation, leading to potential machining errors or collisions due to the ambiguity in selecting between multiple solutions for rotary axis positions.

Method used

A numerical control system that includes a workpiece installation error compensation unit, which calculates and maintains tool position and direction using three linear and two rotary axes, and employs methods to select the appropriate solution based on proximity to previous or command values, or minimizes axis movement to avoid singular points.

Benefits of technology

Prevents tool direction deviation by ensuring accurate tool positioning and direction control, reducing operational errors and collisions by selecting the optimal rotary axis positions, thereby enhancing machining precision and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

Numerical control (10, 10A) which controls a five-axis machine tool using three linear axes and two rotary axes, which machines a workpiece mounted on a table, wherein the numerical control (10, 10A) comprises: a workpiece installation error compensation unit (13, 13A) that compensates for an installation error during the installation of the workpiece, wherein the workpiece installation error compensation unit (13, 13A) comprises: a tool position and direction calculation unit (131) that calculates a position and direction in a command coordinate system of a tool based on command values ​​for the three linear axes and the two rotational axes; and An error compensation unit (132), which, using an error size preset to correspond to the installation error during workpiece installation, performs such error compensation with respect to the three linear axes and the two rotary axes that the position and direction calculated by the tool position and direction calculation unit (131) in the command coordinate system of the tool on the workpiece with the installation error are maintained, wherein the error compensation unit (132) selects the positions of the two rotary axes to be compensated, if multiple solutions of a trigonometric calculation exist, according to a first procedure for selecting a solution close to a previous solution, or either a second procedure for selecting a solution close to the command value in the command coordinate system.or a third method for switching to a different solution at a time when a movement of the two rotation axes is minimized while selecting a solution that is close to a previous solution, , wherein the numerical control (10, 10A) drives each axis according to the coordinate values ​​of the three linear axes and the two rotary axes calculated by the workpiece installation error compensation unit (13, 13A), wherein the numerical control (10, 10A) further comprises: a read-ahead unit (11) that anticipates in a program, wherein The workpiece installation error compensation unit (13, 13A) performs error compensation according to the first method on the previously retrieved instruction value to determine a compensated command value, and The workpiece installation error compensation unit (13, 13A) sets the error compensation based on the first method when the compensated command value is within a range of motion of the five-axis machine tool, and sets either the error compensation based on the second method or the error compensation based on the third method when the compensated command value is outside the range of motion of the five-axis machine tool.
Need to check novelty before this filing date? Find Prior Art

Description

BACKGROUND OF THE INVENTION Area of ​​the invention

[0001] The present invention relates to a numerical control system that controls a five-axis machine tool which, using three linear axes and two rotary axes, machines a workpiece that is attached and mounted on a table. Related technology

[0002] In a numerical control system that controls a five-axis machine tool which, using three linear axes (an X, a Y and a Z axis) and two rotary axes (any two axes under an A, a B and a C axis, each about the X, the Y and the Z axis), machines a workpiece (an element to be machined) mounted on a table, a tool tip point control method is known as a method for controlling the coordinate values ​​of the respective axes. This method is a method for issuing instructions relating to a tool position, a tool direction and a tool speed in a rectangular coordinate system fixed on the table (a table coordinate system) and for controlling the position, direction and speed by converting them into coordinate values ​​of the respective axes at control points of the machine (see patent specification 1).In tool tip point control, the tool position and speed are controlled, and the tool direction is controlled by interpolating the positions of the respective rotary axes.

[0003] In a numerical control system that controls a five-axis machine tool, a workpiece installation error compensation function is known for compensating for an installation error during the installation of a workpiece (see, for example, patents 2 to 5). Patent 2 discloses a technology relating to a method and a device for compensating for an installation error of a workpiece. Patent 2 discloses a device for compensating for an installation error (an attachment error) of a workpiece (an element to be machined). This document discloses that a calculation is performed to determine the compensated B-axis and A-axis positions, using an arctangent (see, for example, paragraphs 0043 and 0046). However, an arctangent generally has two solutions between 0° and 360°.

[0004] How positions (B0, C0) of the B and C axes according toFig. 18. At a position of B = 0°, a tool direction does not depend on the position of C. Such a position of B = 0° is called a singular point. If a tool is tilted 20° in the Y-direction from the position (B0, C0), there are two solutions for the positions (B20, C90) and (B-20, C90) (i.e., (B340, C270)) of the B and C axes. Of the two solutions, the other solution is referred to as the "other solution" when viewed from the perspective of one solution. As described above, for a five-axis machine tool to enable the direction of a tool in a particular direction with respect to a workpiece, there are generally two sets of combinations between 0° and 360° for the positions of the two rotary axes.

[0005] When the two axes of rotation are compensated during workpiece installation error compensation (the tool direction is compensated), a numerical control system calculates the positions of the two axes of rotation to tilt the tool direction by a workpiece tilt error. In this case, it is necessary to select one of the two sets of positions that exist between 0° and 360°. Methods for selecting the set of positions are disclosed in patent specifications 3 to 5.

[0006] Patent specification 3 discloses a method (a first method) for selecting a solution close to a previous solution from among the two solutions. Patent specification 4 discloses a method (a second method) for selecting a solution close to a command position from among the two solutions. Patent specification 5 discloses a method (a third method) for switching to the other solution at a time when the movement of the two rotation axes is minimized, selecting a solution close to a previous solution. Patent specification 1: unexamined Japanese patent application, publication no. JP 2003-195 917 A Patent specification 2: unexamined Japanese patent application, publication no. JP H07-299 697 A Patent specification 3: unexamined Japanese patent application, publication no. JP S63-132 307 A Patent specification 4: Japanese patent no. JP 4 291 386 B2 Patent specification 5: Japanese patent no. JP 5 461 980 B2 SUMMARY OF THE INVENTION

[0007] As in Fig. As shown in Figure 4, it is assumed that a slight tilt error β about the Y-axis exists at the installation position of a workpiece. If, in this case, the tilt error β is compensated in such a way that the position and direction of a tool relative to a workpiece are maintained, as in the Fig. 5 and Fig. As shown in Figure 6, the tool is tilted by the inclination error β around the Y-axis during the installation of the workpiece.

[0008] If, during workpiece installation error compensation according to the second or third method, a command extending from a command start point to a command end point intersects a singular point, as in Fig. As shown in Figure 19, a tool direction (a tool direction when passing through a singular point) deviates from a correct tool direction (a tool direction after workpiece installation error compensation) when passing through a singular point (B = 0°) (for example, it increases). If the inclination error during workpiece installation is small, for example, no problem occurs because the deviation angle of the tool direction when passing through a singular point is small.

[0009] However, if the tilt error during workpiece installation is large and the deviation angle of the tool direction increases when passing through a singular point (for example, an incline angle), this can have negative effects on machining. For example, mutual interference between a workpiece and a side face of a tool, or a machining error when machining a side face, can occur. Since, with workpiece installation error compensation according to the first method, a command does not pass through a singular point, no deviation of the tool direction occurs.

[0010] It is an object of the present invention to provide a numerical control for a five-axis machine tool that is suitable for preventing a deviation of a tool direction from a tool direction after workpiece installation error compensation when a command extending from a command start point to a command end point passes a singular point.

[0011] (1) A numerical control (for example, a numerical control 10, 10A to be described later) according to the present invention is a numerical control which, using three linear axes and two rotary axes, controls a five-axis machine tool which machines a workpiece mounted on a table, wherein the numerical control comprises: a workpiece installation error compensation unit (for example, a workpiece installation error compensation unit 13, 13A to be described later) which compensates for an installation error during the installation of the workpiece, wherein the workpiece installation error compensation unit comprises: a tool position and direction calculation unit (for example, a tool position and direction calculation unit 131 to be described later),which calculates a position and direction in a command coordinate system of a tool based on command values ​​for the three linear axes and the two rotary axes; and an error compensation unit (for example, an error compensation unit 132 to be described later) which, using an error magnitude preset to correspond to the installation error during the installation of the workpiece, performs such error compensation with respect to the three linear axes and the two rotary axes that the position and direction calculated by the tool position and direction calculation unit are maintained in the command coordinate system of the tool on the workpiece with the installation error, wherein the error compensation unit determines the positions of the two rotary axes to be compensated, if multiple solutions of a trigonometric calculation exist, according to a first method for selecting a solution,which is close to a previous solution, or either a second method for selecting a solution that is close to the instruction value in the instruction coordinate system, or a third method for switching to another solution at a time when a movement of the two rotary axes is minimized while selecting a solution that is close to a previous solution, wherein the numerical control drives each axis according to the coordinate values ​​of the three linear axes and the two rotary axes calculated by the workpiece installation error compensation unit, wherein the numerical control further comprises: a pre-read unit (for example, an instruction analysis unit 11 to be described later) which anticipates in a program, wherein the workpiece installation error compensation unit performs error compensation according to the first method on the pre-retrieved instruction value to determine a compensated instruction value,and the workpiece installation error compensation unit sets the error compensation based on the first method if the compensated command value is within a range of motion of the five-axis machine tool, and sets either the error compensation based on the second method or the error compensation based on the third method if the compensated command value is outside the range of motion of the five-axis machine tool.

[0012] (2) In the case of numerical control according to (1), if the pre-fed command is a command in a machining mode, the workpiece installation error compensation unit may set the error compensation based on the first method for the machining mode if all compensated command values ​​in several blocks of the machining mode are within the range of motion of the five-axis machine tool, and the workpiece installation error compensation unit may set either the error compensation based on the second method or the error compensation based on the third method for the machining mode if at least one of the compensated command values ​​in the several blocks of the machining mode is outside the range of motion of the five-axis machine tool.

[0013] (3) In the case of numerical control according to (1) or (2), the workpiece installation error compensation unit may set either the error compensation based on the second method or the error compensation based on the third method if the pre-fed command is a command in a positioning mode.

[0014] According to the present invention, it is possible to provide a numerical control for a five-axis machine tool that is suitable for preventing a tool direction from deviating from a tool direction after workpiece installation error compensation when a command extending from a command start point to a command end point intersects a singular point. This problem is solved by a numerical control having the features of claim 1. BRIEF DESCRIPTION OF THE DRAWINGS Fig. Figure 1 is a diagram that represents error compensation when a workpiece to be positioned at a reference workpiece position is positioned with an error such as an actual workpiece position in a machine tool with a rotating tool head and five axes. Fig. Figure 2 is a diagram that shows only one tool and one tool holding section (TS) of a head of a machine tool with a rotating tool head and five axes. Fig. 3 is a top view of Fig. 2. Fig. Figure 4 is a diagram representing a case in which there is a small error (β) about a Y-axis with respect to a workpiece installation position. Fig. Figure 5 is a diagram that represents the movement of a tool, showing only a starting point and an end point with such compensation of an error that the tool position and direction are maintained with respect to a workpiece. Fig. 6 is a top view of Fig. 5, which merely represents the starting point and the endpoint. Fig. Figure 7 is a diagram illustrating the workflows of a tool and a tool holding section (TS) in a first procedure (a procedure to select a solution that is close to a previous solution). Fig. Figure 8 is a diagram illustrating the workflows of a tool and a tool holding section (TS) in a second procedure (a procedure for selecting a solution close to a command). Fig. Figure 9 is a diagram that represents an example where it is not desirable for a large movement (close to 180°) of a rotating axis of rotation (C-axis) to occur. Fig. 10 is a diagram that shows the movement according to the Fig. 8 and Fig. 9 using a path where the Bund and C-axis are used as coordinate axes when β = -1°. Fig. Figure 11 is a diagram that represents the motion in the first procedure (a procedure for selecting a solution close to a previous solution) using a trajectory where the B and C axes are used as coordinate axes (i.e., a diagram that shows the motion according to Fig. 7 using a path where the B and C axes are used as coordinate axes when β = -1°). Fig. Figure 12 is a diagram showing that as solution A approaches Ps (a singular point on a command path), solution A moves linearly towards solution B according to a third procedure (a procedure to switch to another solution at a time when the motion of the two rotation axes is minimized, selecting a solution close to a previous solution). Fig. 13 is a table that merely shows one command path according to Fig. 12 represents the corresponding error calculation and interpolation for a rotation axis. Fig. 14 is a diagram that shows the Fig. 8 corresponding movement of a rotation axis in the Fig. 12 and Fig. The third procedure shown in section 13 represents this. Fig. Figure 15 is a diagram showing that solution A moves uniformly along a curve towards solution B when solution A approaches a singular point on a command path in a third procedure. Fig. 16 is a table that is merely one of a Fig. Figure 15 shows the corresponding error calculation and interpolation for a rotational axis. Fig. 17 is a diagram that shows the Fig. 8 corresponding movement of a rotation axis in the Fig. 15 and Fig. The third procedure shown in section 16 represents the third procedure. Fig. Figure 18 is a diagram that represents a singular point and two solutions. Fig. Figure 19 is a diagram showing that a tool direction deviates from a correct tool direction (a tool direction after workpiece installation error compensation) when a singular point (B = 0°) is traversed according to the second or third method. Fig. Figure 20 is a diagram that represents a configuration of a numerical control according to a first embodiment. Fig. 21 is a flowchart of a program anticipation process executed by the numerical control according to the first embodiment. Fig. Figure 22 is a flowchart of a workpiece installation error compensation process during the execution of a program by the numerical control according to the first embodiment. Fig. Figure 23 is a diagram that represents an example of a program. Fig. Figure 24 is a diagram that represents a configuration of a numerical control according to a second embodiment. Fig. Figure 25 is a flowchart of a program anticipation process executed by the numerical control according to the second embodiment. Fig. Figure 26 is a flowchart of a workpiece installation error compensation process during the execution of a program by the numerical control according to the second embodiment. Fig. Figure 27 is a diagram that represents an example of a program. DETAILED DESCRIPTION OF THE INVENTION

[0015] An example of an embodiment of the present invention is described below with reference to the accompanying drawings. Corresponding or identical sections are designated by the same reference numerals in the respective drawings.

[0016] In connection with the present embodiment, a machine tool with five axes and a rotating head, such as the one described in Fig. Figure 1 describes. However, five-axis machine tools include a rotating table type and a combined type where both a head and a table rotate. Although the B and C axes according to Fig. 1. While the two axes of rotation are the A and B axes, there are also five-axis machine tools in which the A and B axes or the A and C axes are the two axes of rotation. The present invention can be applied to these five-axis machine tools, since these five-axis machine tools are similar in that a relative direction (a tool direction) of a tool with respect to a workpiece is controlled.

[0017] In a numerical control system that controls a five-axis machine tool, which uses three linear axes and two rotary axes to machine a workpiece (an element to be machined) mounted on a table, one rotary axis where velocity or acceleration increases significantly near a singular point is called the rotating axis, and the other rotary axis is called the tilting axis. In a Fig. In the configuration of a five-axis machine tool with a rotating head shown in Figure 1, the B-axis is a tilting rotary axis and the C-axis is a rotating rotary axis. If the tool direction is specified as the Z-axis direction, then B = 0°, and the C-axis position is arbitrary (undefined). This means that the tool direction is the Z-axis direction when C = 0° or C = 180°. Therefore, a position where the B-axis position is 0° is the singular point. However, it is not always true that a position of 0° for the tilting rotary axis (the B-axis) is a singular point. Depending on the machine configuration, another angle, such as B = 90° or B = 180°, can be a singular point. This means that in a machine configuration according to Figure 1, the B-axis position can be 0°. Fig. 1. In the case where B = 90°, the singular point lies at a position where the B-axis position is 90°. Furthermore, there are cases where the singular point is neither B = 0° nor B = 90°. Although, according to the following description, in the state according to Fig. 1. While a position where B = 0° and the B-axis position is 0° is the singular point, it is not always true that a position where the position of the tilting axis of rotation is 0° is the singular point. The present embodiment relates to an error compensation for a machine tool such as the one described in Fig. 1 (according to Fig. 1. C = 90° applies if a workpiece that is to be positioned at a reference workpiece position is as shown in Fig. 1 is shown, with an error at an actual workpiece position.

[0018] In this machine, a tool head rotates around the Z and Y axes with the movements of the linear axes X, Y, and Z, respectively, using the C and B axes. The actual workpiece position shifts due to table tilt or workpiece installation relative to its original position. The offset magnitude is measured beforehand, and an actual machine coordinate system is set to be shifted relative to a reference machine coordinate system by an offset error magnitude (δx, δy, δz) in the X, Y, and Z axes, an X-axis rotation error magnitude (α), a Y-axis rotation error magnitude (β), and a Z-axis rotation error magnitude (γ).This means that, based on the error sizes, an actual machine coordinate system is generated for a reference machine coordinate system, whereby a reference workpiece position in the reference machine coordinate system corresponds to an actual workpiece position in the actual machine coordinate system.

[0019] Patent 2 discloses a technology relating to a method and a device for compensating for an installation error of a workpiece. Specifically, patent 2 discloses a device for compensating for an installation error (an attachment error) of a workpiece (an element to be machined). This document discloses that a calculation is performed to determine the compensated B-axis and A-axis positions, using an arctangent (see, for example, paragraphs 0043 and 0046). However, an arctangent generally has two solutions between 0° and 360°, and the compensated B-axis and A-axis positions are not determined by this calculation. (First trial)

[0020] In light of this, as disclosed in patent specification 3, a solution is generally selected that is close to a previous solution. This method is referred to as the first method. However, the first method disclosed in patent specification 3 (a method for selecting a solution that is close to a previous solution) has the problem that a command position, as represented by an end position, is not reached. (Second procedure)

[0021] Therefore, patent specification 4 uses a method for selecting a solution that is close to an instruction, instead of selecting a solution that is close to a previous solution. This method is referred to as the second method.

[0022] A technical concept of the second method (a method for selecting a solution that is close to an instruction) disclosed in patent specification 4 is described. The position and direction of a tool in an instruction coordinate system (i.e., a reference machine coordinate system) are calculated based on an instruction value. A tool direction (I, J, K) T For B = Bc and C = Cc, the direction is calculated using Equation 1. This is the direction in a tool's command coordinate system. Here, "T" is a symbol indicating a displacement. Furthermore, in commonly known expressions of trigonometric functions such as cos(Cc), the parentheses () are omitted. [IJK]=[cos Cc−sin Cc0sin Cccos Cc0001][cos Bc0sin Bc010−sin Bc0cos Bc]

[001] =[cos Cc*sin Bcsin Cc* sin Bc cos Bc]

[0023] Since a program instruction is specified in a reference machine coordinate system, the position of a tool in a command coordinate system is a program instruction (Xc, Yc, Zc) of the linear axes themselves.

[0024] Next, error compensation is performed according to equation 2. (I, J, K) T will be based on (Ia, Ja, Ka) T The X-axis rotation error size (α), the Y-axis rotation error size (β), and the Z-axis rotation error size (γ) are compensated. The rotation errors are compensated in the order (α), (β), and (γ). [IaJaKa]=[cos γ−sin γ0sin γcos γ0001][cos β0sin β010−sin β0cos β][1000cos α−sin α0sin αcos α][ IJK]

[0025] Similarly, (Xc, Yc, Zc) T on (Xa, Ya, Za) T compensated. In the compensation of (Xc, Yc, Zc) T In addition to the compensation of a rotation error, a compensation of an offset error (δx, δy, δz) is added (see equation 3). [XaYaZa]=[cos γ−sin γ0sin γcos γ0001][cos β0sin β010−sin β0cos β][1000cos α−sin α0sin αcos α][XcYcZc]+[δxδyδz]

[0026] The B- and C-axis positions Ba and Ca, which correspond to the position calculated using equation 2 (Ia, Ja, Ka) T The values ​​are calculated using equations 4 to 20. Both the arccos and arctan calculations yield values ​​between 0° and 180°. The n in the term n · 360° in the arctan calculation is an integer and indicates that positions to which n multiples of 360° are added are also solutions. This means that the B-axis can operate between -180° and 180°, while the C-axis can operate even if it rotates arbitrarily many times in both positive and negative directions. 1) If Ia > 0 and Ja > 0 Solution A BaAa=arccos(Ka)CaA=arctanJaIa+n∗360° Solution B BaB=−arccos(Ka)CaA=arctanJaIa+180°+n∗360° 2) Let If < 0 and If > 0 Schedule A BaA=arccos(Ka)CaA=arctanJaIa+n∗360° Schedule B BaB=−arccos(Ka)CaB=arctanJaIa+180°+n∗360° 3) Price If < 0 and If < 0 Schedule A BaA=−arccos(Ka)CaA=arctanJaIa+180°+n∗360° Schedule B BaB=−arccos(Ka)CaB=arctanJaIa+n∗360° 4) Let If > 0 and If < 0 Schedule A BaA=−arccos(Ka)CaB=arctanJaIa+180°+n∗360° Schedule B BaB=−arccos(Ka)CaB=arctanJaIa+n∗360°

[0036] 5) Let If = 0 and If > 0 Schedule A BaA=arccos(Ka)CaA=90°+n∗360° Schedule B BaB=−arccos(Ka)CaB=270°+n∗360°

[0037] 6) Price If = 0 and If < 0 Schedule A BaA=arccos(Ka)CaA=270°+n∗360° Schedule B BaB=−arccos(Ka)CaB=90°+n∗360°

[0038] 7) If Ia > 0 and Ja = 0 Solution A BaA=arccos(Ka)CaA=0°+n∗360° Solution B BaB=−arccos(Ka)CaB=180°+n∗360°

[0039] 8) If Ia < 0 and Ja = 0 Solution A BaA=arccos(Ka)CaA=180°+n∗360° Solution B BaB=−arccos(Ka)CaB=0°+n∗360°

[0040] 9) If Ia = 0, Ja = 0 and Ka = 1 Only solution A Ba=0°Ca=Cc The case Ia = 0, Ja = 0 and Ka = -1 is not described, as such a case does not occur in this machine design.

[0027] Here, two sets of solutions A and B are determined for cases 1), 2), 3), 4), 5), 6), 7), and 8). A quantity D, represented in equation 21, is calculated for n and each set of solutions, and n and the set that minimizes D are selected. However, for case 9), only one set of solutions is determined, and therefore the solution of equation 20 is selected. D=(Bc−Ba)2+(Cc−Ca)2

[0028] In this way, a tool direction calculated from the command values ​​Bc and Cc is selected that is close to the direction of the tool in the command coordinate system. This is the technical concept of the second method (a technology disclosed in patent specification 4, which relates to a method for selecting a solution that is close to a command).

[0029] Here, a difference between the first method (a technology disclosed in patent specification 3, relating to a method for selecting a solution that is close to a previous solution) and the second method (a technology disclosed in patent specification 4, relating to a method for selecting a solution that is close to an instruction) is described using a specific example.

[0030] It is assumed that a command includes a start point and an end point, as in Fig. Figure 2 illustrates this. The following drawings show only a tool and a tool holder section (TS) of a head. The shapes of the TS and the tool have been slightly modified to be elongated so that the B- and C-axis positions are clearly visible. Furthermore, the example includes a tool length of 500 mm and a position (X, Y, Z) = (0, 0, 0) being machined. Although motion commands for the X, Y, and Z axes are not shown for simplicity, since the second and third methods, which will be described later, are characterized by rotary axis control, motion commands generally include both rotary axis commands and linear axis commands, and error compensation according to Equation 3 is performed with respect to linear axis movement.

[0031] Fig. 3 is a top view of Fig. 2. Here, it is assumed that there is a minor error (β) around the Y-axis with respect to a workpiece installation position, as in Fig. Figure 4 illustrates this. If the error is compensated in such a way that the position and direction of the tool relative to the workpiece are maintained, the tool is expected to move as shown in Figure 4. Fig. Figure 5 shows only the starting and ending points. This means that the error is expected to be compensated for in a top view, as shown in Figure 5. Fig. Figure 6 shows only the starting and ending points. For simplicity, a top view is used below instead of a perspective view.

[0032] However, such a process is not realized in the first method (a technology disclosed in patent specification 3, which relates to a method for selecting a solution that is close to a previous solution), as in Fig. Figure 7 is shown. Here, it is assumed that the tool is already at the starting point of a compensation due to the compensation in a previous block. Furthermore, two solutions **A and **B at each position correspond to solutions A and B in cases 1) to 8), just as an intermediate point 1A and an intermediate point 1B correspond to solutions A and B. Here, ** denotes an intermediate point 1, an intermediate point 2, an intermediate point 3, and an endpoint of the compensation.

[0033] An endpoint of the compensation under (d) in Fig. 7 is located opposite a “desired endpoint of compensation” according to Fig. 6 in an opposite position. This means that the B and C axis positions at the endpoint deviate significantly from the original command positions. This means that during machining where the endpoint is reached, or during subsequent machining, an operational error or material removal error may occur, or the tool may collide with an obstacle.

[0034] Such a problem is solved by the second method (a technology disclosed in patent specification 4, which relates to a method for selecting a solution that is close to an instruction), as in Fig. Figure 8 illustrates this. In this procedure, a case arises in which solution A is closer to a command path than solution B until reaching intermediate point 1, whereas solution B is closer to the command path than solution A after passing intermediate point 3. Of course, the reverse case can also occur.

[0035] Command positions 1, 2 and 3 and the command endpoint according to Fig. 8 are positions during a movement from a given starting point to an endpoint according to the Fig. 2 and Fig. 3 and the position of the endpoint. The positions at which a workpiece installation error is compensated for a command position n and a command endpoint are an intermediate point n and a compensation endpoint. This means that the compensation positions for command positions 1, 2, and 3 and the command endpoint are the intermediate points 1, 2, and 3 and a compensation endpoint.

[0036] An endpoint of the compensation according to (d) in Fig. 8 is a “desired endpoint of compensation” according to Fig. 6. In this way, the problem of the first procedure (a procedure for selecting a solution close to a previous solution) is solved by the second procedure (a procedure for selecting a solution close to an instruction). This means that the second procedure (a procedure for selecting a solution close to an instruction) has the noteworthy effect of making it possible to reach a desired (expected) endpoint of compensation.

[0037] As in Fig. 8 under (c) and in Fig. As shown in Figure 9, however, the occurrence of a large movement (near 180°) on a rotating axis of rotation (the C-axis) is not desirable. This is shown in Figure 9. Fig. 10 is represented by a path on which the B and C axes are used as coordinate axes, where β = -1°.

[0038] For a command that includes a command start point (B = -20° and C = 90°) and a command end point (B = 20° and C = 90°), a trajectory begins at a compensation start point (a compensation start point A), and solution A is selected because solution A is close to the command up to intermediate point 2A. At intermediate point 3, solution B (intermediate point 3B), which is close to the command, is selected, causing the trajectory to move from intermediate point 2A to intermediate point 3B. After moving to intermediate point 3B, solution B is selected, and the trajectory moves towards and finally reaches the compensation end point B.As described above, a large movement (close to 180°) of the rotating axis of rotation (the C-axis) is not desirable, although the second method (a method for selecting a solution that is close to an instruction) has the noteworthy effect that it is possible to reach a desired (expected) endpoint of the compensation.

[0039] The first method (a method for selecting a solution that is close to a previous solution) involves movement in Fig. Figure 11 depicts a path where the B and C axes are similarly used as coordinate axes. Since the path begins at the starting point of the compensation (starting point A of the compensation) and the path of solution A is always close to a previous solution, solution A is selected, and the endpoint A of the compensation is eventually reached. It is evident that in the first method (a method for selecting a solution close to a previous solution), the path reaches the endpoint A of the compensation, which is significantly far from a command endpoint. This means that in the first method, instead of reaching the intended endpoint B of the compensation, the path reaches the endpoint A of the compensation. (Third procedure)

[0040] To prevent a large movement (near 180°) of the rotating axis (the C-axis) as in the second method, a method for switching to a different solution at a time when the movement of the two axes of rotation is minimized is used according to patent specification 5, whereby a solution is selected that is close to a previous solution. This method is referred to as the third method.

[0041] A technical concept of the third method disclosed in patent specification 5 (a method for switching to a different solution at a time when the movement of the two rotation axes is minimized, selecting a solution that is close to a previous solution) is described. In the third method, the path moves linearly from solution A to solution B when solution A is closest to Ps (a singular point on a command path).

[0042] A program instruction is assumed to be a linear interpolation instruction comprising an instruction start point (B = -20°, C = 90°) and an instruction end point (B = 20°, C = 90°). Since a singular point exists at B = 0, the intersection of a line at B = 0 and a line connecting the instruction start point (B = -20°, C = 90°) to the instruction end point (B = 20°, C = 90°) is Ps (a singular point on an instruction path). This means that Ps(Bs, Cs) = (0, 0), where Bs and Cs are the B- and C-axis elements of Ps. Here, the determination of a crossing of a singular point is described.If the sign of a tilting axis command (the B-axis) reverses under two rotation axes between the two command positions of the command start point and the command end point, it is determined that the tilting axis command lies on opposite sides of the singular point between these commands and that the tilting axis command must cross the singular point. Since, for the commands mentioned above, B = -20° at the command start point and B = 20° at the command end point, and the sign of the tilting axis command reverses, it is determined that the B-axis command lies on opposite sides of the singular point between the start point and the end point and that the B-axis command must cross the singular point. Note that the sign of a preceding command is preserved if the B-axis command is 0°.For example, if B = -20° at the instruction start point and B = 0° at the instruction end point, it is not observed that the instruction start point and the instruction end point are on opposite sides via the singular point. However, the above description concerns a case where the singular point is at B = 0°, and, as described above, a machine configuration such as the one in exists. Fig. Figure 1 shows a situation where B = 90°. Furthermore, there are cases where the singular point is neither B = 0° nor B = 90°. For such a five-axis machine tool, it is observed whether the signs of ((command start point) - (singular point)) and ((command end point) - (singular point)) for the tilting axis of rotation (the B-axis) reverse. This means that it is determined that the command for the tilting axis of rotation lies on opposite sides of the singular point, and that the command for the tilting axis of rotation must cross the singular point if the signs of ((command start point) - (singular point)) and ((command end point) - (singular point)) for the tilting axis of rotation (the B-axis) reverse.As described above, with regard to the tilting axis of rotation (the B-axis), in the case of a command to the singular point, it is not observed that the starting point and the endpoint are on opposite sides above the singular point.

[0043] According to Fig. 12. To switch the solution, a linear interpolation from solution A to PaB according to solution B is performed when error compensation is executed on a linear interpolation instruction that includes an instruction start point (B = -20°, C = 90°) and an instruction end point (B = 20°, C = 90°), since the path starts at an initial point of compensation (the initial point A of the compensation) and the distance between Ps and solution A is minimized at PaA. Here, PaA is an initial position for switching the solution, PcA is a point on an instruction path corresponding to PaA, PcB is a point symmetrical about Ps to PcA, and PaB is the position according to solution B due to PcB. Subsequently, solution B is selected, and the path moves to the end point B of the compensation and finally reaches the end point B of the compensation. Although PaA on the path according to solution A in Fig. Since point 12 does not appear to be the point closest to Ps, PaA is the point closest to Ps when the scales of the B and C axes are aligned. As explained above, this example describes a case where solution A is closer to the command path than solution B until the solution is swapped, and solution B is closer to the command path after the swap. Of course, the reverse can also occur.

[0044] Fig. Figure 13 shows specific interpolation data. According to Fig. In step 13, β is set to -1°, and the angle change (Δz) for a linear interpolation instruction, which includes an instruction start point (B = -20°, C = 90°) and an instruction end point (B = 20°, C = 90°), is set to 0.4° for each interpolation interval. Therefore, the instruction is interpolated by Δτ (0.4°) from No. 0 (interpolation data at the instruction start point) to No. 100 (interpolation data at the instruction end point). This corresponds to a speed of 24000° / min when the interpolation interval is 1 ms.

[0045] An interpolation of each line and an error compensation calculation according to Fig. 13 are executed as follows. Bc and Cc are data elements on which an interpolation by Δτ (0.4°) is performed from the instruction start point to the instruction end point with respect to the B and C axes. In this example, only Bc changes. The error compensation calculation is performed for Bc and Cc, which are interpolated for each interpolation time interval. This means that (I, J, K) is calculated using Equation 1. (Ia, Ja, Ka) is calculated from (I, J, K) using Equation 2. Solution A (BaA, CaA) and Solution B (BaB, CaB) are calculated from (Ia, Ja, Ka) using Equations 4 to 20.

[0046] Therefore, solution A (BaA, CaA) is the starting point A of the compensation and solution B (BaB, CaB) is the starting point B of the compensation for No. 0, and solution A (BaA, CaA) is the endpoint A of the compensation and solution B (BaB, CaB) is the endpoint B of the compensation for No. 100. Bc and Cc are determined by an interpolation calculation, and solutions A and B are determined from these results by calculating the error compensation. If an interpolation and an error compensation calculation are performed sequentially starting from No. 1, a change in the distance (L0) between Ps and solution A (BaA, CaA) is checked. The distance (L0) is calculated using equation 22. L0=(Bc−Bs)2+(Cc−Cs)2

[0047] Since checking the change in the distance (L0) between Ps and solution A (BaA, CaA) is equivalent to checking a change in its square, according to Fig. 13 a value L expressed by equation 23 is checked. L=L02=(Bc−Bs)2+(Cc−Cs)2 Although the value L decreases monotonically in the range of No. 1, No. 2, etc., the value L changes from No. 31 and 32 onwards, increasing (see the section with the grey background in Fig. 13) Therefore, it is determined that the value L is smallest at No. 31. If there is a possibility that, due to a calculation error, it is mistakenly determined that the value is changing in such a way that it is increasing, several further temporary interpolations can be performed, and then it can be determined that the decreasing value has changed in such a way that it is increasing. Therefore, (Bc, Cc) at No. 31 is PcA, and solution A is PaA (i.e., a position closest to the singular point and an initial position for switching the solution).

[0048] Here, as shown in equation 24, a weighting such as α and β can be applied to respective terms such as the distance between Ps and solution A (BaA, CaA). L1=α*(Bc−Bs)2+β*(Cc−Cs)2 Alternatively, as shown in equation 25, the sum of the absolute values ​​of Ps and BaA, CaA can be calculated. L1=α*(Bc−Bs)2+β*(Cc−Cs)2

[0049] PcB is a point symmetric about Ps to PcA in the B- and C-axis coordinate system, and PaB is solution B, which is determined by performing an error compensation calculation with respect to PcB. This means that PcB is calculated as according to Equation 26, and the error compensation calculation for No. 69 according to Fig. 13 is executed with respect to PcB in order to determine PaB. L2=|Bc−Bs|+|Cc−Cs|

[0050] A linear interpolation is performed from PaA to PaB. The speed of the linear interpolation for each interpolation interval can be Δτ (0.4°), a rate of change of solution A per interpolation interval from the interpolation interval to No. 31 to the interpolation interval to No. 32 can be used, and a speed set via a separate parameter can be used. In this example, it is assumed that a linear interpolation from PaA to PaB is performed in an initial interpolation interval.

[0051] The number of interpolations and error calculations required to cover PcA to Ps is expressed by Equation 27. In Equation 27, the numerator on the right-hand side is the distance between Ps and PcA on the B- and C-axes. This means that Ni is the number of interpolations and error calculations required to cover the distance from PcA to Ps. Fig. 13 from PcA to Ps. Ni=|PcA−Ps|Δτ

[0052] As mentioned above in connection with Fig. As described in section 2, commands generally include rotary axis commands and linear axis commands, and error compensation according to equation 3 is performed with respect to a movement of the linear axes. Although in Fig. 13 shows only an interpolation and error calculation for the rotation axis, each line generally includes a similar interpolation and error compensation calculation for the linear axis, and the number of interpolations and error calculations required to get from PcA to Ps is Ni.

[0053] Therefore, if the number of interpolations required to get from PaA to PaB is 2 · Ni, it is possible to perform an interpolation and error compensation calculation for the linear axis as usual while simultaneously performing the linear interpolation for the rotation axis from PaA to PaB.

[0054] An interpolation of point PaI to No. (31 + N) (N = 1, 2, ..., 2 · Ni) is calculated using Equation 28 based on PaA to PaB on the B and C axes. PaI(Ba, Ca) corresponds to the B and C axes and has the elements Ba and Ca. PaI=N2*Ni(PaB−PaB)+PaA

[0055] After completion of the linear interpolation from PaA to PaB, an interpolation and error compensation calculation is performed from one of the interpolation time intervals corresponding to PcB to number 70 to number 100 of the instruction endpoint, and solution B is selected. In this way, the compensation endpoint B is reached.

[0056] Fig. 14 shows the Fig. 8 corresponding movement of a rotation axis. A large movement ((c) in Fig. 8) the axis of rotation from intermediate point 2A to intermediate point 3B according to Fig. 8 from (b) to (c) has changed according to Fig. 14 slightly reduced. Since Fig. Figure 8 is a diagram where, for the sake of clarity regarding the aspect of error compensation, it is assumed that the error is significant (β is approximately -15°), it seems as if the difference between Fig. 8 and Fig. 14 is not too large. However, the error is generally a little smaller (|β| is 1° or less and is generally even smaller at 0.1° or less). Although in this case according to Fig. 8. Since a movement of the axis of rotation of almost 180° is unavoidable, the movement of the axis of rotation from (b) to (c) is Fig. 14 very small.

[0057] In the third method, the movement from solution A to solution B can occur along a smooth curve if solution A approaches the singular point on a command path most closely. The program instruction is the same as described above. Therefore, Ps remains the same. However, the transition from PaA to PaB is performed along a curve. Subsequently, solution B is selected, and the path moves to the compensation endpoint B and finally reaches the compensation endpoint B. Here, a curve is generated such that a tangent direction at PaA of the path according to solution A and a tangent direction at PaB of the path according to solution B are uniformly connected.

[0058] Fig. Figure 16 shows specific interpolation data. Fig. 16 essentially agrees Fig. 13 are identical, and the description of the corresponding section is omitted. One difference is that data from PaA to PaB are interpolated along a curve. The following procedure can be used as a curve interpolation method. Solution A, an interpolation time interval before the interpolation time interval to PaA, is defined as PmA. A velocity PaA' at PaA is calculated using equation 29. PaA'=PaA−PmAΔτ

[0059] Equation 30, which is a quadratic function, can be derived from three conditions: that a curve passes through PaA and Ps, that the velocity (a tangent vector) at PaA is PaA', and that the data can be interpolated from PaA to Ps. Here, the quadratic function f(t) (t = 0 → 1) and the coefficients ω, δ, and ε are vectors with elements B and C. f(t)=ω*t2+δ*t+ε

[0060] A function (f1(t)) (t = 1 → 0) expressed by equation 31, which is point-symmetric about Ps with respect to f(t), is calculated and interpolated, allowing similar data from Ps to PaB to be interpolated. f1(t)=−(ω*t2+δ*t+ε−Ps)+Ps

[0061] Alternatively, a cubic curve g(t) expressed by equation 32 can be derived from the four conditions that a curve passes through PaA and PaB, the velocity (a tangential vector) at PaA is PaA' and the velocity (a tangential vector) at PaB is PaB', and is point-symmetric about Ps with respect to PaA', and the data can be interpolated from PaA to PaB. Here, the cubic function g(t) and the coefficients η, λ, µ, and σ are vectors with elements B and C. g(t)=η*t3+λ*t2+μ*t+σ

[0062] Fig. 17 shows the Fig. 8 corresponding movement of a rotation axis. As above in connection with Fig. 14 described, is Fig. Figure 8 is a diagram where, for the sake of clarity regarding the error compensation aspect, it is assumed that the error is large (β is approximately -15°). However, the error is generally somewhat smaller (|β| is 1° or less and is generally even smaller at 0.1° or less). In this case, the movement of the axis of rotation from (b) to (c) is shown according to... Fig. 17 very small and more uniform than according to embodiment 1.

[0063] As described above, in the first method (a method for selecting a solution close to a previous solution), the axis of rotation can deviate significantly from a command position. Therefore, an unexpected problem such as trailing can occur. In the second method (a method for selecting a solution close to a command position), an endpoint of a block is a command position. However, when a singular point is traversed in the second method, a large movement of approximately 180° occurs along the C-axis, and the problem arises that the movement of the axis of rotation is not uniform.In the third method (a method for switching to a different solution at a time when the movement of two rotation axes is minimized, selecting a solution close to a previous solution), an endpoint of a block is a command position, and the movement of the C-axis when passing the singular point is smaller compared to the second method.

[0064] As in Fig. Figure 4 shows that a slight tilt error β about the Y-axis exists with respect to the installation position of a workpiece. If, in this case, the tilt error β is compensated in such a way that the position and direction of the tool with respect to a workpiece are maintained, as shown in the Fig. 5 and Fig. As shown in Figure 6, the tool is tilted by the inclination error β when installing the workpiece around the Y-axis.

[0065] If, during workpiece installation error compensation according to the second or third method, a command extending from a command start point to a command end point intersects a singular point, as in Fig. As shown in Figure 19, a tool direction (a tool direction when passing through a singular point) deviates from a correct tool direction (a tool direction after workpiece installation error compensation) when passing through a singular point (B = 0°) (for example, it increases). If the inclination error during workpiece installation is small, for example, no problem occurs because the deviation angle of the tool direction when passing through a singular point is small.

[0066] However, if the tilt error during workpiece installation is large and the deviation angle of the tool direction increases when passing through a singular point (for example, if the inclination angle increases), this can have negative effects on the machining process. For example, mutual interference between a workpiece and a side face of a tool, or a machining error when machining a side face, can occur. Since the singular point is not passed through during workpiece installation error compensation according to the first method, no deviation of the tool direction occurs. It follows from the above that, during material removal (machining), workpiece installation error compensation according to the first method should preferably be used as often as possible, since workpiece installation error compensation according to the second or third methods can have negative effects on the machining process.

[0067] Therefore, in the present embodiment, a command position is retrieved in advance, and a simulation of the workpiece installation error compensation based on the first method is performed beforehand. The workpiece installation error compensation based on the first method is used as often as possible, provided that the compensated command position is not outside a movement range of the machine tool, whereas the workpiece installation error compensation based on the second or third method is used when the compensated command position is outside the movement range of the machine tool. (First embodiment)

[0068] Fig. Figure 20 is a diagram representing a configuration of a numerical control according to a first embodiment. A diagram in Fig. The numerical control 10 shown in Figure 20 has a workpiece installation error compensation function based on the first method and a workpiece installation error compensation function based on the second method and selectively uses one of them depending on the state of a machine tool.

[0069] The numerical control 10 comprises an instruction analysis unit (a pre-read unit) 11, an interpolation unit 12, a workpiece installation error compensation unit 13, and a memory unit 14. The instruction analysis unit (the pre-read unit) 11 retrieves instructions in advance from a block of a program. The instruction analysis unit 11 stores the pre-retrieved instructions, for example, in a workpiece memory (not shown) or the like. The interpolation unit 12 performs an interpolation process on the instructions pre-retrieved by the instruction analysis unit 11 and generates an instruction position (an instruction value).

[0070] The workpiece installation error compensation unit 13 comprises a tool position and direction calculation unit 131 and an error compensation unit 132. The tool position and direction calculation unit 131 calculates the position and direction of the tool in the command coordinate system based on the command positions (the command values) of the three linear axes and the two rotary axes.The error compensation unit 132, using an error size (an offset error size (δx, δy, δz) and a rotation error size (α, β, γ)) that is preset in the storage unit 14 to correspond to an installation error when installing a workpiece, performs such error compensation with respect to the three linear axes and the two rotational axes that the position and direction calculated by the tool position and direction calculation unit 131 in the command coordinate system of the tool on the workpiece with an installation error are maintained. (During the preview of the program)

[0071] If the pre-retrieved command is a command in a material removal mode (a machining mode), the workpiece installation error compensation unit 13 performs a workpiece installation error compensation process based on the first procedure (a procedure for selecting a solution close to a previous solution) with respect to the command position (the command value) interpolated by the interpolation unit 12, and calculates a compensated command position (a compensated command value) for each axis (i.e., compensated command positions for the X, Y, Z, B (the A), and C axes). The workpiece installation error compensation unit 13 applies the error compensation based on the first procedure if the compensated command position preset in the memory unit 14 is within the range of motion of the machine tool.If, on the other hand, the compensated command position is outside the machine tool's range of motion (i.e., overrun occurs), the workpiece installation error compensation unit 13 sets the error compensation based on the second method (a method for selecting a solution close to a command value). For example, the workpiece installation error compensation unit 13 sets the error compensation based on the first method by setting an OT bit switch with [Nxx to Nxx] = 0 to the corresponding one of the machining modes Nxx to Nxx, and sets the error compensation based on the second method by setting an OT bit switch with [Nxx to Nxx] = 1 to the corresponding one of the machining modes Nxx to Nxx.

[0072] If the pre-fetched command is a command in a positioning mode, the workpiece installation error compensation unit 13 sets the error compensation based on the second method by setting an OT bit switch with [Nxx to Nxx] = 1 to the corresponding of the positioning modes Nxx to Nxx, without performing the workpiece installation error compensation based on the first method. (During program execution)

[0073] If the OT bit switch [Nxx to Nxx] for the removal mode (machining mode) Nxx to Nxx is 0, the workpiece installation error compensation unit 13 performs the workpiece installation error compensation based on the first method. If, on the other hand, the OT bit switch [Nxx to Nxx] for the removal mode (machining mode) Nxx to Nxx is 1, the workpiece installation error compensation unit 13 performs the workpiece installation error compensation based on the second method.

[0074] Memory unit 14 stores the predefined error magnitude (an offset error magnitude (δx, δy, δz) and a rotation error magnitude (α, β, γ)). Furthermore, memory unit 14 stores the predefined range of motion of the machine tool. Memory unit 14 is, for example, a rewritable memory such as an EEPROM.

[0075] The numerical controller 10 (and a numerical controller 10A to be described later) is designed as an arithmetic processor, such as a digital signal processor (DSP) or a field-programmable gate array (FPGA). Various functions of the numerical controller 10 (and the numerical controller 10A to be described later) are implemented by executing predefined software (programs) stored, for example, in a memory unit. These functions can be implemented through a combination of hardware and software or solely through hardware (electronic circuits).

[0076] Next, a program anticipation process performed by the numerical control 10 according to the first embodiment and a workpiece installation error compensation process during program execution are described. Fig. Figure 21 is a flowchart of a program anticipation process executed by the numerical control 10 according to the first embodiment, and Fig. Figure 22 is a flowchart of a workpiece installation error compensation process performed by the numerical control 10 according to the first embodiment during the execution of the program. Fig. Figure 23 is a diagram that represents an example of a program.

[0077] First, with reference to Fig. 21 describes a program anticipation process performed by the numerical control 10 according to the first embodiment. First, the instruction analysis unit (a read-ahead unit) 11 retrieves instructions in units from a block of a program and stores the instructions, for example, in a workpiece memory (S11). Subsequently, the interpolation unit 12 performs an interpolation process on the retrieved instructions and generates an instruction position (an instruction value) (S11).

[0078] The workpiece installation error compensation unit 13 then determines, for each of the removal modes (machining modes) or positioning modes (S12), whether the pre-fed command is a command in a removal mode (a machining mode). If the pre-fed command is a command in a removal mode, the workpiece installation error compensation unit 13 performs workpiece installation error compensation based on the first procedure (a procedure for selecting a solution close to a previous solution) for each of several blocks of the removal mode and calculates the compensated command position (a compensated command value) for each axis (S13).

[0079] The workpiece installation error compensation unit 13 then determines whether the compensated command position lies within the range of motion of the machine tool (S14). If all compensated command positions in the multiple blocks of the removal mode (machining mode) lie within the range of motion of the machine tool, the workpiece installation error compensation based on the first method is set to the removal mode (S15). For example, the workpiece installation error compensation unit 13 sets the error compensation based on the first method by setting an OT bit switch with [Nxx to Nxx] = 0 to the removal mode (machining mode) Nxx to Nxx. On the other hand, if at least one of the compensated command positions of the multiple blocks of the removal mode (machining mode) lies outside the range of motion of the machine tool (i.e.,(a run-on occurs), the workpiece installation error compensation unit 13 sets the workpiece installation error compensation for the machining mode based on the second method (a method for selecting a solution close to an instruction value) (S16). The workpiece installation error compensation unit 13 sets the error compensation based on the second method, for example, by setting an OT bit switch with [Nxx to Nxx] = 1 to the corresponding machining modes Nxx to Nxx. (According to . Fig. 23 for example N101 to N199 and N201 to N299).

[0080] If, on the other hand, the pre-fetched command in step S12 is a command in the positioning mode, the workpiece installation error compensation unit 13 sets the error compensation based on the second method by setting an OT bit switch with [Nxx to Nxx] = 1 to the corresponding positioning modes Nxx to Nxx (S16). (According to Fig. 23 for example N2, N200 and N300).

[0081] Next, with reference to Fig. 22 describes a workpiece installation error compensation process performed by the numerical control 10 according to the first embodiment during program execution. First, the workpiece installation error compensation unit 13 determines whether the workpiece installation error compensation based on the first method is set for each of the machining modes (the machining modes) or positioning modes (for example, whether the OT bit switch with [Nxx to Nxx] is 0) (S21). If the OT bit switch with [Nxx to Nxx] is 0 (i.e., if the workpiece installation error compensation based on the first method is set), the workpiece installation error compensation unit 13 performs the workpiece installation error compensation based on the first method (a method for selecting a solution close to a previous solution) for each machining mode (S22).

[0082] On the other hand, if the OT bit switch is set to [Nxx to Nxx] 1 (i.e., if the workpiece installation error compensation based on the second method is set), the workpiece installation error compensation unit 13 performs the workpiece installation error compensation based on the second method (a method for selecting a solution close to an instruction value) for each of the removal modes or positioning modes (S23).

[0083] As described above, in the numerical control 10 according to the first embodiment, a command position is retrieved in advance, and during a machining mode, a simulation of the workpiece installation error compensation based on the first method is performed in advance. The workpiece installation error compensation based on the first method (a method for selecting a solution close to a previous solution) is set if a compensated command position lies within a range of motion of a machine tool, whereas the workpiece installation error compensation based on the second method (a method for selecting a solution close to a command value) is set only if the compensated command position lies outside the range of motion of the machine tool (i.e., overrun occurs).In this way, the second process-dependent workpiece installation error compensation makes it possible to prevent a deviation of a tool direction from a tool direction after the workpiece installation error compensation when a command extending from a command start point to a command end point crosses a singular point. Therefore, it is possible to eliminate adverse effects on machining resulting from a deviation (for example, an increase) of the tool direction from a correct direction (a tool direction after workpiece installation error compensation) when crossing a singular point.

[0084] The workpiece installation error compensation procedure is set for each machining mode. This ensures that the workpiece installation error compensation procedure does not change during a machining mode, thus preventing adverse effects on the machining process.

[0085] Since there is no problem of adverse effects on machining during positioning mode, the error compensation based on the second method can be set without performing the workpiece installation error compensation based on the first method. (Second embodiment)

[0086] Fig. Figure 24 is a diagram illustrating a configuration of a numerical control according to a second embodiment. A diagram in Fig. The numerical control 10A shown in Figure 24 comprises a workpiece installation error compensation function based on the first method and a function based on the third method. Workpiece installation error compensation function and selectively uses one of these according to the state of a machine tool.

[0087] The in Fig. The numerical control 10A shown in Figure 24 differs from that of the first embodiment in that the numerical control 10A, instead of the one shown in Figure 24, uses a numerical control 10A. Fig. The workpiece installation error compensation unit 13 of the numerical control 10 shown in Figure 20 comprises a workpiece installation error compensation unit 13A. The numerical control 10A comprises a unit 15 for determining the traverse of a singular point, a unit 16 for creating a path for traversing a singular point, a unit 17 for determining an initial position for a solution change, and a solution conversion unit 18. (In anticipation of the program)

[0088] The workpiece installation error compensation unit 13A differs from the one in Fig. Figure 20 shows that the workpiece installation error compensation unit 13A, instead of the second method, sets the error compensation based on the third method (a method for switching to a different solution at a time when the movement of the two rotary axes is minimized, selecting a solution close to a previous solution) when a compensated command position is outside a range of motion of a machine tool (i.e., overrun occurs). The workpiece installation error compensation unit 13A sets the error compensation based on the third method, for example, by setting an OT bit switch with [Nxx to Nxx] = 1 to the corresponding machining modes Nxx to Nxx.

[0089] The workpiece installation error compensation unit 13A differs from the one in Fig. 20 shown workpiece installation error compensation unit 13, that the workpiece installation error compensation unit 13A sets the error compensation based on the third method instead of the second method by setting an OT bit switch with [Nxx to Nxx] = 1 to the corresponding positioning mode Nxx to Nxx, without performing the workpiece installation error compensation based on the first method, if the pre-fetched command is a command in a positioning mode. (When running the program)

[0090] The workpiece installation error compensation unit 13A differs from the one in Fig. 20 shown workpiece installation error compensation unit 13, that the workpiece installation error compensation unit 13A performs the workpiece installation error compensation based on the third method instead of the second method when the OT bit switch [Nxx to Nxx] for the removal mode (the machining mode) or the positioning mode is Nxx to Nxx 1.

[0091] If, in each block instruction of a program instruction, the instruction for the tilting axis of rotation lies on opposite sides of the singular point between the two instruction positions of the instruction start point and the instruction end point, the unit 15 for determining the crossing of a singular point determines that the instruction for the tilting axis of rotation must cross the singular point and notifies the unit 16 for creating a path to cross a singular point, the unit 17 for determining a starting position for a solution change, and the solution conversion unit 18 of the result of the determination by means of a bit switch set to 1 (of the F_Ps to be described later).Unit 17, for determining an initial position for a solution change, determines an initial position for switching the solution, and Unit 16, for creating a path to traverse a singular point, creates a path along which the tilting axis of rotation traverses the singular point and outputs the path to the workpiece installation error compensation unit 13. The solution conversion unit 18 performs an interpolation of a path created by Unit 16 for creating a path to traverse a singular point, with a solution change from solution A to solution B or from solution B to solution A.

[0092] In other words, unit 15 for determining the crossing of a singular point determines that the tilting axis command is located over the singular point between the two command positions on opposite sides, and that the tilting axis command must cross the singular point when the signs of the tilting axis command reverse between the two command positions of the command start point and the command end point of the five-axis machine tool, where the position of 0° of the tilting axis is the singular point.Alternatively, for determining the crossing of a singular point, unit 15 specifies that the tilting axis command is located over the singular point between the two command positions on opposite sides, and that the tilting axis command must cross the singular point when the signs of ((command start point) - (singular point)) and ((command end point) - (singular point)) for the tilting axis command reverse between the two command positions of the five-axis machine tool, where a position other than the tilting axis position of 0° is the singular point.If Unit 15 for determining the traverse of a singular point determines that it is necessary to traverse the singular point, Unit 16 for creating a path for traversing a singular point, as a path for traversing the singular point along which the tilting axis of rotation traverses the singular point between the two command positions, creates a path determined as a result of the compensation performed by Error Compensation Unit 132. Unit 16 for creating a path for traversing a singular point comprises Unit 17 for determining an initial position for a solution change, which determines a position at which the currently selected solution is switched to another solution, and Solution Change Unit 18 for switching to another solution in a coordinate system of the two axes of rotation.Unit 17, for determining an initial position for a solution change, specifies that the position closest to the singular point, where the selected solution most closely approaches the singular point on the command path, is an initial position for switching the solution. The position closest to the singular point is a position where the distance between the position of the singular point and the positions of the two rotation axes in the coordinate system of the two rotation axes is smallest. Alternatively, the position closest to the singular point is a position where the sum obtained by adding the absolute values ​​of the position of the singular point and the positions of the two rotation axes in the coordinate system of the two rotation axes is smallest.Solution conversion unit 18 achieves the conversion of solutions by creating a path on which the command position is symmetrical about the singular point on the command path in the coordinate system of the two rotation axes to the command position of the initial position for switching the solution, and the conversion to the other solution is linear. Solution conversion unit 18 achieves the conversion of solutions by creating a path on which the command position is symmetrical about the singular point on the command path in the coordinate system of the two rotation axes to the command position of the initial position for switching the solution, and the conversion to the other solution is along a curve.

[0093] Next, a program anticipation process performed by the numerical control 10A according to the second embodiment and a workpiece installation error compensation process during program execution are described. Fig. Figure 25 is a flowchart of a program anticipation process executed by the numerical control 10A according to the second embodiment, and Fig. Figure 26 is a flowchart of a workpiece installation error compensation process performed by the numerical control 10A according to the second embodiment when executing the program. Fig. Figure 27 is a diagram that represents an example of a program.

[0094] First, with reference to Fig. 25 describes a program anticipation process executed by the numerical control 10A according to the second embodiment. The workflows in steps S11 to S15 according to Fig. 25 correspond to the workflows in steps S11 to S15 according to Fig. 21 agree.

[0095] If, in step S15, at least one of the compensated command positions of the multiple blocks in the removal mode (the machining mode) lies outside the range of motion of the machine tool (i.e., overrun occurs), the workpiece installation error compensation unit 13A sets the workpiece installation error compensation based on the third method (a method for switching to a different solution at a time when the motion of the two rotary axes is minimized, selecting a solution close to a previous solution) to the removal mode (S36). The workpiece installation error compensation unit 13A sets the error compensation based on the third method, for example, by setting an OT bit switch with [Nxx to Nxx] = 1 to the corresponding removal modes (machining modes) Nxx to Nxx. (According to Fig. 27 for example N101 to N199 and N201 to N299).

[0096] If the pre-fetched command in step S12 is a command in the positioning mode, the workpiece installation error compensation unit 13A sets the error compensation based on the third method by setting an OT bit switch with [Nxx to Nxx] = 1 to the corresponding positioning modes Nxx to Nxx (S36). (According to Fig. 27 for example N2, N200 and N300).

[0097] Next, with reference to Fig. 26 describes a workpiece installation error compensation process performed by the numerical control 10A according to the second embodiment during program execution. The work processes in steps S21 and S22 according to Fig. 26 agree with the workflows in steps S21 and S22 according to Fig.22 agree. If the OT bit switch [Nxx to Nxx] is 1 in step S21 (this means that the workpiece installation error compensation based on the third method is set), the workpiece installation error compensation unit 13A performs the workpiece installation error compensation based on the third method (a method to switch to a different solution at a time when the movement of the two rotary axes is minimized, selecting a solution close to a previous solution) for each of the removal modes and positioning modes (S43).

[0098] In the numerical control 10A according to the second embodiment, a command position is retrieved in advance, and during a machining mode, a simulation of the workpiece installation error compensation based on the first method is performed in advance. The workpiece installation error compensation based on the first method (a method for selecting a solution close to a previous solution) is set if a compensated command position lies within a range of motion of a machine tool, whereas the workpiece installation error compensation based on the third method (a method for switching to a different solution at a time when the movement of the two rotary axes is minimized, selecting a solution close to a previous solution) is set only if the compensated command position lies outside the range of motion of the machine tool (i.e.,(a follow-up occurs). In this way, with the workpiece installation error compensation based on the third method, it is possible to prevent a deviation of a tool direction from a tool direction after workpiece installation error compensation when a command extending from a command start point to a command end point crosses a singular point. Therefore, it is possible to avert adverse effects on machining resulting from a deviation (e.g., an increase) of a tool direction from a correct direction (a tool direction after workpiece installation error compensation) when crossing a singular point.

[0099] Although embodiments of the present invention have been described, the present invention is not limited to the embodiments described above, and various modifications and alterations can be made. EXPLANATION OF THE REFERENCE SYMBOLS 10, 10A Numerical control 11 Command analysis unit (pre-read unit) 12 Interpolation Unit 13, 13A Workpiece installation error compensation unit 14 storage units 15 Unit for determining the crossing of a singular point 16 Unit for creating a path to cross a singular point 17 Unit for determining an initial position for a solution change 18 Solution Transformation Unit 131 Tool position and direction calculation unit 132 Error compensation unit

Claims

[1] Numerical control (10, 10A) which controls a five-axis machine tool which processes a workpiece mounted on a table using three linear axes and two rotary axes, wherein the numerical control (10, 10A) comprises: a workpiece installation error compensation unit (13, 13A) that compensates for an installation error during the installation of the workpiece, wherein the workpiece installation error compensation unit (13, 13A) comprises: a tool position and direction calculation unit (131) that calculates a position and direction in a command coordinate system of a tool based on command values ​​for the three linear axes and the two rotational axes; and An error compensation unit (132), which, using an error size preset to correspond to the installation error during workpiece installation, performs such error compensation with respect to the three linear axes and the two rotary axes that the position and direction calculated by the tool position and direction calculation unit (131) in the command coordinate system of the tool on the workpiece with the installation error are maintained, wherein the error compensation unit (132) selects the positions of the two rotary axes to be compensated, if multiple solutions of a trigonometric calculation exist, according to a first procedure for selecting a solution close to a previous solution, or either a second procedure for selecting a solution close to the command value in the command coordinate system.or a third method for switching to a different solution at a time when a movement of the two rotation axes is minimized while selecting a solution that is close to a previous solution, wherein the numerical control (10, 10A) drives each axis according to the coordinate values ​​of the three linear axes and the two rotary axes calculated by the workpiece installation error compensation unit (13, 13A), wherein the numerical control (10, 10A) further comprises: a read-ahead unit (11) that anticipates in a program, wherein The workpiece installation error compensation unit (13, 13A) performs error compensation according to the first method on the previously retrieved instruction value to determine a compensated command value, and The workpiece installation error compensation unit (13, 13A) sets the error compensation based on the first method when the compensated command value is within a range of motion of the five-axis machine tool, and sets either the error compensation based on the second method or the error compensation based on the third method when the compensated command value is outside the range of motion of the five-axis machine tool. [2] Numerical control (10, 10A) according to claim 1, wherein, if the pre-fed command is a command in an editing mode, the workpiece installation error compensation unit (13, 13A) sets the error compensation for the machining mode based on the first method when all compensated command values ​​in several blocks of the machining mode lie within the range of motion of the five-axis machine tool, and The workpiece installation error compensation unit (13, 13A) sets either the error compensation based on the second method or the error compensation based on the third method for the machining mode if at least one of the compensated command values ​​in the multiple blocks of the machining mode is outside the range of motion of the five-axis machine tool. [3] Numerical control (10, 10A) according to claim 1 or 2, wherein the workpiece installation error compensation unit (13, 13A) sets either the error compensation based on the second method or the error compensation based on the third method when the pre-fed command is a command in a positioning mode.

Citation Information

Patent Citations

  • numerical control for a multi-axis machine

    DE102011102810B4

  • Controlling method for robot

    JP1988132307A

  • Correcting method for installation error of workpiece and its correcting device

    JP1995299697A

  • Numerical control device

    JP2003195917A

  • Numerical controller having workpiece setting error correction means

    JP4291386B2