Abstract:
In a numerical controller having a tool tip point control function, a provisional tool tip point movement path calculation unit calculates a fourth movement path of a tip point of a tool on the basis of a third movement path obtained by linearly interpolating a second movement path for moving a control point of the tool along the second movement path, and a post-linear interpolation movement instruction output unit outputs a third movement instruction if it is determined that the difference between a first movement path for moving the tip point of the tool along the first movement path and the fourth movement path is within a predetermined tolerance.

Description:
BACKGROUND OF THE INVENTION 
       [0001]    1. Field of the Invention 
         [0002]    The present invention relates to a numerical controller, and particularly relates to a numerical controller capable of suppressing a backlash that occurs during tool tip point control. 
         [0003]    2. Description of the Related Art 
         [0004]    Tool tip point control is control that drives a control point of a tool so that a tip point of the tool moves on an instructed movement path at a +n instructed speed even under an instruction that causes the posture of the tool to change from moment to moment in five-axis machining in which movement of linear axes and movement of rotational axes are simultaneously instructed. 
         [0005]    Regarding such tool tip point control, Japanese Patent Laid-Open No. 2003-195917 discloses a numerical controller for controlling a five-axis machine tool, the numerical controller being capable of linearly driving a table along an X-axis and a Y-axis while rotating the table about a C-axis, which is a rotation axis about a Z-axis perpendicular to the X-axis and the Y-axis, and linearly driving a tool along the Z-axis while rotating the tool about an A-axis, which is a rotation axis about the X-axis. 
         [0006]    In the tool tip point control of the numerical controller disclosed in Japanese Patent Laid-Open No. 2003-195917, an instruction for moving a tool tip point is converted to an instruction for moving a tool control point once, and, in the middle of the path, the tool control point is driven so that the tool tip point moves on an instructed movement path. For example, as shown in  FIG. 12 , when an instruction for moving the tool tip point is given in tool tip point control mode, the posture of a tool changes moment to moment but the tool tip point is controlled so as to move on an instructed straight line. In this case, the path of the control point is responsive to the change of the posture of the tool and thus forms a curved line as shown in  FIG. 12 . 
         [0007]    As described above, during tool tip point control, a path of a control point generally forms a curved line. This causes a problem in that the path of the control point easily reverts (makes a backlash) in the middle of a block during tool tip point control. For example, under the instruction illustrated in  FIG. 13A , the control point path appears to form a straight line. Actually, however, the control point path slightly reverts in a Y-axis direction in each instruction block. Specifically, as shown, the control point path reverts in the Y-axis direction at a point A, which is in the middle of a block, and also at a point B, which is a joint portion between blocks. 
         [0008]    Accordingly, during tool tip point control, the path easily reverts, invoking a compensation function such as backlash correction and backlash acceleration. Such compensation function, however, tends to be overly effective, causing a problem of adversely affecting a machined surface quality. 
       SUMMARY OF THE INVENTION 
       [0009]    It is thus an object of the present invention to provide a numerical controller capable of suppressing a backlash that occurs during tool tip point control. 
         [0010]    A numerical controller having a tool tip point control function according to one aspect of the present invention generates, in a multi-axis machine tool having three linear axes and two rotation axes, a first movement instruction for moving a tip point of a tool along a first movement path and generates, on the basis of the first movement instruction, a second movement instruction for moving a control point of the tool along a second movement path. The numerical controller having the tool tip point control function includes a control point interpolation unit for outputting a third movement instruction for moving the control point of the tool along a third movement path obtained by linearly interpolating the second movement path. The control point interpolation unit includes a provisional tool tip point movement path calculation unit for calculating, on the basis of the third movement path, a fourth movement path of the tip point of the tool, a determination unit for determining whether the distance between the first movement path and the fourth movement path is within a predetermined tolerance, and a post-linear interpolation movement instruction output unit for outputting the third movement instruction if the determination unit determines that the distance is within the predetermined tolerance. 
         [0011]    A numerical controller having a tool tip point control function according to another aspect of the present invention generates, in a multi-axis machine tool having three linear axes and two rotation axes, a first movement instruction for moving a tip point of a tool along a first movement path and generates, on the basis of the first movement instruction, a second movement instruction for moving a control point of the tool along a second movement path. The numerical controller having the tool tip point control function includes a control point interpolation unit for outputting a third movement instruction for moving the control point of the tool along a third movement path obtained by linearly interpolating the second movement path. The control point interpolation unit includes a determination unit for determining whether the distance between the second movement path and the third movement path is within a predetermined tolerance, and a post-linear interpolation movement instruction output unit for outputting the third movement instruction if the determination unit determines that the distance is within the predetermined tolerance. 
         [0012]    A numerical controller having a tool tip point control function according to yet another aspect of the present invention generates, in a multi-axis machine tool having three linear axes and two rotation axes, a first movement instruction for moving a tip point of a tool along a first movement path and generates, on the basis of the first movement instruction, a second movement instruction for moving a control point of the tool along a second movement path. The numerical controller having the tool tip point control function includes a control point interpolation unit for outputting a third movement instruction for moving the control point of the tool along a third movement path obtained by linearly interpolating the second movement path. The control point interpolation unit includes a second movement instruction interpolation count determination unit for determining whether the movement of the control point of the tool on the basis of the second movement instruction is completed within a predetermined number of interpolation cycles, a post-linear interpolation movement instruction output unit for outputting the third movement instruction if the second movement instruction interpolation count determination unit determines that the movement of the control point of the tool on the basis of the second movement instruction is completed within the predetermined number of interpolation cycles, a first movement instruction interpolation count determination unit for determining whether the movement of the tip point of the tool on the basis of the first movement instruction is completed within a predetermined number of interpolation cycles, and a post-linear interpolation movement instruction output unit for outputting the third movement instruction if the first movement instruction interpolation count determination unit determines that the movement of the tip point of the tool on the basis of the first movement instruction is completed within the predetermined number of interpolation cycles. 
         [0013]    Because the numerical controller in accordance with the present invention is configured as described above, the path of a tool tip point generally deviates from an instructed path. The deviation of the tool tip point due to the linear interpolation of a control point path, however, is within an allowable range, and a reversal of the control point becomes harder to occur in comparison with a conventional tool tip point control. As a result, an invocation of a compensation function for backlash can be minimized, which improves a machined surface quality. 
         [0014]    The above-described and other objects of the present invention will become apparent by reading the following description of embodiments with reference to the accompanying drawings. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0015]      FIG. 1  is a block diagram illustrating main parts of a numerical controller in some embodiments of the present invention; 
           [0016]      FIG. 2  is a schematic functional block diagram of a numerical controller in some embodiments of the present invention; 
           [0017]      FIG. 3  is a diagram schematically illustrating a process of linearly interpolating a movement path of a control point in embodiment 1 of the present invention; 
           [0018]      FIG. 4  is a diagram illustrating a positional relationship between a tool tip point and a control point in embodiment 1 of the present invention; 
           [0019]      FIG. 5  is a diagram illustrating steps of calculating a distance between paths in embodiment 1 of the present invention; 
           [0020]      FIG. 6  is a flow chart of a control point interpolation process in embodiment 1 of the present invention; 
           [0021]      FIG. 7  is a diagram schematically illustrating a process of linearly interpolating a movement path of a control point in embodiment 2 of the present invention; 
           [0022]      FIG. 8  is a diagram illustrating steps of calculating a distance between paths in embodiment 2 of the present invention; 
           [0023]      FIG. 9  is a flow chart of a control point interpolation process in embodiment 2 of the present invention; 
           [0024]      FIG. 10  is a diagram schematically illustrating a process of linearly interpolating a movement path of a control point in embodiment 3 of the present invention; 
           [0025]      FIG. 11  is a flow chart of a control point interpolation process in embodiment 3 of the present invention; 
           [0026]      FIG. 12  is a diagram illustrating tool tip point control in a conventional art; 
           [0027]      FIG. 13A  is a diagram illustrating a problem with tool tip point control in a conventional art; and 
           [0028]      FIG. 13B  is a diagram illustrating a control point path enlarged in the Y-direction only. 
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0029]      FIG. 1  is a block diagram illustrating main parts of a numerical controller (CNC)  100  that embodies tool tip point control in some embodiments of the present invention. A CPU  11  is a processor that totally controls the numerical controller  100 . The CPU  11  reads, via a bus  20 , a system program stored in a ROM  12 . The CPU  11  then controls the whole numerical controller in accordance with the system program. A RAM  13  stores temporal calculation data, display data, and various types of data entered by an operator via an indicator/MDI unit  70 . 
         [0030]    A CMOS  14  is backed up with a battery, which is not shown, and is configured as a non-volatile memory that maintains a state of memory even when the numerical controller  100  is powered off. The CMOS memory  14  stores a machining program, such as the one described below, that is read via an interface  15  and a machining program that is entered via the indicator/MDI unit  70 , for example. Various system programs for executing a processing in an edit mode needed for creating and editing a machining program and a processing for automatic operation are preliminarily written in the ROM  12 . Various machining programs such as a machining program for embodying the present invention can be entered via the interface  15  or the indicator/MDI unit  70  and stored in the CMOS memory  14 . 
         [0031]    The interface  15  is an interface for connecting an external device  72 , such as an adapter, to the numerical controller  100 . A machining program and various parameters, for example, are read from the external device  72 . Also, a machining program edited in the numerical controller  100  can be stored in an external storage unit via the external device  72 . A programmable machine controller (PMC)  16  controls an auxiliary device (e.g., an actuator such as a robot hand for replacing a tool) of a machine tool by outputting a signal to the auxiliary device via an I/O unit  17  in accordance with a sequence program embedded in the numerical controller  100 . Also, the PMC  16  receives a signal from various switches of an operation panel provided on the body of the machine tool, for example, processes the signal as needed, and passes the signal to the CPU  11 . 
         [0032]    The indicator/MDI unit  70  is a manual data entry device having a display, a keyboard, and the like. An interface  18  receives an instruction and data entered from the keyboard of the indicator/MDI unit  70  and passes them to the CPU  11 . An interface  19  is connected to an operation panel  71  having a manual pulse generator and the like. 
         [0033]    Axis control circuits  30  to  34  of respective axes receive an amount of movement of each axis instructed from the CPU  11  and output an instruction for each axis to servo amplifiers  40  to  44 . On receiving the instruction, the servo amplifiers  40  to  44  drive servo motors  50  to  54  of respective axes. The servo motors  50  to  54  of respective axes include a position/speed detector and perform a feedback control by feeding a position/speed feedback signal from the position/speed detector back to the axis control circuits  30  to  34 . The feedback of position/speed is omitted in the block diagram. 
         [0034]    A spindle control circuit  60  receives a spindle rotation instruction for the machine tool and outputs a spindle speed signal to a spindle amplifier  61 . On receiving the spindle speed signal, the spindle amplifier  61  rotates a spindle motor  62  of the machine tool at an instructed rotating speed to drive a tool. 
         [0035]    A position coder  63  is connected to the spindle motor  62  via gear wheels or a belt, for example. The position coder  63  is synchronized with the rotation of the spindle and outputs a feedback pulse, which is then read by the processor  11 . 
         [0036]      FIG. 2  is a schematic functional block diagram of a numerical controller in some embodiments of the present invention. 
         [0037]    A block of an NC program, which is a machining program, is analyzed in an instruction program analysis unit  110 , and a predetermined control point interpolation process is performed in a control point interpolation unit  120 . With respect to a machine coordinates position on a linear axis and a rotational position on a rotation axis that are obtained by the predetermined control point interpolation process, an interpolation process is performed by an interpolation unit  130  for obtaining a position on each axis for each interpolation cycle so that the control point moves on a movement path at an instructed relative speed. On the basis of the interpolated data, a movement instruction is output to the servo amplifiers  40  to  44  of respective axes to control each axis. 
         [0038]    A control point interpolation process performed by the control point interpolation unit  120  will now be described in detail by using embodiments 1 to 3. 
       Embodiment 1 
       [0039]    The present embodiment exhibits an example of suppressing a backlash by linearly interpolating a control point path of a control point instruction converted form a tool tip point instruction in tool tip point control mode. Here, a linear interpolation unit interpolation that configures a predetermined path as a linear path. 
         [0040]    Generally, in tool tip point control mode, a tool tip point instruction is converted to a control point instruction once, and a control is done so that a tool tip point is linearly interpolated. In the present embodiment, on the other hand, a control point path is linearly interpolated even in the tool tip point control mode if a tool tip point path calculated when the control point path is provisionally linearly interpolated in the tool tip point control mode is within an acceptable amount (hereinafter referred to as tolerance) that is set with respect to an originally instructed path. 
         [0041]      FIG. 3  is a diagram schematically illustrating the process of linearly interpolating a movement path of a control point in a technique of the present embodiment by way of the movement of a tool tip point and the control point. 
         [0042]    In  FIG. 3 , &lt; 1 &gt;indicates the movement of a control point when a movement path of the control point is provisionally linearly interpolated. As shown, if the control point path is provisionally linearly interpolated, the tool tip point moves on a provisional tool tip point path indicated with &lt; 2 &gt;so as to draw an arc. In the present embodiment, it is determined whether a distance between the provisional tool tip point path calculated when the control point path is provisionally linearly interpolated and a tool tip point path &lt; 3 &gt;that is supposed to be drawn in the tool tip point control is within a tolerance. 
         [0043]    Here, suppose that, as shown in  FIG. 4 , the coordinates of a control point M in a machine coordinate system EM is (X M , Y M , Z M ), the coordinates of a tool tip point T in the machine coordinate system ΣM is (X T , Y T , Z T ), the inclination of a tool about an A-axis is A P , and a tool length correction amount is H, for example. The tool tip point path can then be calculated from the control point path by using an expression (1). 
         [0044]    The control point path can also be inversely calculated from the tool tip point path on the basis of the expression (1). 
         [0000]    
       
      
       X 
       T 
       =X 
       M  
      
     
         [0000]        Y   T   =Y   M   −H  cos( A   M ) 
         [0000]        Z   T   =Z   M   −H  sin( A   M )   (1)
 
         [0045]      FIG. 5  is an enlarged diagram illustrating the portion of the tool tip point path shown in  FIG. 3 . Suppose a unit vector in the direction of the tool tip point path &lt; 3 &gt; is a vector v and a start point of the tool tip point path &lt; 3 &gt; is a vector p, as shown in  FIG. 5 . A point on the tool tip point path &lt; 3 &gt;can then be represented as a vector p with the following expression: 
         [0000]        {right arrow over (p)}=   {right arrow over (p)}   s   +l{right arrow over (v)}   (2)
 
         [0000]    wherein 0≦1≦block length of path &lt; 3 &gt; 
         [0046]    Suppose a point on the provisional tool tip point path &lt; 2 &gt; is a vector q. A distance d between the point q and the tool tip point path &lt; 3 &gt; can then be calculated by the following expression: 
         [0000]      {right arrow over (Δ)}= {right arrow over (q)}−{right arrow over (p)}   s  
 
         [0000]        d =|{right arrow over (Δ)}−({right arrow over (Δ)}·{right arrow over (v)}){right arrow over (v)}|  (3)
 
         [0047]    The control point interpolation unit  120  determines whether the distance between the provisional tool tip point path &lt; 2 &gt; and the tool tip point path &lt; 3 &gt; is within a tolerance by identifying a point q i  on the provisional tool tip point path &lt; 2 &gt; at interpolation cycle intervals, calculating the distance d from the tool tip point path &lt; 3 &gt;for each point q i  by the expression (3), and determining whether the distance d is equal to or less than a tolerance at all the points q i . 
         [0048]      FIG. 6  is a flow chart illustrating the algorithm of a process of linearly interpolating a movement path of a control point in a technique of the present embodiment. 
         [0049]    When the process starts, a movement instruction for a tool tip point is initially converted to a movement instruction for a control point (S 601 ). Next, using the control point instruction converted in  5601 , a provisional tool tip point path is calculated on the basis of a provisional linear interpolation of a movement path of the control point (S 602 ). The point q i  for each interpolation interval on the provisional tool tip point path calculated on the basis of the provisional linear interpolation of the movement path of the control point is then obtained (S 603 ). 
         [0050]    For each point q i , the distance d i  from an originally instructed tool tip point path is calculated, and whether all of the distances d i  are within a tolerance is determined (S 604 ). 
         [0051]    If it is determined in S 604  that all of the distances d i  are within a tolerance, then a movement instruction on the basis of a linear interpolation of the control point is adopted (S 605 ). If there is any point q i  whose distance d i  is not within a tolerance, then a movement instruction on the basis of a linear interpolation of the tool tip point is adopted (S 606 ). 
         [0052]    By executing such processing, the path of the tool tip point generally deviates from an instructed path. The deviation of the tool tip point due to the linear interpolation of the control point path, however, is within a tolerance, and a reversal of the control point becomes harder to occur in comparison with a conventional tool tip point control, resulting in an improvement in a machined surface quality. 
       Embodiment 2  
       [0053]    In embodiment 1, a backlash is suppressed by linearly interpolating the control point path if the provisional tool tip point path calculated when the control point path is provisionally linearly interpolated in the tool tip point control mode is within a tolerance that is set with respect to an originally instructed tool tip point path. In embodiment 2, on the other hand, a control point path is linearly interpolated even in tool tip point control mode if the control point path calculated when a tool tip point path is linearly interpolated in the tool tip point control mode is within a tolerance that is set with respect to a path obtained by provisionally linearly interpolating the control point path. 
         [0054]      FIG. 7  is a diagram schematically illustrating the process of linearly interpolating a movement path of a control point in a technique of the present embodiment by way of the movement of a tool tip point and the control point. 
         [0055]    In  FIG. 7 , &lt; 1 &gt; indicates the movement of the tool tip point that is linearly interpolated in tool tip point control. As shown, if the tool tip point path is linearly interpolated, the control point moves on a control point path indicated with &lt; 2 &gt; so as to draw an arc. In the present embodiment, it is determined whether a distance between the control point path calculated when the tool tip point path is linearly interpolated and a provisional control point path &lt; 3 &gt; obtained by provisionally linearly interpolating the control point path is within a tolerance. 
         [0056]    A technique of calculating the tool tip point path from the control point path and a technique of calculating the control point path from the tool tip point path are the same as those of embodiment 1, and the description of these techniques is thus omitted. 
         [0057]      FIG. 8  is an enlarged diagram illustrating the portion of the control point path shown in  FIG. 7 . Suppose a unit vector in the direction of the provisional control point path &lt; 3 &gt;is a vector v and a start point of the provisional control point path &lt; 3 &gt;is a vector p s , as shown in  FIG. 8 . A point on the provisional control point path &lt; 3 &gt;can then be represented as a vector p with the following expression: 
         [0000]        {right arrow over (p)}=   {right arrow over (p)}   s   +l{right arrow over (v)}   (4)
 
         [0000]    wherein 0≦1≦S block length of path &lt; 3 &gt; 
         [0058]    Suppose a point on the control point path &lt; 2 &gt;is a vector q. A distance d between the point q and the provisional control point path &lt; 3 &gt;can then be calculated by the following expression: 
         [0000]      {right arrow over (Δ)}= {right arrow over (q)}−{right arrow over (p)}   s  
 
         [0000]        d =|{right arrow over (Δ)}−({right arrow over (Δ)}·{right arrow over (v)}){right arrow over (v)}|  (5)
 
         [0059]    The control point interpolation unit  120  determines whether the distance between the control point path &lt; 2 &gt; and the provisional control point path &lt; 3 &gt; is within a tolerance by identifying a point q i  on the control point path &lt; 2 &gt; at interpolation cycle intervals, calculating, the distance d for each point q i  by the expression (5), and determining whether the distance d from the provisional control point path &lt; 3 &gt;is equal to or less than a tolerance at all the points q i . 
         [0060]      FIG. 9  is a flow chart illustrating the algorithm of a process of linearly interpolating a movement path of a control point in a technique of the present embodiment. 
         [0061]    When the process starts, the control point path when a tool tip point is linearly interpolated is initially calculated (S 901 ). Next, the point q i  for each interpolation cycle on the control point path calculated in S 901  is obtained (S 902 ). For each point q i , the distance d i  from a provisional control point path obtained by provisional linear interpolation is calculated, and whether all of the distances d i  are within a tolerance is determined (S 903 ). 
         [0062]    If it is determined in S 903  that all of the distances d i  are within a tolerance, then a movement instruction on the basis of a linear interpolation of the control point is adopted (S 904 ). If there is any point q i  whose distance d i  is not within a tolerance, then a movement instruction on the basis of a linear interpolation of the tool tip point is adopted (S 905 ). 
         [0063]    By executing such processing, a reversal of the control point becomes harder to occur in comparison with a conventional tool tip point control mode, resulting in an improvement in a machined surface quality. 
       Embodiment 3  
       [0064]    In embodiments 1 and 2, a backlash is suppressed by linearly interpolating the control point path when the deviation of a path due to the linear interpolation of the control point path or the tool tip point path is within a tolerance. In embodiment 3, a control is done so that the control point path is linearly interpolated when interpolation of one block of movement is completed within a specific number of interpolations in dependence upon an instructed speed. The technique of the present embodiment is based on the fact that if an instruction for one block of movement is divided into movement instructions for respective interpolation cycles on the basis of an instructed speed specified in the instruction, and the block of movement is completed in a small number of interpolation cycles, then the deviation of a tool tip point is small even if the control point path is linearly interpolated in the block of movement, and that lesser number of interpolations increases the effect of backlash because the number of interpolations executed between a reversal at the point A and a reversal at the point B illustrated in  FIG. 13B  decreases and the reversals thus occur more continuously. 
         [0065]      FIG. 10  is a diagram schematically illustrating the process of linearly interpolating a control point path in a technique of the present embodiment by way of the movement of the tool tip point and the control point. 
         [0066]    As shown in  FIG. 10 , if one block of movement is divided into movement instructions respectively corresponding to interpolation cycles and a control of the movement on a control point path is completed in two interpolations as indicated with &lt; 1 &gt;, for example, then the effect on a tool tip point path due to a linear interpolation of the control point path is expected to be small. Thus, the control point is linearly interpolated as indicated with &lt; 2 &gt;. 
         [0067]      FIG. 11  is a flow chart illustrating the algorithm of a process of linearly interpolating a movement path of the control point in a technique of the present embodiment. 
         [0068]    After the process starts, when an instruction for one block of movement is processed, the distance that the control point can move in a predetermined number of interpolation cycles is calculated on the basis of a current instructed speed of the block of movement (S 1101 ). Suppose that an instructed speed is F per minute [mm/min] and an interpolation cycle is dt [ms]. An amount of movement of the control point for each interpolation cycle can then be calculated as F×dt/60000. It is then determined whether a block length instructed for the block is shorter than the distance that the control point can move in two interpolation cycles calculated in S 1101  (S 1102 ). If it is determined in S 1102  that the block length instructed for the block is shorter than the distance that the control point can move in two interpolation cycles, then an instruction on the basis of a linear interpolation of the control point is adopted (S 1103 ). If it is determined in S 1102  that the block length instructed for the block is longer than the distance that the control point can move in two interpolation cycles, then an instruction on the basis of a linear interpolation of the tool tip point is adopted (S 1104 ). 
         [0069]    The number of interpolation cycles needed for completing one block of movement within which the control point is linearly interpolated can be set as a parameter in the CMOS  14 , for example, for flexibly dealing with various types of machining. 
         [0070]    By executing such processing, a reversal of the control point becomes harder to occur in comparison with a conventional tool tip point control mode, resulting in an improvement in a machined surface quality.