Tool-path generating device, tool-path generating method, and non-transitory recording medium storing tool-path generating program
10409256 ยท 2019-09-10
Assignee
Inventors
Cpc classification
G05B19/402
PHYSICS
Y02P90/02
GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
International classification
Abstract
Provided is a tool-path generating device that includes a point-sequence generating unit that generates a point sequence that represents a tool path on the basis of a machining program, and a smoothing unit that smooths the generated point sequence. The smoothing unit includes a filter-length setting unit that sets filter lengths that are applied to the points such that a pre/post-smoothing divergence amount of each point in the point sequence is equal to or less than a first threshold, a filter-length changing unit that changes the set filter lengths such that an absolute value of a difference between the filter lengths applied to adjacent points in the point sequence is equal to or less than a second threshold, and a filter processing unit that performs filter processing on the basis of the changed filter lengths.
Claims
1. A tool-path generating device comprising: at least one processor that generates a point sequence that represents a tool path based on a machining program; and the at least one processor smooths the generated point sequence; wherein the smoothing unit includes the at least one processor sets filter lengths that are applied to the points such that a pre/post-smoothing divergence amount of each point in the point sequence is equal to or less than a first threshold, and that the filter lengths are set the largest, the at least one processor changes the set filter lengths such that an absolute value of a difference between the filter lengths applied to adjacent points in the point sequence is equal to or less than a second threshold, and the at least one processor performs filter processing based on the changed filter lengths.
2. The tool-path generating device according to claim 1, wherein the at least one processor that changes one filter length among the filter lengths applied to adjacent points such that the length of the one filter becomes smaller.
3. The tool-path generating device according to claim 1, wherein the point sequence generated by the at least one processor that comprises a point sequence included in the machining program and additional points obtained by interpolating the points in the point sequence.
4. A tool-path generating method comprising: a point-sequence-generating step of generating a point sequence that represents a tool path based on a machining program; and a smoothing step of smoothing the generated point sequence; wherein the smoothing step includes a step of setting filter lengths that are applied to the points such that a pre/post-smoothing divergence amount of each point in the point sequence is equal to or less than a first threshold, and that the filter lengths are set the largest, a step of changing the set filter lengths such that an absolute value of a difference between the filter lengths applied to adjacent points in the point sequence is equal to or less than a second threshold, and a step of performing filter processing based on the changed filter lengths.
5. A non-transitory recording medium storing a tool-path generating program that causes a computer to execute: point-sequence generating processing that generates a point sequence that represents a tool path based on a machining program; and smoothing processing that smooths the generated point sequence; wherein the smoothing processing includes processing for setting filter lengths that are applied to the points such that a pre/post-smoothing divergence amount of each point in the point sequence is equal to or less than a first threshold, and that the filter lengths are set the largest, processing for changing the set filter lengths such that an absolute value of a difference between the filter lengths applied to adjacent points in the point sequence is equal to or less than a second threshold, and processing for performing filter processing based on the changed filter lengths.
Description
BRIEF DESCRIPTION OF DRAWINGS
(1)
(2)
(3)
(4)
DESCRIPTION OF EMBODIMENTS
(5) Hereafter, a numerical control device according to an embodiment of the present invention will be described while referring to the drawings.
(6) As illustrated in
(7) Although not illustrated, the numerical control device 1 includes a central processing unit (CPU), a main storage device such as a random access memory (RAM), an auxiliary storage device such as a hard disk drive (HDD), an input device such as a keyboard, an output device such as a monitor, an external interface that exchanges various data with external devices, and a control mechanism that receives shaft movement instructions from the CPU and controls the servo driving unit 4 and the main-shaft driving unit 5 of the machine tool. A program and so forth are stored in the auxiliary storage device, and the CPU reads out the program from the auxiliary storage device and executes the program, whereby the various functions described in this embodiment are implemented.
(8) As illustrated in
(9) The tool-path generating unit 2 includes a point-sequence generating unit 21 that generates a point sequence on the basis of a machining program input thereto, and a smoothing unit 22 that performs smoothing processing on the generated point sequence.
(10) The point-sequence generating unit 21 is configured to generate a point sequence that will serve as a tool path by extracting a plurality of instructed points included in the machining program. In this case, as illustrated in
(11) The smoothing unit 22 is configured to perform smoothing processing using a filter. In this embodiment, a simple average is used as a filter. Smoothing processing using a filter is preferable because large variations are not generated between smoothing processing results due to small differences in the shape of a tool path, such as a bent state, compared with smoothing processing using spline curves and so on. This is because smoothing processing using a filter has the property that the value always changes such that the path curves inward with respect to the path before the smoothing processing.
(12) A coordinate value Q.sub.n of an nth point in a point sequence Q obtained after smoothing processing using a simple average and composed of N points can be expressed by formula (1), where P.sub.n is the coordinate value of an nth point in a point sequence P before smoothing processing, generated by the point-sequence generating unit 21, and is composed of N points.
(13)
(14) In this case, L<nNL, where L represents the range over which smoothing is performed, that is, the filter length.
(15) More specifically, as illustrated in
(16) The filter-length setting unit 221 is configured to set a filter length L for every point in the point sequence P generated by the point-sequence generating unit 21.
(17) In this case, the coordinate value Q.sub.n of the nth point in the point sequence Q obtained after smoothing processing has been performed using a filter length L.sub.n is expressed by Q.sub.n(L.sub.n). A pre/post-smoothing processing divergence amount represented by formula (2) tends to become larger as the filter length L.sub.n becomes larger, and tends to become smaller as the filter length L.sub.n becomes smaller.
|P.sub.nQ.sub.n(L.sub.n)|(2)
(18) In the case where the filter length L.sub.n=0,
P.sub.n=Q.sub.n(0)(3)
(19) The filter-length setting unit 221 is configured to provide a tolerance (first threshold) for the pre/post-smoothing processing divergence amount, and sets the largest filter lengths L.sub.n that satisfy formula (4) for the individual points in the point sequence P.
|P.sub.nQ.sub.n(L.sub.n)|tolerance(4)
(20) In this case, tolerance, which is written as tolerance, has a value of zero or higher, and can be arbitrarily set.
(21) In the case where formula (4) is not satisfied, an L.sub.n that satisfies formula (4) can be obtained by making L.sub.n smaller. From formula (3) and the fact that the tolerance has a value of zero or higher, it is guaranteed that there are always values of L.sub.n that satisfy formula (4).
(22) The filter-length changing unit 222 is configured to change the filter length L set for each point in the point sequence P such that the absolute value of the difference between the filter lengths L set for adjacent points is equal to or less than a prescribed threshold (second threshold). More specifically, the filter-length changing unit 222 is configured to change the filter length L.sub.n such that the (n1)-th filter length L.sub.n-1 and the nth filter length L.sub.n satisfy formula (5), for example.
|L.sub.n-1L.sub.n|1(5)
(23) Here, 1<nN.
(24) The filter-length changing unit 222 is configured to satisfy formula (5) by making the larger value among the filter lengths L.sub.n and L.sub.n-1 smaller in the case where the filter length L.sub.n does not satisfy formula (5).
(25) The filter processing unit 223 is configured to calculate coordinate values Q.sub.1(L.sub.1) to Q.sub.N(L.sub.N) by performing smoothing processing using a simple average filter on the basis of the filter lengths L.sub.1 to L.sub.N changed by the filter-length changing unit 222.
(26) The pulse generating unit 3 is configured to generate pulses from the coordinate values Q.sub.1 (L.sub.1) to Q.sub.N(L.sub.N) calculated by the filter processing unit 223 in order to control the servo driving unit 4 and the main-shaft driving unit 5.
(27) Next, a numerical control method that includes a tool-path generating method of this embodiment executed by the tool-path generating unit 2 having the above-described configuration will be described while referring to
(28) First, a machining program is read into the point-sequence generating unit 21 (step S1 in
(29) Buffering of a point sequence P newly generated in step S3 and composed of N points is performed (step S4 in
(30) Next, initial filter lengths L.sub.n are set for the N points by the filter-length setting unit 221 (step S5 in
(31) Next, the processing of step S6 to step S9 is performed for the first to Nth points in the point sequence P. First, coordinate values Q.sub.n(L.sub.n) are calculated for the points obtained after smoothing processing (step S6 in
(32) Next, a condition check is performed by the filter-length changing unit 222 for each of the points in the point sequence P as to whether the filter lengths L.sub.n set for adjacent points satisfy formula (5) (step S10 in
(33) As a result of the method being configured in this way, the filter lengths can be changed such that a difference between filter lengths set for adjacent points does not change by an amount that is larger than a prescribed threshold while ensuring that a pre/post-smoothing processing divergence amount is equal to or less than the first threshold, and therefore, a smoother result of smoothing processing can be obtained.
(34) The post-smoothing processing values Q.sub.n(L.sub.n) are recalculated by performing filter processing based on a simple average using the filter processing unit 223 on the basis of the filter lengths L.sub.n for the individual points in the thus-obtained point sequence P (step S12 in
(35) Q.sub.n (L.sub.n)Q.sub.n-1(L.sub.n-1), which is a movement instruction, is output as pulses by the pulse generating unit 3 of the numerical control device 1 in order to control the servo driving unit 4 and the main-shaft driving unit 5 (step S13 in
(36) Thus, the filter lengths of the filters to be applied to the points in the point sequence P are individually determined, and filter processing is performed on the basis of the determined filter lengths. Therefore, smoother smoothing processing can be performed, and it can be ensured that level differences are not generated between adjacent paths.
(37) Embodiments of the present invention have been described in detail above while referring to the drawings, but a specific configuration of the present invention is not limited to these embodiments, and design changes and so forth that do not depart from the gist of the present invention are included in the scope of the present invention.
(38) For example, in the above-described embodiments, integers have been used as the values of the filter lengths L, but real numbers may instead be used as the values of the filter lengths L. In this case, the coordinate value Q.sub.n of an nth point in the point sequence Q can be calculated using formula (6).
(39)
(40) Here, M is the largest integer that does not exceed L.
(41) In addition, although a simple average filter is used as the filter applied by the smoothing unit 22, the present invention is not limited to this configuration, and a filter such as a weighted average filter may be used instead, for example.
(42) Furthermore, although the various functions of the tool-path generating unit 2 are implemented by executing a tool-path generating program using a processor in the above-described embodiments, the present invention is not limited to this configuration, and the various functions may instead be implemented in the form of hardware, such as a circuit on a silicon chip.
(43) As a result, the above-described embodiment leads to the following aspects.
(44) A first aspect of the present invention is directed to a tool-path generating device that includes a point-sequence generating unit that generates a point sequence that represents a tool path on the basis of a machining program, and a smoothing unit that smooths the generated point sequence. The smoothing unit includes a filter-length setting unit that sets filter lengths that are applied to the points such that a pre/post-smoothing divergence amount of each point in the point sequence is equal to or less than a first threshold, a filter-length changing unit that changes the set filter lengths such that an absolute value of a difference between the filter lengths applied to adjacent points in the point sequence is equal to or less than a second threshold, and a filter processing unit that performs filter processing on the basis of the changed filter lengths.
(45) According to the tool-path generating device of the first aspect of the present invention, a point sequence that represents a tool path is generated on the basis of a machining program by the point-sequence generating unit. Next, filter lengths that are to be applied to the points are set by the filter-length setting unit of the smoothing unit such that a pre/post-smoothing divergence amount of each point in the point sequence is equal to or less than a first threshold. After that, the set filter lengths are changed by the filter-length changing unit of the smoothing unit such that an absolute value of a difference between the filter lengths applied to adjacent points in the point sequence is equal to or less than a second threshold. Finally, filter processing is performed by the filter processing unit of the smoothing unit on the basis of the changed filter lengths.
(46) According to this aspect of the present invention, a smoother result can be obtained from smoothing processing, and it can be ensured that level differences are not generated between adjacent tool paths.
(47) In the tool-path generating device of the first aspect of the present invention, the filter-length changing unit may be configured to change one filter among the filters applied to adjacent points such that the length of the one filter becomes smaller.
(48) With this configuration, the filter lengths can be changed while ensuring that pre/post-smoothing processing divergence amounts are equal to or less than the first threshold, and therefore, a smoother result can be obtained from the smoothing processing.
(49) In the tool-path generating device of the first aspect of the present invention, the point sequence generated by the point-sequence generating unit may be composed of a point sequence included in the machining program and additional points obtained by interpolating the points in the point sequence.
(50) With this configuration, variations in the results of smoothing processing arising from small differences in line segment distance between adjacent block end points in a tool path composed of a point sequence included in a machining program can be reduced.
(51) A second aspect of the present invention is directed to a tool-path generating method that includes a point-sequence generating step of generating a point sequence that represents a tool path on the basis of a machining program, and a smoothing step of smoothing the generated point sequence. The smoothing step includes a step of setting filter lengths that are applied to the points such that a pre/post-smoothing divergence amount of each point in the point sequence is equal to or less than a first threshold, a step of changing the set filter lengths such that an absolute value of a difference between the filter lengths applied to adjacent points in the point sequence is equal to or less than a second threshold, and a step of performing filter processing on the basis of the changed filter lengths.
(52) A third aspect of the present invention is directed to a tool-path generating program that causes a computer to execute point-sequence generating processing that generates a point sequence that represents a tool path on the basis of a machining program, and smoothing processing that smooths the generated point sequence. The smoothing processing includes processing for setting filter lengths that are applied to the points such that a pre/post-smoothing divergence amount of each point in the point sequence is equal to or less than a first threshold, processing for changing the set filter lengths such that an absolute value of a difference between the filter lengths applied to adjacent points in the point sequence is equal to or less than a second threshold, and processing for performing filter processing on the basis of the changed filter lengths.
(53) The aspects of the present invention afford the advantage that the quality of an article to be machined can be improved by ensuring that level differences are not generated between adjacent tool paths.
REFERENCE SIGNS LIST
(54) 2 tool-path generating unit (tool-path generating device) 21 point-sequence generating unit 22 smoothing unit 221 filter-length setting unit 222 filter-length changing unit 223 filter processing unit