TOOL PATH GENERATION METHOD AND MACHINE TOOL
20170300029 · 2017-10-19
Assignee
Inventors
- Mitsunari ODA (Aiko-gun, JP)
- Megumi FURUTA (Aiko-gun, JP)
- Akihiro SHINONE (Aiko-gun, JP)
- Toshimune KAWAI (Aiko-gun, JP)
Cpc classification
G05B19/4093
PHYSICS
G05B19/19
PHYSICS
International classification
G05B19/19
PHYSICS
Abstract
A tool path generation method for generating a second tool path by performing a smoothing process on a first tool path for processing a work with a machine tool includes a change rate calculation step of calculating a curvature change rate of the first tool path at a plurality of moving points (P.sub.n) of the first tool path. The tool path generation method includes: a weight calculation step of calculating a moving average weight on the basis of the curvature change rate of the first tool path at each of the moving points (P.sub.n); and a step of calculating coordinate values of the moving average of the moving points (P.sub.n) using the weight at each of the moving points (P.sub.n), and setting the coordinate values of the moving average of the moving points (P.sub.n) as moving points of the second tool path.
Claims
1. A tool path generation method for generating second tool path by performing smoothing treatment with respect to first tool path that machines a workpiece with a machine tool, the tool path generation method comprising: a step of setting movement points in the first tool path; a rate-of-change calculation step for calculating a rate of change in curvature of the first tool path at each of the movement points; a weight calculation step for calculating a weight of moving average based on the rate of change in the curvature of the first tool path at each of the movement points; and a step of calculating a coordinate value of the moving average of the movement points by using the weight at each of the movement points and setting the coordinate value of the moving average of the movement point as the movement points of the second tool path.
2. The tool path generation method according to claim 1, wherein the rate-of-change calculation step includes a step of calculating a moving average value in the curvature at each of the movement points of the first tool path, and a step of calculating a rate of change in the curvature based on a calculated moving average value in the curvature.
3. The tool path generation method according to claim 1, wherein the weight calculation step includes a step of calculating a standard deviation of a normal distribution based on the rate of change in the curvature, and a step of calculating the weight of the moving average based on the normal distribution including a calculated standard deviation.
4. The tool path generation method according to claim 1, wherein an allowable value of a dimensional error of a machined workpiece is determined in advance, and the weight calculation step includes a step of setting the number of movement points to be used for calculation of the moving average based on the allowable value.
5. A machine tool comprising a control device that generates second tool path by performing smoothing treatment on first tool path set by a first machining program, wherein the control device includes: a movement point setting part that sets a plurality of movement points based on the first tool path; a rate-of-change calculation part that calculates a rate of change in curvature of the first tool path at each of the movement points; a weight setting part that calculates a weight of moving average based on the rate of change in the curvature of the first tool path at each of the movement points; a movement point correction part that calculates a coordinate value of the moving average of the movement points using the weight at each of the movement points and sets the coordinate value of the moving average of the movement points as the movement points of the second tool path; and a program generation part that generates a second machining program based on the movement points of the second tool path.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
DESCRIPTION OF EMBODIMENTS
[0039] Referring now to
[0040] The machine tool of the present embodiment is a numerically controlled machine tool that performs machining by automatically moving the tool relative to the workpiece in accordance with a machining program.
[0041] The machining program is input to the machine tool. The machine tool performs machining by moving at least one of the workpiece and the tool in accordance with the machining program.
[0042] The machine tool of the present embodiment includes three linear feed axes, i.e., X-axis, Y-axis and Z-axis, and causes the tool and the workpiece to move relatively in directions of the respective feed axes, so that machining of workpieces having a three-dimensional shape can be achieved. In the present embodiment, a case where the tool moves in directions of two axes, i.e., the X-axis and the Y-axis, for machining is described by way of example for simplifying the description. However, the present invention includes a case where the tool and the workpiece are moved relatively in directions of three axes, i.e., the X-axis, the Y-axis, and the Z-axis for machining.
[0043]
[0044] According to the tool path generation method of the present embodiment, second tool path is generated by performing smoothing treatment on first tool path defined by the first machining program. The tool path on which smoothing treatment is not performed is indicated by arrows 101, 102, and 103. When the curved part 92 is machined, a direction of movement of the tool 90 is significantly changed at a movement point Pc. Therefore, at a portion of the workpiece corresponding to the movement point Pc, the surface is formed into a pointed shape instead of being formed to a smooth curve. Therefore, smoothing treatment for smoothing the tool path by correcting positions of the movement points is performed.
[0045] The second tool path on which smoothing treatment has been performed is indicated by arrows 101, 104, and 103. By machining along the second tool path, the surface of the workpiece 91 is formed to be smoother at the curved part 92 than the case of machining along the first tool path.
[0046] First, the tool path generation methods of reference examples will be described. Here, first reference example and second reference example will be described. In the tool path generation method, control for correcting positions of the movement points which are set once is performed. In the smoothing treatment, a coordinate value of the moving average of the preset movement points is calculated. Subsequently, the coordinate value of the moving average is set to the movement points after correction. A path passing through the movement points after correction corresponds to the second tool path.
[0047]
[0048] In the tool path generation method of the first reference example, coordinates are detected at the respective movement points, and the coordinate value of the moving average is calculated. The coordinate value of the moving average of the movement points P.sub.n is expressed by equation (1) and equation (2), where the coordinate value of the movement points P.sub.n is expressed as (x.sub.n, y.sub.n).
[0053] In calculation of the moving average, an average of coordinate values of preset number of movement points preceding and following a target movement point is calculated for an X-coordinate and a Y-coordinate. In this example, an average of preceding two points and following two points of the movement point P.sub.n, i.e., total 5 points is calculated. The number of movement points to be selected when the average is calculated is referred to as an order. Any numbers can be employed as the order. In this example, five order moving average is calculated. A point of a coordinate (X.sub.n′, Y.sub.n′) calculated by the moving average is set to a movement point P.sub.n′ after correction. By performing the same calculation as described above respectively to the movement point P.sub.n−4 to the movement point P.sub.n+4, movement points from a movement point P.sub.n−4′ to a movement point P.sub.n+4′ on which the smoothing treatment is performed can be set. The second tool path can be generated on the basis of the path that connects the movement points on which the smoothing treatment is already performed.
[0054] When the movement point P.sub.n−2 is corrected, two movement points preceding and following the movement point P.sub.n−2 are linearly aligned. Therefore, the position of the movement point P.sub.n−2′ after correction is the same as the position of the movement point P.sub.n−2 before correction. In other words, the movement point P.sub.n−2 is immobile. The movement points such as the movement point P.sub.n+2 are also immobile. However, at the movement point P.sub.n, the five movement points including the preceding and following movement points are not aligned linearly, and the coordinate value of the movement point P.sub.n′ after correction is affected by the coordinate values of the preceding and following movement points P.sub.n−2, P.sub.n−1, P.sub.n+1, and P.sub.n+2.
[0055] In this example, the movement points P.sub.n−1, P.sub.n, and P.sub.n+1 in the vicinity of a top of the bent part are affected by the coordinate of the preceding and following movement points. The movement points P.sub.n−1′, P.sub.n′, and P.sub.n+1′ after correction come inside the movement points P.sub.n+1, P.sub.n and P.sub.n+1 before correction. In this manner, the second tool path comes inside the first tool path. A so-called inboard turning phenomenon occurs on the second tool path on which the smoothing treatment is already performed.
[0056]
[0058] Weights by which an X-coordinate value and a Y-coordinate value of each of the movement points are multiplied can be set to be larger for the coordinate value of the movement point to be corrected and set to be small for the coordinate value as away from the movement point to be corrected.
[0059]
[0060] Referring to
[0061] In this manner, the moving average value using the weight can be calculated for the movement points so as to set the moving average of the coordinate values as the coordinate values after correction. The equations for calculating the coordinate values after correction may be generalized as equation (5) and equation (6) given below. Variable i is an order and may be set in advance.
[0063] When machining is performed without reducing the relative velocity of movement of the tool with respect to the workpiece in portions where the direction of travel of the tool with respect to the workpiece changes, shaking or impact may be generated in the feed axes. Consequently, surface roughness may increase, or dimensional accuracy may be lowered. In other words, machining accuracy is lowered. Accordingly, control for reducing the velocity of movement can be performed in the portions where the direction of travel of the tool with respect to the workpiece changes.
[0064] Referring to
[0065]
[0066]
[0067] As regards velocity v.sub.y in the Y-axis direction, zero to a negative velocity v.sub.y is generated at the point A. Subsequently, the absolute value of the velocity v.sub.y gradually increases. At the point B, the velocity reaches to a constant velocity v.sub.y. Therefore, as regards acceleration a.sub.y in the Y-axis direction, a significant change in acceleration appears in the vicinity of the point A.
[0068] It is considered that the feed axis is shaken or receives an impact during a machining period because change in acceleration is significant. The cause of occurrence of the change in acceleration was found to be in a rate of change in curvature of the tool path. In other words, when the rate of change in curvature increases, the tool changes the direction of travel abruptly. In such a case, it was found that a significant change in acceleration appeared. Accordingly, in the tool path generation method of the present invention, a tool path that reduces the change in acceleration is generated in a portion where a significant change in acceleration appears.
[0069] Referring to
[0070]
[0071] The program correction apparatus 21 receives an input of the first machining program 76 generated by a CAM unit or the like in advance. The first machining program 76 includes information on the first tool path. The program correction apparatus 21 generates the second tool path by correcting the movement points of the first tool path and a second machining program 29 after correction is output based on the second tool path.
[0072] The program correction apparatus 21 includes a movement point setting part 22 that sets movement points based on the first machining program 76, and an intermediate curvature calculation part 23 that calculates curvatures at the respective movement points and further calculates intermediate curvatures that are corrected in curvature. The program correction apparatus 21 includes a rate-of-change calculation part 24 that calculates a rate of change in intermediate curvature. The program correction apparatus 21 includes a weight setting part 25 that sets a weight for calculating the coordinate value of the moving average based on the calculated rate of change in intermediate curvature. The program correction apparatus 21 includes a movement point correction part 26 that corrects the movement points based on the set weight. The movement point correction part 26 calculates the movement points after correction. The program correction apparatus 21 includes a program generation part 27 that generates a new second machining program based on the corrected movement points.
[0073]
[0074] Subsequently, a control device 70 performs a rate-of-change calculation step for calculating the rates of change in curvature of the first tool path at the respective movement points. In Step 43, the intermediate curvature calculation part 23 calculates curvatures at the movement points. Calculation of the curvature is performed for each of the movement points. In the present embodiment, a radius of curvature at the movement point is calculated for calculating the curvature at the movement point.
[0075]
[0076]
[0077] In a three-dimensional coordinate system, a virtual circle can be simulated based on the coordinate values of a plurality of the movement points in the same method as that described above. A radius of the virtual circle can be set to a radius of curvature of the movement point. The method of calculating the radius of curvature is not limited to the mode described above, and any method may be employed.
[0078] The curvature is an inverse of the radius of curvature. The curvature of the tool path at a prescribed movement point can be calculated based on equation (7) given below.
[Formula 4]
[0079]
α.sub.n=1/r.sub.n (7) [0080] α.sub.n: curvature [0081] r.sub.n: radius of curvature
[0082] Referring now to
[0083]
[0084] In order to solve discontinuity at the point A and the point B as described above, in the present embodiment, correction based on the smoothing treatment is performed on curvature. In the smoothing treatment on curvature, for example, moving average value in curvature of prescribed movement points is calculated, and the calculated moving average value can be set as the intermediate curvatures. In addition, when the moving average value is calculated, the curvatures of the respective movement points can be multiplied by weights.
[0085]
[0086] When the moving average value in curvature is calculated as well, the weight is set to be large at the movement point to be corrected and to decrease as it moves away from this movement point. The weight used when the smoothing treatment of the curvature is performed is not limited to this mode, and any weight may be employed. For example, weight may be set by using a normal distribution described later.
[0087]
[0088] Referring now to
[0092] Subsequently, the control device 70 performs a weight calculation step for calculating a weight of moving average based on rates of change in curvature of the first tool path at the respective movement points.
[0093] Referring to
[0094] In an area of the tool path where the rate of change in curvature is large, the change in acceleration is considered to be large. Therefore, in the present embodiment, influence of smoothing is reduced at the movement points having a small rate of change in curvature. In other words, smoothing is weakened so as to increase the influence of the original movement points. In contrast, smoothing can be strengthened at the movement points having a large rate of change in curvature. In other words, smoothing can be strengthened so as to reduce the influence of the original movement points and increase the influence of the movement points in the periphery.
[0095]
[0096] The weight of the movement point P.sub.n to be corrected increases as the standard deviation decreases, and the weight of the movement points decreases as it goes away from the movement point P.sub.n. For example, it is understood that when the standard deviation is small, the difference between the weight w.sub.n at the movement points P.sub.n and the weight w.sub.n−10 at the movement point P.sub.n−10 is large. In other words, it is understood that the smaller the standard deviation is, the more the weight concentrates, and the larger the standard deviation is, the more the weight disperses.
[0097]
[0098] The standard deviation illustrated in
[0099] The standard deviation can be calculated based on the rate of change in intermediate curvature. A constant a and a minimum value σ.sub.min of the standard deviation in the equation (9) can be determined in advance by experiment or the like.
[Formula 6]
[0100]
σ.sub.n=σ.sub.min+aβ.sub.n.sup.2 (9) [0101] σ.sub.n: standard deviation of point P.sub.n [0102] σ.sub.min: minimum value of standard deviation [0103] a: constant [0104] β.sub.n: rate of change in curvature at point P.sub.n
[0105] The weight setting part 25 is capable of setting the weight used when calculating the moving average value for each of the movement points based on the calculation formula of equation (9). Alternatively, a relationship between the rate of change in intermediate curvature and the standard deviation illustrated in
[0106] Referring to
[0107] In this manner, in the present embodiment, a distribution of the weight is set for each of the movement points. The weight is set for each of the movement points, the coordinate value of the moving average is calculated, and the calculated coordinate is set to the movement points after correction.
[0108] In the example illustrated in
[0109]
[0110] Therefore, in the tool path generation method of the present embodiment, shaking and impact generated in the feed axis can be suppressed. Alternatively, deceleration to be performed before the direction of travel of the tool path changes can be suppressed. Movement at a higher velocity than that in the related art is achieved. For example, machining at a higher velocity than the tool path generated by the tool path generation method of the second reference example is achieved. Consequently, machining time can be reduced.
[0111] In the present embodiment, a normal distribution is used for setting the weight for calculating the coordinate value of the moving average. By adopting this method, the degree of dispersion of the weight can be changed by the standard deviation, so that the dispersion of the weight can be changed easily. In other words, the effect of smoothing can be adjusted easily. Referring to
[0112] A distribution other than the normal distribution may be used for setting the weight for calculating the coordinate value of the moving average. For example, a distribution in which the weight is linearly changed as illustrated in
[0113] Subsequently, features of the tool path generated by the tool path generation method of the present embodiment will be described.
[0114]
[0115]
[0116]
[0117] Referring to
[0118] When the order used for calculating the coordinate value of the moving average is increased, the coordinate value of the movement points disposed at larger distances may have an influence. Accordingly, an amount of inboard turning increases. In contrast, when the order is reduced, the coordinate values of the movement points disposed at larger distances may have less influence. Therefore, when the order is reduced, a tool path that has a large influence of the original movement point can be generated as the tool path of the first example. In contrast, the tool path of the second example having a small influence of the original movement point can be generated by increasing the order.
[0119] When the lengths of all pitches are changed with a constant order, the influence of the original coordinate values is increased by reducing the pitches, so that the tool path of the first example can be generated. In contrast, the influence of the coordinate values at large distances is enlarged by increasing the pitches, so that the tool path of the second example can be generated.
[0120] The tool path may be changed also by increasing or decreasing the standard deviation of the normal distribution for setting the weight for all the movement points. The tool path may be changed by changing the method of calculating the standard deviation for the intermediate rate of change. For example, the tool path may be changed by changing the shape of the graph in
[0121] In addition, the pitches between the movement points may be set to be variable. For example, the first tool path may be configured to have longer pitches as the rate of change in curvature of the corresponding area becomes smaller. By increasing the pitches in the area having a small rate of change in curvature, the movement points at larger distances have an influence. Therefore, the tool path is changed before the rate of change in curvature increases so as to smooth the change in acceleration.
[0122] In the second tool path after correction, at least a part of the area is deviated from the first tool path. In other words, when the workpiece is machined, the shape of the workpiece may have a dimensional error. The dimensional error of the workpiece machined by the tool path of the second example is larger than those machined by the tool path of the first example. Therefore, the dimensional error of the machined workpiece can be adjusted by changing at least one of the order, the pitches, and the standard deviation used for calculating the moving average.
[0123] For example, when the order is increased, smoother curved surface is achieved. However, the amount of the inboard turning is increased. Therefore, the dimensional error from the designed value increases. An allowable value for the dimensional error of the machined workpieces is specified in advance. In the weight calculation step for calculating the weight of moving average, the number of movement points to be used for calculating the moving average can be set based on the allowable value for the dimensional error. For example, the maximum order with which the dimensional error falls within a range of allowable value can be selected.
[0124] The standard deviation of the normal distribution for setting the weight can be set based on the allowable value for the dimensional error. For example, when the dimensional error exceeds the allowable value at the respective movement points, the standard deviation can be set such that the dimensional error falls within the allowable value.
[0125] Furthermore, in the step of setting the movement points, the pitches can be set based on the allowable value for the dimensional error. For example, the maximum pitch with which the dimensional error falls within a range of allowable value can be selected. When the pitches are varied, the distances between the respective movement points can be set based on the allowable value for the dimensional error.
[0126] By machining the workpiece such that the top of the bent part extends in a prescribed direction, a portion that appears to be linear, which portion is referred to as a character line, can be formed on the workpiece. The character line is part of a design of a product. It is also possible to form a portion corresponding to the character line on a mold for forming the character line on the product. In smoothing treatment in the tool path generation method of the reference example, the surfaces of the workpieces or molds are smoothed, while the character lines are blurred.
[0127] In the tool path generation method of the present embodiment, blurring of character lines can be suppressed. When the character line is formed, in particular, the second example illustrated in
[0128] When the character line is formed, control for stopping smoothing treatment may be performed in the vicinity of the character line. However, when the smoothing treatment is stopped, the surface in the vicinity of the character line may not be smoothed. In contour processing, if there are paths in which the smoothing treatment is stopped, level differences may be generated between the tool paths adjacent to each other. In contrast, in the tool path generation method of the present embodiment, the character line can be formed as well as performing smoothing treatment. Alternatively, in contour processing, the character line can be formed while avoiding generation of the level differences.
[0129] The program correction apparatus 21 of the present embodiment may be provided on the CAM device or the machine tool. Subsequently, the machine tool provided with the program correction apparatus of the present embodiment will be described.
[0130]
[0131] The first machining program 76 is input to the input part 71. The first machining program 76 includes information on relative movement of the tool with respect to the workpiece. Action commands for the machine tool are described by a command cord such as G code or M code in the first machining program 76. The first machining program may be formed newly by the operator by inputting characters via an operation part 81. The coordinate values of the movement points may be described in the first machining program.
[0132] The reading and interpretation part 72 reads a machining program from the input part 71. The reading and interpretation part 72 sends a movement command to the interpolation arithmetic part 73. The interpolation arithmetic part 73 calculates a position command value for each of interpolation cycles. For example, the interpolation arithmetic part 73 calculates an amount of movement for each time interval set on the basis of the movement command. The interpolation arithmetic part 73 sends the position command value to the servo control part 74. The servo control part 74 calculates the amount of movement of the respective feed axes such as the X-axis, the Y-axis, the Z-axis, and A-axis so as to drive respective axes servo motors 75 based on the position command values.
[0133] The control device 70 includes an arithmetic processing part 78 that controls machining information relating to machining of the workpieces. The arithmetic processing part 78 has functions of calculating and judging predetermined variables based on the machining information. The control device 70 includes the operation part 81 that allows the operator to input the machining information or the like and a display part 82 that displays the machining information. The operation part 81 includes a keyboard or the like, and allows the operator to input the machining information via a manual operation. The control device 70 includes a storage part 80 that stores the machining information. The storage part 80 may be a memory device such as a memory card or a hard disk connected via a communication interface in addition to the ROM or the RAM described above.
[0134] The arithmetic processing part 78 includes a program correction part 79. The program correction part 79 has a function of the above-described program correction apparatus 21. In other words, the program correction part 79 acquires the first machining program 76 from the input part 71. The program correction part 79 generates the second tool path by performing the smoothing treatment of the present embodiment with respect to the first tool path. The program correction part 79 generates the second machining program based on the second tool path. The program correction part 79 sends the second machining program to the input part 71. The machine tool 1 drives the respective axes servo motors 75 based on the second program.
[0135] In this manner, in the machine tool, machining can be performed by correcting the tool path by the tool path generation method of the present embodiment.
[0136] The example in which machining is performed while the workpiece stops and the tool moves has been described in the present embodiment. However, the mode is not limited thereto, and the present invention may be applied to the tool path generation method and the machine tool in which at least one of the workpiece and the tool moves.
[0137] The embodiments described above may be combined as needed. In the respective controls described above, the order of steps may be changed within a range in which the function and effects are not changed.
[0138] In the respective drawings, the same or equivalent portions are denoted by the same reference numerals. The above-described embodiments are exemplary, and are not intended to limit the invention. In the embodiments, modifications of the embodiments described in claims are included.
REFERENCE SIGNS LIST
[0139] 1 Machine tool [0140] 21 Program correction apparatus [0141] 22 Movement point setting part [0142] 23 Intermediate curvature calculation part [0143] 24 Rate-of-change calculation part [0144] 25 Weight setting part [0145] 26 Movement point correction part [0146] 27 Program generation part [0147] 29 Second machining program [0148] 70 Control device [0149] 72 Reading and interpretation part [0150] 75 Respective axes servo motor [0151] 76 First machining program [0152] 79 Program correction part [0153] 90 Tool [0154] 91 Workpiece