Numerical control device, control method, program, and storage medium

JP2026166325APending Publication Date: 2026-10-14BROTHER KOGYO KK
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2025059194
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2026-10-14

Smart Images

  • Figure 2026166325000001_ABST
    Figure 2026166325000001_ABST
Patent Text Reader

Abstract

The present invention provides a numerical control device, control method, program, and storage medium capable of generating machining paths for workpieces of various shapes. [Solution] The angle θ between the direction of the vector V moving from acquisition point P(j) to reference point T(i) and the direction of the rotation axis Q of the main axis is calculated. If the angle θ is greater than the determination angle, the control device moves the main axis in a direction along the plane H, performing a retraction operation and an approach operation to acquire the next acquisition point P(j+1). If the angle θ is less than or equal to the determination angle, the control device moves the main axis in a direction along the rotation axis Q, performing a retraction operation in the same direction as the previous retraction operation, and then an approach operation to acquire the next acquisition point.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a numerical control device, a control method, a program, and a storage medium.

Background Art

[0002] Patent Document 1 discloses a machine tool that performs an approaching operation and a retracting operation of a main spindle toward the peripheral edge of a master workpiece along a reference path on the outer edge or inner edge of the master workpiece. The machine tool acquires the coordinates of the main spindle when a tool mounted on the main spindle comes into contact with the master workpiece through the approaching operation. The machine tool generates a machining path for the main spindle based on a plurality of coordinates acquired along the reference path.

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Summary of Invention

Problems to be Solved by the Invention

[0004] In Patent Document 1, the main spindle is moved on a plane along the reference path of the master workpiece by, for example, two axes of the X-axis and Y-axis to perform the approaching operation and the retracting operation. However, no consideration is given to the generation of a machining path when the main spindle moves three-dimensionally along the peripheral edge of the master workpiece by three axes including, for example, the Z-axis.

[0005] An object of the present invention is to provide a numerical control device, a control method, a program, and a storage medium that can generate machining paths for workpieces of various shapes.

Means for Solving the Problems

[0006] According to a first aspect of the present invention, a numerical control device having the following features is provided. The numerical control device includes a control unit that performs a first movement process, a first determination process, an acquisition process, and a second movement process. The first movement process is a process that performs an approach operation to bring the spindle on which the tool is mounted closer to the peripheral edge of the masterwork along a reference path. The reference path is a path determined based on a plurality of reference points set at positions along the outer or inner edge of the masterwork.

[0007] The first determination process is a process to determine whether the tool has come into contact with the peripheral edge during the approach movement performed by the first movement process. The acquisition process is a process to acquire the coordinates of the spindle as acquisition points if the first determination process determines that the tool has come into contact with the peripheral edge. The second movement process is a process to perform a retraction operation to move the spindle in a predetermined retraction direction after the acquisition points have been acquired by the acquisition process. The control unit generates a machining path for the spindle based on a plurality of acquisition points acquired by repeatedly performing the approach movement and the retraction operation.

[0008] In a numerical control device with such a configuration, the control unit executes a determination process to determine the retraction direction after the acquisition point has been acquired by the acquisition process. The determination process includes a second determination process and a first setting process. The second determination process is a process that determines whether the angle θ is greater than a predetermined determination angle θ0. The angle θ is the angle between the direction of the vector from the acquisition point to the reference point and the axial direction from which the rotation axis of the main shaft extends.

[0009] The first setting process is the process of setting the retraction direction. The second determination process may determine that the angle θ is greater than the determination angle θ0. In this case, the control unit sets the retraction direction to the direction from the acquisition point toward a retraction point away from the masterwork at a position on a plane that includes the vector and intersects in the axial direction. The second determination process may determine that the angle θ is less than or equal to the determination angle θ0. In this case, the control unit sets the retraction direction to the direction in which the spindle retracted from the masterwork in the previous retraction operation.

[0010] The direction of the vector from the acquisition point to the reference point is the direction in which the spindle moves along the reference path while repeatedly performing approach and retraction movements. Let θ be the angle between the direction of the vector and the axis direction of the spindle's rotation axis. If angle θ is greater than the judgment angle θ0, the spindle moves on a plane intersecting the axis directions while repeatedly performing approach and retraction movements. In other words, the numerical control device can acquire acquisition points and generate a machining path by moving the spindle on a plane using, for example, two axes, the X and Y axes, to perform approach and retraction movements.

[0011] If the angle θ is less than or equal to the judgment angle θ0, the numerical control device moves the spindle axially while repeatedly performing approach and retraction movements. The numerical control device can generate a machining path by acquiring acquisition points while moving the spindle axially. When retracting the spindle from an acquisition point, collision between the spindle and the master workpiece can be avoided by retracting it in the same direction as the previous retraction. Therefore, the numerical control device can generate machining paths for workpieces of various shapes.

[0012] A second aspect of the present invention provides a control method for a numerical control device having the following features. The control method of the second aspect comprises a first movement step, a first determination step, an acquisition step, and a second movement step for controlling a machine tool equipped with a spindle on which a tool is mounted. In the first movement step, an approach operation is performed to bring the spindle closer to the periphery of the masterwork along a reference path. The reference path is a path determined based on a plurality of reference points set at positions along the outer or inner edge of the masterwork.

[0013] In the first determination step, it is determined whether the tool has come into contact with the peripheral edge during the approach movement in the first movement step. In the acquisition step, if it is determined in the first determination step that the tool has come into contact with the peripheral edge, the coordinates of the spindle are acquired as acquisition points. In the second movement step, after the acquisition points have been acquired in the acquisition step, a retraction movement is performed to retract the spindle in a predetermined retraction direction. Then, based on the multiple acquisition points acquired by repeatedly performing the approach movement and the retraction movement, the machining path of the spindle is generated.

[0014] A control method for a numerical control device with such a configuration further includes a determination step. In the determination step, after the acquisition point is acquired by the acquisition step, the retraction direction is determined. The determination step includes a second determination step and a first setting step. In the second determination step, it is determined whether the angle θ is greater than a predetermined determination angle θ0. The angle θ is the angle between the direction of the vector from the acquisition point to the reference point and the axial direction in which the rotation axis of the principal axis extends.

[0015] In the first setting step, the retraction direction is set. In some cases, the second determination step determines that the angle θ is greater than the determination angle θ0. In this case, in the first setting step, the direction from the acquisition point toward a retraction point away from the masterwork at a position on a plane that includes the vector and is perpendicular to the axial direction is set as the retraction direction. In some cases, the second determination step determines that the angle θ is less than or equal to the determination angle θ0. In this case, in the first setting step, the direction in which the spindle retracted from the masterwork in the previous retraction operation is set as the retraction direction.

[0016] Therefore, the second embodiment produces the same effect as the first embodiment.

[0017] A third aspect of the present invention provides a program having the following features. The program of the third aspect causes the computer of a numerical control device to execute a first movement step, a first determination step, an acquisition step, and a second movement step. In the first movement step, an approach operation is performed to bring the spindle on which the tool is mounted closer to the periphery of the masterwork along a reference path. The reference path is a path determined based on a plurality of reference points set at positions along the outer or inner edge of the masterwork.

[0018] In the first determination step, it is determined whether the tool has come into contact with the peripheral edge during the approach movement in the first movement step. In the acquisition step, if it is determined in the first determination step that the tool has come into contact with the peripheral edge, the coordinates of the spindle are acquired as acquisition points. In the second movement step, after the acquisition points have been acquired in the acquisition step, a retraction movement is performed to retract the spindle in a predetermined retraction direction. Then, by controlling the machine tool equipped with the spindle, a machining path for the spindle is generated based on a plurality of acquisition points obtained by repeatedly performing the approach movement and the retraction movement.

[0019] A program with this configuration further causes the computer to execute a decision step. In the decision step, after the acquisition point is acquired by the acquisition step, the retraction direction is determined. In the decision step, a second determination step and a first setting step are executed. In the second determination step, it is determined whether the angle θ is greater than a predetermined determination angle θ0. The angle θ is the angle between the direction of the vector from the acquisition point to the reference point and the axial direction in which the rotation axis of the principal axis extends.

[0020] In the first setting step, the retraction direction is set. In some cases, the second determination step determines that the angle θ is greater than the determination angle θ0. In this case, in the first setting step, the direction from the acquisition point toward a retraction point away from the masterwork at a position on a plane that includes the vector and intersects in the axial direction is set as the retraction direction. In some cases, the second determination step determines that the angle θ is less than or equal to the determination angle θ0. In this case, in the first setting step, the direction in which the spindle retracted from the masterwork in the previous retraction operation is set as the retraction direction.

[0021] Therefore, the third embodiment produces the same effect as the first embodiment.

[0022] A fourth aspect of the present invention provides a storage medium having the following features. The storage medium of the fourth aspect stores a program that causes the computer of a numerical control device to execute a first movement step, a first determination step, an acquisition step, and a second movement step. In the first movement step, an approach operation is performed to bring the spindle on which the tool is mounted closer to the periphery of the masterwork along a reference path. The reference path is a path determined based on a plurality of reference points set at positions along the outer or inner edge of the masterwork.

[0023] In the first determination step, it is determined whether the tool has come into contact with the peripheral edge during the approach movement in the first movement step. In the acquisition step, if it is determined in the first determination step that the tool has come into contact with the peripheral edge, the coordinates of the spindle are acquired as acquisition points. In the second movement step, after the acquisition points have been acquired in the acquisition step, a retraction movement is performed to retract the spindle in a predetermined retraction direction. Then, by controlling the machine tool equipped with the spindle, a machining path for the spindle is generated based on a plurality of acquisition points obtained by repeatedly performing the approach movement and the retraction movement.

[0024] The program stored in such a storage medium further causes the computer to execute a determination step. In the determination step, the retraction direction is determined after the acquisition point is acquired by the acquisition step. In the determination step, a second determination step and a first setting step are executed. In the second determination step, it is determined whether or not an angle θ is larger than a predetermined determination angle θ0. The angle θ is an angle formed by the direction of a vector directed from the acquisition point to the reference point and the axial direction in which the rotation axis of the main spindle extends.

[0025] In the first setting step, the retraction direction is set. The second determination step may determine that the angle θ is larger than the determination angle θ0. In this case, in the first setting step, a direction directed from the acquisition point to a retraction point away from the master workpiece at a position on a plane that includes the vector and intersects the axial direction is set as the retraction direction. The second determination step may determine that the angle θ is equal to or smaller than the determination angle θ0. In this case, in the first setting step, the direction in which the main spindle retracted from the master workpiece in the previous retraction operation is set as the retraction direction. Brief Description of the Drawings

[0026] [Figure 1] It is a perspective view of the machine tool 100. [Figure 2] It is a block diagram showing the electrical configuration of the machine tool 100. [Figure 3] It is a diagram for explaining the operation of acquiring the acquisition point P(j) along the reference path R0. [Figure 4] It is a diagram for describing the setting of the retraction direction. [Figure 5] It is a diagram for explaining calculation of the retraction point U(k). [Figure 6] It is a diagram for explaining calculation of the angle ω of rotation about the A axis. [Figure 7] It is a diagram for explaining calculation of the correction point Ta(i). [Figure 8]This diagram illustrates the setting of coefficients used in calculating the direction of retreat. [Figure 9] This is a flowchart of the main processing steps of the route generation program. [Figure 10] This is a flowchart for the U / D determination process. [Figure 11] This is a flowchart for the evasive approach procedure. [Figure 12] This is a flowchart of the motion coordinate calculation process. [Modes for carrying out the invention]

[0027] One embodiment of the present invention will be described. The following description will use the left / right, front / back, and up / down directions indicated by arrows in the figure. The left / right direction, front / back direction, and up / down direction of the machine tool 100 are the X-axis direction, Y-axis direction, and Z-axis direction, respectively.

[0028] The machine tool 100 shown in Figure 1 is a multi-tasking machine. The machine tool 100 can perform rotational machining on a workpiece. Rotary machining is a process in which a tool D is rotated and brought into contact with a stationary workpiece to cut the workpiece. The control device 10 that controls the machine tool 100 deburrs or polishes the workpiece by moving the peripheral portion of the tool D along the machining path R1 while keeping the tool D in contact with the workpiece.

[0029] Referring to Figure 1, the structure of the machine tool 100 will be described. The machine tool 100 comprises a base 180, a support column 190, an X-axis movement mechanism 170, a Z-axis movement mechanism 160, and a spindle head 110. The machine tool 100 further comprises a Y-axis movement mechanism 140, a workpiece support section 120, and a tool magazine 130.

[0030] The base 180 is a rectangular, box-shaped iron member that is elongated in the Y-axis direction. The base 180 is equipped with two support columns 190. The two support columns 190 are spaced apart in the left-right direction at the rear upper surface of the base 180 and each extends upward. The upper ends of the support columns 190 support an X-axis movement mechanism 170. The X-axis movement mechanism 170 extends in the left-right direction and is fixed across the upper ends of the two support columns 190.

[0031] The X-axis movement mechanism 170 includes an X-axis drive guide 172 extending in the left-right direction and an X-axis motor 22 as shown in Figure 2. The X-axis drive guide 172 has a linear motion guide and a ball screw. The Z-axis movement mechanism 160 is located in front of the X-axis movement mechanism 170 and extends in the vertical direction. The Z-axis movement mechanism 160 has a nut on its back.

[0032] The nut of the Z-axis movement mechanism 160 is screwed onto the ball screw of the X-axis drive guide 172. The X-axis motor 22 rotates the ball screw of the X-axis drive guide 172. The Z-axis movement mechanism 160 is guided by the linear motion guide of the X-axis drive guide 172 and moves in the X-axis direction together with the nut.

[0033] The Z-axis movement mechanism 160 includes a Z-axis drive guide 162 extending in the vertical direction and a Z-axis motor 24 as shown in Figure 2. The Z-axis drive guide 162 has a linear motion guide and a ball screw. The spindle head 110 is positioned in front of the Z-axis movement mechanism 160 and extends in the vertical direction. The spindle head 110 has a nut on its back.

[0034] The nut on the spindle head 110 is screwed onto the ball screw of the Z-axis drive guide 162. The Z-axis motor 24 rotates the ball screw of the Z-axis drive guide 162. The spindle head 110 is guided by the linear motion guide of the Z-axis drive guide 162 and moves in the Z-axis direction together with the nut. The spindle head 110 also moves in the X-axis direction together with the Z-axis movement mechanism 160 by the X-axis movement mechanism 170.

[0035] The spindle head 110 has a spindle 111 and a spindle motor 21 as shown in Figure 2. The rotation axis Q of the spindle 111 extends in the Z-axis direction. The spindle 111 is connected to the drive shaft of the spindle motor 21 via a coupling. The spindle motor 21 is located on the top of the spindle head 110. The spindle 111 rotates driven by the spindle motor 21.

[0036] The spindle 111 has a mounting hole. The mounting hole is formed at the lower end of the spindle 111. A tool D, held in a tool holder, is mounted in the mounting hole.

[0037] The Y-axis movement mechanism 140 is positioned in the center of the upper surface of the base portion 180 and extends in the front-rear direction. The Y-axis movement mechanism 140 includes a Y-axis drive guide 142 that extends in the front-rear direction and a Y-axis motor 23 as shown in Figure 2. The Y-axis drive guide 142 has a linear motion guide and a ball screw. The workpiece support portion 120 is positioned on the upper surface of the Y-axis movement mechanism 140. The workpiece support portion 120 has a nut on its bottom surface.

[0038] The nut on the workpiece support 120 is screwed onto the ball screw of the Y-axis drive guide 142. The Y-axis motor 23 rotates the ball screw of the Y-axis drive guide 142. The workpiece support 120 is guided by the linear motion guide of the Y-axis drive guide 142 and moves in the Y-axis direction together with the nut.

[0039] The workpiece support unit 120 has a table 122 and a rotation mechanism 124. The table 122 is a base for fixing the workpiece. The rotation mechanism 124 has a support shaft 123 and an A-axis motor 25 as shown in Figure 2. The support shaft 123 is connected to the drive shaft of the A-axis motor 25 and connected to the table 122.

[0040] The rotating mechanism 124 rotates the table 122 around the A axis. The A axis is a rotation axis parallel to the X axis. By rotating the table 122, the rotating mechanism 124 can position the workpiece at an inclination relative to the tool D.

[0041] The tool magazine 130 is positioned on the upper surface of the Y-axis movement mechanism 140, behind the workpiece support 120. The tool magazine 130 moves in the Y-axis direction together with the workpiece support 120. Multiple tools D are stored in the tool magazine 130.

[0042] The tool magazine 130 has a magazine cover 134 that opens and closes the storage section for the tool D. The tool magazine 130 has a linkage mechanism that opens and closes the magazine cover 134 depending on the position in the Y-axis direction. When the workpiece support section 120 is located below the spindle head 110, the magazine cover 134 is in the closed state. When the tool magazine 130 is located below the spindle head 110, the magazine cover 134 is in the open state. The spindle head 110 can be moved in the X-axis direction and the Z-axis direction to exchange the tool D mounted on the spindle 111 with the tool D in the tool magazine 130.

[0043] Referring to Figure 2, the electrical configuration of the machine tool 100 will be explained. The machine tool 100 is equipped with a control device 10. The control device 10 includes a CPU 11, ROM 12, RAM 13, flash memory 14, and input / output interface 17. The CPU 11 provides overall control over the operation of the machine tool 100.

[0044] ROM12 stores various programs, including a path generation program. The path generation program is a program for generating a machining path R1 that moves the tool D relatively along the periphery of the workpiece during machining. RAM13 stores various data.

[0045] The flash memory 14 is a non-volatile memory that stores various data in addition to the NC program. The NC program is composed of multiple blocks. Each block contains various NC commands. NC commands are control commands. The CPU 11 can store in the flash memory 14 NC programs entered by the operator via the input section 29 of the control panel 27, as well as NC programs read from external inputs.

[0046] The machine tool 100 is equipped with a control panel 27. The control panel 27 is, for example, located on a splash cover that covers the machine tool 100.

[0047] The control panel 27 has a display unit 28 and an input unit 29. The display unit 28 displays various screens such as the setting screen and operation screen of the machine tool 100. The input unit 29 accepts various inputs related to the operation and settings of the machine tool 100. The input unit 29 and the display unit 28 are electrically connected to the input / output interface 17.

[0048] The drive circuit 31 drives the spindle motor 21. The encoder 21A is connected to the spindle motor 21 and the input / output interface 17. The encoder 21A detects the amount of rotation of the spindle motor 21 and inputs a detection signal to the CPU 11 via the input / output interface 17.

[0049] The drive circuit 32 drives the X-axis motor 22. The encoder 22A is connected to the X-axis motor 22 and the input / output interface 17. The encoder 22A detects the amount of rotation of the X-axis motor 22 and inputs the detection signal to the CPU 11 via the input / output interface 17.

[0050] The drive circuit 33 drives the Y-axis motor 23. The encoder 23A is connected to the Y-axis motor 23 and the input / output interface 17. The encoder 23A detects the amount of rotation of the Y-axis motor 23 and inputs the detection signal to the CPU 11 via the input / output interface 17.

[0051] The drive circuit 34 drives the Z-axis motor 24. The encoder 24A is connected to the Z-axis motor 24 and the input / output interface 17. The encoder 24A detects the amount of rotation of the Z-axis motor 24 and inputs the detection signal to the CPU 11 via the input / output interface 17.

[0052] The drive circuit 35 drives the A-axis motor 25. The encoder 25A is connected to the A-axis motor 25 and the input / output interface 17. The encoder 25A detects the amount of rotation of the A-axis motor 25 and inputs the detection signal to the CPU 11 via the input / output interface 17.

[0053] The spindle motor 21, X-axis motor 22, Y-axis motor 23, Z-axis motor 24, and A-axis motor 25 are all servo motors.

[0054] Next, an outline of the method for generating the machining path R1 will be described. The machining path R1 is a path for moving a deburring or polishing tool D along the periphery of a workpiece, for example, for deburring or polishing the workpiece. In generating the machining path R1, a master workpiece W that has been deburred, polished, or both is fixed to the table 122 of the machine tool 100. Also, a tool D used for deburring or polishing the workpiece is mounted in the mounting hole of the spindle 111.

[0055] As shown in Figure 3(A), the control device 10 generates a machining path R1, and therefore a reference path R0, which serves as the basis for the machining path R1, is set. The reference path R0 is generated along the periphery of the masterwork W by, for example, performing online teaching using conventional CAM software. The reference path R0 is taught by a plurality of reference points T(i), where i is a natural number. That is, the reference path R0 is the path obtained by sequentially connecting the coordinates of the reference points T(i).

[0056] The reference path R0 includes an approach point Ap and a release point Rp. The approach point Ap is the coordinate set as the position of the spindle 111 at the start of the generation of the machining path R1. The release point Rp is the coordinate set as the position of the spindle 111 at the end of the generation of the machining path R1.

[0057] Based on the path generation program, the control device 10 moves the spindle 111 along the periphery of the masterwork W according to the reference path R0. While moving the spindle 111, the control device 10 alternately performs an approaching operation and a retraction operation of the spindle 111 relative to the periphery of the masterwork W. The approaching operation is the operation in which the spindle 111 approaches the periphery of the masterwork W. The retraction operation is the operation in which the spindle 111 moves away from the periphery of the masterwork W in the retraction direction.

[0058] The peripheral portion of the master work W includes the outer and inner edges of the master work W. In other words, the machine tool 100 can deburr and polish not only the outer surface of the workpiece but also the inner surface. For example, the machine tool 100 may deburr and polish the inner and outer surfaces of a cylindrical workpiece. Alternatively, the machine tool 100 may deburr and polish the inner surface of a recess in a workpiece that has a recess.

[0059] The control device 10 determines whether the tool D has come into contact with the periphery of the masterwork W during the approach operation. The rotational speed of the spindle motor 21 changes due to the contact load when the tool D comes into contact with the masterwork W. The control device 10 obtains the amount of rotation of the spindle motor 21 detected by the encoder 21A per unit of time and calculates the rotational speed of the spindle motor 21. Based on the change in the rotational speed of the spindle motor 21, the control device 10 determines whether or not there is contact between the tool D and the masterwork W.

[0060] When the control device 10 determines that the tool D has made contact with the peripheral edge, it acquires the coordinates of the spindle 111 as acquisition point P(j), where j is a natural number. The coordinates of the spindle 111 are obtained by calculation based on the rotation amounts of the X-axis motor 22, Y-axis motor 23, and Z-axis motor 24, respectively, acquired by the encoders 22A, 23A, and 24A. For convenience, acquisition point P(j) is shown as the point on the rotation axis Q of the spindle 111 that is the closest point to the contact point when the tool D makes contact with the peripheral edge, but it is not limited to this. The coordinates of acquisition point P(j) may be any point on the spindle 111, for example, the center point of the spindle 111, or any point on the tool D mounted on the spindle 111.

[0061] As shown in Figure 3(B), the control device 10 generates a machining path R1 based on the acquired coordinates of the spindle 111, i.e., the acquired point P(j). The first acquired point P(1) is acquired as follows: The control device 10 positions the spindle 111 at the approach point Ap and moves it toward the first reference point T(1). The control device 10 acquires the coordinates of the spindle 111 when the tool D contacts the periphery of the masterwork W as the acquired point P(1).

[0062] The process of determining whether or not to terminate the acquisition of acquisition point P(j) based on the reference point T(i) is, for convenience, called the termination determination. The termination determination is made according to the remaining distance L1 between acquisition point P(j) and reference point T(i), and the remaining distance L2 between acquisition point P(j) and correction point Ta(i). Remaining distance L1 is the distance between acquisition point P(j) and the reference point T(i) corresponding to that acquisition point P(j). Remaining distance L2 is the distance between acquisition point P(j) and correction point Ta(i), which is obtained by correcting the reference point T(i) corresponding to acquisition point P(j). The correction point Ta(i) will be described later.

[0063] The control device 10 compares the remaining distance L1 with a predetermined determination distance K1. The determination distance K1 is a threshold for determining whether the next acquisition point P(j+1) can be acquired between the acquisition point P(j) and the reference point T(i), and is set to be greater than or equal to the measurement pitch Lp. Therefore, if the remaining distance L1 is greater than or equal to the predetermined determination distance K1, the control device 10 determines that the next acquisition point P(j+1) can be acquired between the acquisition point P(j) and the reference point T(i).

[0064] The control device 10 compares the remaining distance L2 with a predetermined determination distance K2. The determination distance K1 is a threshold for determining whether the next acquisition point P(j+1) can be acquired between the acquisition point P(j) and the correction point Ta(i), and is set to be greater than or equal to the measurement pitch Lp. Therefore, if the remaining distance L2 is greater than or equal to the predetermined determination distance K2, the control device 10 determines that the next acquisition point P(j+1) can be acquired between the acquisition point P(j) and the correction point Ta(i).

[0065] If the termination determination is made based solely on the remaining distance L1, the remaining distance L1 will not decrease if the teaching accuracy of the reference point T(i) is low, and the process will not terminate. Therefore, in the termination determination, the determination distance K1 is set to a level that can be determined by visual inspection, for example, a few millimeters, and the determination distance K2 is set to approximately the measurement pitch. This allows the control device 10 to terminate the process even if the teaching accuracy of the reference point T(i) is low. Therefore, in the termination determination, in addition to the remaining distance L1, the remaining distance L2 is also included in the termination determination.

[0066] Therefore, the control device 10 determines that the process is complete when the remaining distance L1 is less than the determination distance K1 and the remaining distance L2 is less than the determination distance K2. If the process is complete, the control device 10 sets the current acquisition point P(j) as the nearest acquisition point P(NB). The nearest acquisition point P(NB) is an acquisition point that is close to the reference point T(i) and where the distance between the nearest acquisition point P(NB) and the correction point Ta(i) is less than the measurement pitch Lp.

[0067] If the termination condition is met and the nearest acquisition point P(NB) is acquired, the control device 10 does not acquire acquisition point P(j+1) based on the reference point T(i). The control device 10 uses the next reference point T(i+1) on the reference path R0 as the new reference point and acquires acquisition point P(j+1) based on the reference point T(i+1). If the termination condition is not met and the nearest acquisition point P(NB) is not acquired, the control device 10 continues to acquire acquisition point P(j+1) based on the reference point T(i).

[0068] When deburring or polishing of a workpiece is to be performed, the workpiece is fixed to the table 122 of the machine tool 100. Based on a machining program corresponding to the path generation program, the control device 10 moves the spindle 111, on which the tool D is mounted, along the machining path R1 to perform machining on the workpiece.

[0069] Next, the method for generating the machining path R1 will be described in detail. The control device 10 moves the spindle 111, on which the tool D is mounted, along the outer edge of the masterwork W in the X, Y, and Z directions to generate the machining path R1. As shown in Figure 4, when the spindle 111 moves from acquisition point P(j) to the next acquisition point P(j+1), the spindle 111 passes through a retraction point U(k) by a retraction operation. Here, k is a natural number. The retraction point U(k) is calculated based on the acquisition point P(j) and the reference point T(i) corresponding to the acquisition point P(j), and is a coordinate for separating the spindle 111 from the periphery of the masterwork W.

[0070] This section explains how to set the retraction direction from the acquisition point P(j) to the retraction point U(k). As shown in Figure 4(A), in the direction of movement of the spindle 111 during machining, the magnitude of the component perpendicular to the rotation axis Q may be greater than a predetermined threshold compared to the component along the rotation axis Q. In this case, the control device 10 sets the retraction direction in the direction along plane H. Plane H is a plane that intersects the rotation axis Q among the planes containing vector V. For the sake of simplicity, in the following explanation, plane H will be assumed to be a plane along the X-axis and Y-axis directions. Vector V is a vector that points from the acquisition point P(j) to the reference point T(i) corresponding to the acquisition point P(j).

[0071] The control device 10 calculates the angle θ between the direction of vector V and the direction of the rotation axis Q of the main shaft 111. Comparing the magnitude of the component perpendicular to the rotation axis Q with the magnitude of the component along the rotation axis Q is calculated by comparing the angle θ with a predetermined determination angle θ0. The determination angle θ0 is, for example, 30 degrees. Therefore, if the angle θ is greater than the determination angle θ0, the control device 10 performs an approaching operation and a retracting operation while moving the main shaft 111 in a direction along the plane H.

[0072] As shown in Figure 5(A), the control device 10 moves the spindle 111 from the approach point Ap toward the reference point T(1), and continues moving even after passing the reference point T(1). The control device 10 acquires the position of the spindle 111 when the tool D contacts the outer edge of the masterwork W as the acquisition point P(1). The control device 10 calculates a vector V from the acquisition point P(1) toward the next reference point T(2).

[0073] The control device 10 defines the retraction direction as the direction inclined at a retraction angle δ with respect to vector V. The retraction angle δ when moving the main shaft 111 in a direction along the plane H is predetermined, for example, 60 degrees. The operator can change the retraction angle δ by input from the input unit 29. The control device 10 defines the retraction point U(1) as a position located at a predetermined retraction distance Le away from the acquisition point P(1) in the retraction direction, and moves the main shaft 111 from the acquisition point P(1) to the retraction point U(1).

[0074] The control device 10 determines a measurement point at a predetermined measurement pitch Lp away from the acquisition point P(1) in the direction of vector V. The direction from the retraction point U(1) toward the measurement point is defined as the measurement direction. The control device 10 moves the spindle 111 from the retraction point U(1) toward the measurement direction and continues moving even after passing the measurement point. The control device 10 acquires the position of the spindle 111 when the tool D contacts the outer edge of the masterwork W as the acquisition point P(2).

[0075] Thus, each time a new acquisition point P(j) is acquired, the control device 10 calculates a vector V from the acquisition point P(j) to the reference point T(i) corresponding to the acquisition point P(j). The control device 10 calculates a retraction point U(k) based on the vector V and moves the main shaft 111 to the retraction point U(k). The control device 10 calculates the measurement direction based on the retraction point U(k) and the vector V, and acquires the next acquisition point P(j+1) by moving the main shaft 111 in the measurement direction.

[0076] The control device 10 may calculate the retraction point U(k) based on the measurement pitch Lp and the retraction amount instead of the retraction distance Le. The retraction amount is the distance between the acquisition point P(j) and the retraction point U(k) in a direction perpendicular to the vector V. Alternatively, the retraction distance Le or the retraction amount, or the retraction angle δ or the measurement pitch Lp may be set so that the measurement direction is perpendicular to the vector V. In this case, the measurement direction can be set to a direction that is closer to perpendicular to the periphery of the masterwork W.

[0077] As shown in Figure 4(B), in the direction of movement of the spindle 111 during machining, the magnitude of the component perpendicular to the rotation axis Q relative to the component along the rotation axis Q may be less than or equal to a predetermined threshold. In this case, the control device 10 sets the retraction direction to one of the rotation directions I relative to vector V. Since there are insufficient conditions to set the rotation direction I to a unique direction, the retraction direction is not determined. Therefore, in the current retraction operation, the control device 10 retracts the spindle 111 in the same direction as the retraction direction in the previous retraction operation. This prevents the control device 10 from retracting the spindle 111 in the direction in which the tool D contacts the outer edge of the master work W during the current retraction operation.

[0078] Similarly to the above, the angle θ is compared with the determination angle θ0, and if the angle θ is less than or equal to the determination angle θ0, the control device 10 performs an approach operation and a retraction operation while moving the main shaft 111 in a direction along the rotation axis Q. As shown in Figure 5(B), the control device 10 moves from the acquisition point P(j) in the retraction direction of the main shaft 111 in the previous retraction operation. The retraction direction in the previous retraction operation is the retraction direction when moving from the previous acquisition point P(j-1) to the previous retraction point U(k-1).

[0079] The control device 10 calculates the retraction angle δ to move from the current acquisition point P(j) towards the previous retraction direction. When the main spindle 111 moves from the initial acquisition point P(1) in a direction along the rotation axis Q, the previous retraction direction is set to be the direction from the acquisition point P(1) towards the initial reference point T(1). When the main spindle 111 moves in a direction along the rotation axis Q, the control device 10 sets the retraction point U(k) to a position at a retraction distance Le away from the acquisition point P(j) in the direction of the calculated retraction angle δ. The control device 10 moves the main spindle 111 from the acquisition point P(j) to the retraction point U(k).

[0080] The control device 10 calculates a vector V from the acquisition point P(j) to the reference point T(i) corresponding to the acquisition point P(j). The control device 10 determines the measurement point as the position at a measurement pitch Lp away from the acquisition point P(j) in the direction of vector V. The direction from the retraction point U(k) toward the measurement point is defined as the measurement direction. The control device 10 moves the spindle 111 from the retraction point U(k) toward the measurement direction and continues moving even after passing the measurement point. The control device 10 acquires the position of the spindle 111 when the tool D contacts the outer edge of the masterwork W as the acquisition point P(j+1).

[0081] In this way, the control device 10 prevents the tool D from retracting in a direction that would cause it to contact the masterwork W by moving the spindle 111 in the retraction direction of the previous retraction operation. The control device 10 calculates the retraction point U(k) based on the direction of movement and the retraction distance Le, and moves the spindle 111 to the retraction point U(k). Each time a new acquisition point P(j) is acquired, the control device 10 calculates a vector V from the acquisition point P(j) to the reference point T(i) corresponding to the acquisition point P(j). The control device 10 calculates the measurement direction based on the retraction point U(k) and the vector V, and acquires the next acquisition point P(j+1) by moving the spindle 111 in the measurement direction.

[0082] The control device 10 corresponds to a machining method in which the workpiece is rotated around the A-axis while the spindle 111 is moved along the machining path R2 to deburr or polish the workpiece. The machining path R2 is a portion of the machining path R1, but it may also be the entirety of the machining path R1. The method for generating the machining path R2 will be described below.

[0083] As shown in Figure 6(A), the machining path R2 of the workpiece is the path generated while rotating the master workpiece W around the A axis. The table 122 is tilted at an angle Pω with respect to the reference angle when the generation of the machining path R2 begins, that is, when the first acquisition point P(A1) is acquired. The reference angle may be the rotation angle of the table 122 which serves as the rotation reference for the A axis, but for example, the axial direction of the rotation axis Q of the spindle 111 may be used as the reference. Since the master workpiece W is fixed to the table 122, the angle Pω is the rotation angle of the master workpiece W with respect to the reference angle when the acquisition point P(A1) is acquired.

[0084] The machining path R2 is generated by sequentially acquiring acquisition points P(j) toward the reference point T(A1). As shown by the dotted line in the figure, when acquisition point P(A2), which is close to the reference point T(A1), is acquired, the table 122 tilts by an angle Tω with respect to the reference angle. Since the master workpiece W is fixed to the table 122, the angle Tω is the rotation angle of the master workpiece W with respect to the reference angle when acquisition point P(A2) is acquired. Therefore, the master workpiece W is rotated by an angle (Tω-Pω) while the machining path R2 is being generated.

[0085] As shown in Figure 6(B), when acquisition point P(A3) on the machining path R2 is acquired, the angle by which the masterwork W rotates relative to the reference angle is denoted as angle ω. Acquisition point P(A3) is the acquisition point acquired after acquisition point (A1). Here, let L0 be the remaining distance from acquisition point P(A1) to reference point T(A1). The remaining distance L0 is the distance between acquisition point P(A1) and reference point T(A1). In other words, the remaining distance L0 is the remaining distance for which the generation of the machining path R2 is not yet complete.

[0086] During the approach motion, acquisition point P(A3) passes a measurement point located at a measurement pitch Lp away from acquisition point P(A1) in the direction of vector V. The main spindle 111 moves a distance of (Lp / L0) at a multiplier of the remaining distance L0 between the time acquisition point P(A1) is acquired and the time it passes the measurement point. Therefore, the angle of rotation of the masterwork W during that time is: (Tω-Pω)·(Lp / L0) ···(1) That is the case.

[0087] Therefore, from equation (1), when the acquisition point P(A3) is acquired, the angle ω by which the masterwork W rotates with respect to the reference angle is: ω=Pω+{(Tω-Pω)·(Lp / L0)} ···(2) Therefore, when acquiring the acquisition point P(j), the control device 10 controls the drive of the A-axis motor 25 so that the master workpiece W is rotated by an angle ω based on equation (2).

[0088] The control device 10 can generate the machining path R1 with greater accuracy by correcting the coordinates of the reference point T(i) when acquiring the acquisition point P(j). The robustness of the machining path R1 is ensured when the coordinates of the reference point T(i) that constitute the reference path R0 are set accurately along the periphery of the masterwork W. For example, if the reference point T(i) is further away from the periphery of the masterwork W than the measurement pitch Lp, the tool D may not be able to contact the periphery even if the spindle 111 is moved in the measurement direction. Even if the accuracy of the reference point T(i) is not guaranteed, the control device 10 can improve the robustness of the machining path R1 generation by correcting the coordinates of the reference point T(i). The method for correcting the coordinates of the reference point T(i) will be described below.

[0089] As shown in Figure 7, the control device 10 calculates a vector V1 pointing from the previous acquisition point P(j-1), which was acquired immediately before acquiring the current acquisition point P(j), to the acquisition point P(j). Vector V1 is the X, Y, and Z axis components of the vector pointing from acquisition point P(j-1) to acquisition point P(j). The control device 10 calculates a vector V2 pointing from the previous acquisition point P(j-1) to the reference point T(i) corresponding to the current acquisition point P(j). Vector V1 is the X, Y, and Z axis components of the vector pointing from acquisition point P(j-1) to reference point T(i). The control device 10 calculates a vector Va by projecting vector V2 onto vector V1.

[0090] The vector Va can be calculated using the formula for orthogonal projection vectors as follows:

number

[0091] In this way, each time a new acquisition point P(j) is acquired, the control device 10 calculates a correction point Ta(i) and calculates a vector V from the acquisition point P(j) to the correction point Ta(i). The control device 10 calculates a retraction point U(k) based on the vector V and moves the main shaft 111 to the retraction point U(k). The control device 10 calculates the measurement direction based on the retraction point U(k) and the vector V, and acquires the next acquisition point P(j+1) by moving the main shaft 111 in the measurement direction. By using the correction point Ta(i), which is obtained by correcting the reference point T(i), in the calculation of vector V, the control device 10 can acquire the acquisition point P(j+1) with high accuracy.

[0092] Incidentally, as shown in Figure 8, when the acquisition point P(j) is acquired close to the reference point T(i), the control device 10 sets a new reference point T(i+1). After the new reference point T(i+1) is set, when setting the retraction direction in the direction along the plane H, the retraction direction may be toward the periphery of the masterwork W. The control device 10 sets the retraction direction by either retracting to one side, for example, the first region on the left, or to the other side, for example, the second region on the right, in the direction of travel of the main spindle 111. The direction of travel is the direction of the vector V from the acquisition point P(j) toward the corresponding reference point T(i).

[0093] Therefore, if the direction of travel of the main shaft 111 changes due to the setting of a new reference point T(i+1), or if there is a change from a path along the outer edge to a path along the inner edge, it becomes necessary to reverse the retraction direction. Thus, the control device 10 determines the retraction direction each time a new reference point T(i+1) is set.

[0094] The control device 10 determines the retraction direction when the current acquisition point P(j) is close to the corresponding reference point T(i) and the next reference point T(i+1) has been set. First, the control device 10 moves the main shaft 111 from the current acquisition point P(j) to the previous retraction point U(k-1). The previous retraction point U(k-1) is, for example, a retraction point that moves to the first region to the left in the direction of travel of the main shaft 111.

[0095] The control device 10 calculates the current retraction point U(k) and moves the spindle 111 from the previous retraction point U(k-1) to the current retraction point U(k). If the tool D comes into contact with the periphery of the masterwork W during the movement to retraction point U(k), the control device 10 reverses the sign of the coefficient used in calculating the retraction direction. In this case, retraction point U(k) is set as, for example, a retraction point that moves to the second region to the right in the direction of travel of the spindle 111. If the tool D does not come into contact with the periphery of the masterwork W during the movement to retraction point U(k) and the spindle 111 reaches retraction point U(k), the control device 10 maintains the sign of the coefficient without reversing it. In this case, retraction point U(k) is maintained as, for example, a retraction point that moves to the left in the direction of travel of the spindle 111.

[0096] Incidentally, when a nearby acquisition point P(NB) based on the reference point T(i) is acquired and the termination is determined in the termination judgment, the control device 10 sets a new reference point T(i+1). At this time, there are cases where the next reference point T(i+1) has not been set in the reference path R0. In this case, the control device 10 moves the spindle 111 from the last acquired nearby acquisition point P(NB) to the release point Rp and terminates the generation of the machining path R1. The machining path R1 is generated by sequentially connecting the first acquisition point P(1) to the last nearby acquisition point P(NB).

[0097] Referring to Figures 9 to 12, the process of generating the machining path will be explained. The operator starts the machine tool 100, fixes the master workpiece W on the table 122, and runs the path generation program. The CPU 11 of the control device 10 reads the path generation program from the flash memory 14 and starts execution.

[0098] As shown in Figure 9, the CPU 11 reads the reference path R0 in the main processing of the path generation program (S11). As mentioned above, the reference path R0 includes a reference point T(i), an approach point Ap, and a release point Rp. The reference point T(i), approach point Ap, and release point Rp are set in advance along the periphery of the master work W and stored in the flash memory 14.

[0099] The CPU 11 moves the spindle 111 to the approach point Ap (S13). When the spindle 111 reaches the approach point Ap, the CPU 11 calculates the direction from the approach point Ap to the first reference point T(1). The CPU 11 moves the spindle 111 in the direction of the first reference point T(1) (S15). The CPU 11 continues moving even after the spindle 111 has passed the first reference point T(1), and approaches the periphery of the masterwork W. At this time, the CPU 11 drives the spindle motor 21 and rotates the tool D at a low speed.

[0100] The CPU 11 calculates the rotational speed based on the amount of rotation obtained from the encoder 21A. Based on the change in rotational speed, the CPU 11 determines whether or not the tool D has come into contact with the periphery of the masterwork W (S17). The maximum distance for approaching is preset. If the tool D completes the movement of the maximum distance without coming into contact with the periphery (S17: NO), the CPU 11 displays an error notification on the display unit 28 (S37). In this case, the CPU 11 terminates the execution of the path generation program.

[0101] If the tool D comes into contact with the peripheral edge during the approach operation in S17 (S17:YES), the CPU 11 calculates the coordinates of the spindle 111 based on the detection signals from encoders 22A, 23A, and 24A. The CPU 11 acquires the calculated coordinates as the coordinates of the first acquisition point P(1) and stores them in the flash memory 14 (S19).

[0102] The CPU 11 performs a calculation to determine whether the direction from acquisition point P(j) to the reference point T(i) corresponding to acquisition point P(j) is aligned with the rotation axis Q (S21). That is, the CPU 11 calculates a vector V from acquisition point P(j) to reference point T(i). If the current acquisition point P(j) is acquisition point P(1), the CPU 11 calculates a vector V from acquisition point P(1) to reference point T(2). The CPU 11 calculates the angle θ between the direction of vector V and the direction of the rotation axis Q.

[0103] The CPU 11 compares the angle θ with the determination angle θ0, and if θ ≤ θ0 (S23: NO), it sets the principal axis 111 to move in the direction along the rotation axis Q. That is, the CPU 11 uses the retraction direction from the previous retraction operation as the retraction direction for the current retraction operation and calculates the retraction angle δ (S27). The CPU 11 then proceeds to S29.

[0104] If θ > θ0 in S23 (S23: YES), the CPU 11 executes a U / D determination process in order to set the principal axis 111 to move in the direction along the plane H (S25).

[0105] As shown in Figure 10, in the U / D determination process, the CPU 11 moves the spindle 111 from the current acquisition point P(j) to the previous retraction point U(k-1) (S41). If the current acquisition point P(j) is the first acquisition point P(1), the CPU 11 moves the spindle 111 to the first reference point T(1) instead of the previous retraction point U(k-1). As a result, the tool D is reliably separated from the outer edge of the masterwork W and becomes non-contact.

[0106] Next, the CPU 11 calculates the coordinates of the current evacuation point U(k) (S45). As mentioned above, the CPU 11 calculates a vector V from the current acquisition point P(j) to the corresponding reference point T(i). The CPU 11 calculates the current evacuation point U(k) as the position at a predetermined evacuation distance Le in the evacuation direction, where the angle with respect to vector V is the evacuation angle δ.

[0107] In S41, the CPU 11 performs a retraction operation, moving the spindle 111 from the previous retraction point U(k-1) to the current retraction point U(k), which has been calculated (S47). This retraction operation, in which the spindle 111 moves from the previous retraction point U(k-1) to the current retraction point U(k), is performed, for example, by a cutting feed command or a skip feed command. At this time, the CPU 11 drives the spindle motor 21 to rotate the tool D at a low speed.

[0108] The CPU 11 determines whether the tool D has come into contact with the periphery of the masterwork W based on the change in rotational speed calculated from the amount of rotation obtained from the encoder 21A (S49). If the tool D comes into contact with the periphery before the spindle 111 reaches the retraction point U(k) (S49: YES), the CPU 11 multiplies the coefficient used in the calculation of the retraction direction by (-1) (S51). The sign of the coefficient is reversed. If the spindle 111 reaches the current retraction point U(k) without the tool D coming into contact with the periphery (S49: NO), the CPU 11 multiplies the coefficient used in the calculation of the retraction direction by 1 (S53). The sign of the coefficient is not reversed and is maintained.

[0109] CPU 11 finishes the U / D determination process and moves to the main process S29. As shown in Figure 9, in S29, CPU 11 performs the retraction and approach process (S29). As shown in Figure 11, in the retraction and approach process, CPU 11 performs the motion coordinate calculation process (S71). As shown in Figure 12, in the motion coordinate calculation process, CPU 11 calculates the angle ω for rotating table 122 (S101).

[0110] The angle ω is calculated based on equation (2), as described above. That is, the angle ω is the value obtained by multiplying the ratio of the remaining distance L0 from the acquisition point P(A1) to the corresponding reference point T(A1) and the measured pitch Lp by the remaining angle of rotation of the workpiece (Tω-Pω). Note that in parts where no rotation of the workpiece is set, the value of (Tω-Pω) is 0, so the angle ω is 0.

[0111] Next, CPU 11 calculates a vector V from the current acquisition point P(j) to the current reference point T(i) (S103). CPU 11 determines whether the escape point U(k) on which the calculation is performed corresponds to the first acquisition point P(j) acquired after the reference point T(i) was updated (S105). The calculation of the correction point Ta(i) requires the previous acquisition point P(j-1). Therefore, if the current acquisition point P(j) is the first acquisition point after the reference point T(i) was updated (S105: YES), the calculation of the correction point Ta(i) is omitted. In this case, CPU 11 moves the process to S111.

[0112] In S105, if the current acquisition point P(j) is the second or later acquisition point after the update of the reference point T(i) (S105:NO), the correction point Ta(i) of the reference point T(i) is calculated. As mentioned above, the correction point Ta(i) is the coordinate of the foot of the perpendicular from the reference point T(i) to the line passing through acquisition point P(j-1) and acquisition point P(j). The CPU 11 calculates the vector Va based on equation (3). The CPU 11 also calculates the correction point Ta(i) for each axis component of the vector Va (S107).

[0113] Based on the judgment result in S23, CPU 11 determines whether the movement of the main axis 111 to the retraction point U(k) is in the direction of plane H (S111). If the movement is in the direction of plane H (S111: YES), CPU 11 calculates the retraction point U(k) located at a retraction distance Le from the acquisition point P(j) in the retraction direction, based on vector Va (S113). If the acquisition point P(j) is the first acquisition point after the update of the reference point T(i), CPU 11 calculates the retraction point U(k) based on vector V. Also, if the movement in S111 is in the direction of the rotation axis Q, CPU 11 calculates the retraction point U(k) located at a retraction distance Le from the acquisition point P(j) in the direction of the previous retraction (S115).

[0114] The CPU 11 calculates the measurement direction in which the main spindle 111 moves from the retraction point U(k) to the measurement point (S117). The CPU 11 finishes the motion coordinate calculation process and moves to the retraction approach process S73.

[0115] As shown in Figure 11, during the retraction and approach process, the CPU 11 performs a retraction operation and moves the spindle 111 to the retraction point U(k) calculated in S113 or S115 (S73). The retraction operation is performed, for example, by a cutting feed command or a skip feed command. Once the spindle 111 reaches the retraction point U(k), the CPU 11 rotates the table 122 at the angle ω calculated in S101 (S75).

[0116] The CPU 11 performs an approach movement and moves the spindle 111 in the measurement direction calculated in S117 (S77). The approach movement is performed, for example, by a cutting feed command or a skip feed command. The CPU 11 continues to move the spindle 111 in the measurement direction even after it has passed the measurement point.

[0117] The CPU 11 determines whether the tool D has come into contact with the periphery of the master work W based on the change in rotational speed calculated from the amount of rotation obtained from the encoder 21A (S79). If the tool D completes the movement of the preset maximum distance without coming into contact with the periphery (S79: NO), the CPU 11 displays an error notification on the display unit 28 (S91). In this case, the CPU 11 terminates the execution of the path generation program.

[0118] If the tool D comes into contact with the peripheral edge during the approach operation in S79 (S79:YES), the CPU 11 calculates the coordinates of the spindle 111 based on the detection signals from encoders 22A, 23A, and 24A. The CPU 11 acquires the calculated coordinates as the coordinates of acquisition point P(j) and stores them in the flash memory 14 (S81).

[0119] The CPU 11 calculates the remaining distances L1 and L2 (S83). Specifically, the CPU 11 calculates the remaining distance L1 from the newly acquired acquisition point P(j) to the reference point T(i). It also calculates a correction point Ta(i) based on the newly acquired acquisition point P(j) and the previously acquired point P(j-1), and calculates the remaining distance L2 from the acquisition point P(j) to the correction point Ta(i).

[0120] CPU11 determines whether the remaining distance L1 is less than or equal to the judgment distance K1 (S85). If the remaining distance L1 is greater than or equal to the judgment distance K1 (S85: NO), CPU11 returns to processing S71 and obtains the next acquisition point P(j+1) by executing S71 to S81. If the remaining distance L1 is less than or equal to the judgment distance K1 (S85: YES), CPU11 determines whether the remaining distance L2 is less than or equal to the judgment distance K2 (S87). If the remaining distance L2 is greater than or equal to the judgment distance K2 (S87: NO), CPU11 returns to processing S71 and obtains the next acquisition point P(j+1) by executing S71 to S81.

[0121] If the remaining distance L2 is less than the judgment distance K2 (S87: YES), the newly acquired acquisition point P(j) is a proximity acquisition point P(NB) that is closer to the correction point Ta(i) than the measurement pitch Lp. In order to update the reference point T(i), the CPU 11 terminates the retraction and approach process and moves to the main process S31.

[0122] As shown in Figure 9, in S31, it is determined whether the next reference point T(i+1) is set on the reference path R0 (S31). If the next reference point T(i+1) is set on the reference path R0 (S31: YES), the CPU 11 returns to processing in S21. The CPU 11 executes S21 to S29 to acquire the acquisition point corresponding to the reference point T(i+1).

[0123] If the next reference point T(i+1) is not set in the reference path R0 (S31:NO), the CPU 11 moves the spindle 111 to the release point Rp (S33). The CPU 11 generates the machining path R1 by sequentially connecting the first acquisition point P(1) to the last nearest acquisition point P(NB) stored in the flash memory 14 (S35). The CPU 11 stores the generated machining path R1 in the flash memory 14 and terminates the execution of the path generation program.

[0124] As explained above, the direction of the vector V from the acquisition point P(j) to the reference point T(i) is the direction in which the spindle 111 moves along the reference path R0 while repeatedly performing approach and retraction movements. Let θ be the angle between the direction of vector V and the axis direction of the rotation axis Q of the spindle 111. If the angle θ is greater than the determination angle θ0, the spindle moves on the plane H intersecting the rotation axis Q while repeatedly performing approach and retraction movements. That is, the CPU 11 can acquire the acquisition point P(j) and generate the machining path R1 by moving the spindle 111 on the plane H using, for example, two axes, the X and Y axes, to perform approach and retraction movements.

[0125] If the angle θ is less than or equal to the determination angle θ0, the CPU 11 moves the spindle 111 in a direction along the rotation axis Q while repeatedly performing approach and retraction movements. The CPU 11 can generate a machining path R1 by acquiring the acquisition point P(j) while moving the spindle 111 in a direction along the rotation axis Q. When retracting the spindle 111 from the acquisition point P(j), collision between the spindle 111 and the master workpiece W can be avoided by retracting it in the same direction as the previous retraction. Therefore, the control device 10 can generate a machining path R1 for workpieces of various shapes.

[0126] The CPU 11 can rotate the master workpiece W by an angle ω during the process of moving the spindle 111 from acquisition point P(A1) to acquisition point P(A3). The angle ω is the value obtained by multiplying the ratio of the remaining distance L0 from acquisition point P(A1) to reference point T(A1) and the measured pitch Lp by the remaining angle of rotation of the workpiece (Tω-Pω). Therefore, the CPU 11 can create a machining path R1 for machining while rotating the workpiece relative to the spindle 111. Thus, the control device 10 can generate a machining path R1 for workpieces of various shapes.

[0127] The retraction direction from acquisition point P(j) to retraction point U(k) is defined by the retraction angle δ. Therefore, if the reference point T(i) is far from the periphery of the masterwork W, the direction in which the spindle 111 approaches the periphery during the approach movement will be close to the direction along the edge of the periphery. In this case, the spindle 111 will be less likely to contact the periphery during the approach movement. If acquisition point P(j) cannot be acquired, it becomes difficult to generate the machining path R1.

[0128] The CPU 11 then calculates a corrected point Ta(i) by correcting the reference point T(i) based on the previously acquired acquisition point P(j-1) and the current acquisition point P(j). The corrected point Ta(i) is the coordinate of the foot drawn from the reference point T(i) on the line connecting acquisition points P(j-1) and acquisition point P(j), and is close to the periphery of the master work W. Therefore, the spindle 111 will make more reliable contact with the periphery during the approach operation, so the CPU 11 can acquire the next acquisition point P(j+1) more reliably and generate the machining path R1. Thus, the control device 10 can generate a machining path R1 for workpieces of various shapes.

[0129] The machining path R1 follows various paths along the outer or inner edge of the workpiece. Therefore, the retraction direction of the spindle 111 from the master workpiece W is a mixture of approaches and movements toward the master workpiece W, depending on the direction of movement of the spindle 111 relative to the master workpiece W. When the CPU 11 moves the spindle 111 from acquisition point P(j) to retraction point U(k), it returns the spindle 111 to the previous retraction point U(k-1) before moving it to the next retraction point U(k). At this time, the CPU 11 can set the retraction direction depending on whether or not the tool D comes into contact with the master workpiece W. Thus, the control device 10 can generate machining paths R1 for workpieces of various shapes.

[0130] The CPU 11 can set the retraction direction each time the reference point T(i), which is the target point for the movement of the spindle 111, is updated. Therefore, the CPU 11 can generate the machining path R1 in a shorter time compared to when the retraction direction is set each time. In addition, by setting the retraction direction when the reference point T(i) is updated, the CPU 11 can follow changes in the retraction direction and generate a more accurate machining path R1. Thus, the control device 10 can generate machining paths R1 for workpieces of various shapes.

[0131] In the above description, the process in S77 is an example of the first movement process of the present invention. The process in S79 is an example of the first determination process of the present invention. The process in S81 is an example of the acquisition process of the present invention. The process in S73 is an example of the second movement process of the present invention. The CPU 11 is an example of the control unit of the present invention.

[0132] Control device 10 is an example of a numerical control device of the present invention. The processes in S25, S27, and S71 are an example of a determination process of the present invention. The process in S23 is an example of a second determination process of the present invention. The processes in S113 and S115 are an example of a first setting process of the present invention.

[0133] The S75 process is an example of the rotation process of the present invention. Acquisition point P(A1) is an example of the first acquisition point of the present invention. Reference point T(A1) is an example of the corresponding reference point of the present invention. Acquisition point P(A2) is an example of the second acquisition point of the present invention. Acquisition point P(A3) is an example of the third acquisition point of the present invention. The measurement point is an example of an intersection of the present invention.

[0134] The process in S107 is an example of the correction process of the present invention. The retraction point U(k-1) is an example of the immediate retraction point of the present invention. The process in S41 is an example of the third movement process of the present invention. The retraction point U(k) is also an example of the current retraction point of the present invention. The process in S47 is an example of the fourth movement process of the present invention.

[0135] The process in S49 is an example of the third determination process of the present invention. The processes in S51 and S53 are an example of the second setting process of the present invention. The acquired point P(NB) is an example of a nearby acquired point of the present invention. The processes in S85 and S87 are an example of the fourth determination process of the present invention.

[0136] The present invention is not limited to the above embodiments, and various modifications can be made. The combination of the spindle head 110 and workpiece support unit 120 and the X-axis moving mechanism 170, Z-axis moving mechanism 160, and Y-axis moving mechanism 140 is not limited to the embodiments and can be changed as appropriate. For example, the spindle head 110 may be moved by the X-axis moving mechanism 170, Z-axis moving mechanism 160, and Y-axis moving mechanism 140, and the workpiece support unit 120 may be fixed to the base unit 180. Alternatively, the spindle head 110 may be moved by the Z-axis moving mechanism 160, and the workpiece support unit 120 may be moved by the X-axis moving mechanism 170 and Y-axis moving mechanism 140. That is, the control device 10 may generate a machining path R1 by moving the spindle 111 and the master workpiece W relatively in the X-axis, Y-axis, and Z-axis directions.

[0137] Whether or not tool D and masterwork W are in contact was determined based on the change in the rotational speed of the spindle motor 21, but the method of contact detection is not limited to this. For example, a torque detector may be connected to the spindle motor 21, and the presence or absence of contact may be determined based on the change in the torque of the spindle motor 21. Alternatively, a torque detector may be connected to each of the X-axis motor 22, Y-axis motor 23, and Z-axis motor 24, and the presence or absence of contact may be determined based on the change in the torque of each motor. Alternatively, a force-detecting sensor may be placed on the fixed part of the spindle 111, and the presence or absence of contact may be determined based on the detection result of the force applied to the spindle 111 due to contact. Alternatively, the masterwork W may be grounded, a voltage may be applied to the spindle 111, and the presence or absence of contact may be determined based on the detection result of the current flowing when contact occurs.

[0138] The direction in which the main shaft 111 moves by alternately performing retraction and approach movements was determined based on the result of comparing the angle θ with the determination angle θ0. However, the direction of movement of the main shaft 111 may also be determined based on the result of comparing the magnitude of the directional component perpendicular to the rotation axis Q with a threshold value relative to the magnitude of the directional component along the rotation axis Q.

[0139] The angle ω is the angle by which the masterwork W rotates relative to the reference angle when acquisition point P(A3) is acquired. For example, the angle ω may be defined as the angle by which the masterwork W rotates per measurement pitch Lp, and the masterwork W may rotate by angle ω each time a new acquisition point P(k) is acquired.

[0140] The calculation of the correction point Ta(i) may be omitted, and the acquisition point P(k+1) may be acquired according to the reference point T(i). The evacuation point U(k) was calculated based on the evacuation angle δ and the evacuation distance Le. However, the evacuation point U(k) may be set to a position obtained by moving a predetermined distance from the acquisition point P(j) in a direction perpendicular to vector V, and then moving from that position by a measured pitch Lp in the direction of vector V. The plane H may be a plane that contains vector V and intersects the rotation axis Q, and whose intersection angle with the rotation axis Q is right or close to right. [Explanation of Symbols]

[0141] 10 Control device 11 CPU 100 Machine tools 111 Spindle 122 Tables 123 Support shaft D Tool H plane L0 remaining distance L1 remaining distance L2 remaining distance Lp measurement pitch P(j) Points obtained P(NB) Proximity acquisition points P(A1) 1st score P(A2) 2nd point obtained P(A3) 3rd point obtained Q Rotation axis R0 Reference Path R1 Processing Route Rp release point T(i) Reference point Ta(i) correction point Pω, Tω, ω angles U(k) Evacuation point V Vector W Masterwork θ angle θ0 determines the angle

Claims

1. A first movement process involves performing an approach operation to bring the spindle on which the tool is mounted closer to the peripheral edge of the masterwork along a reference path determined based on a plurality of reference points set along the outer or inner edge of the masterwork, A first determination process for determining whether the tool came into contact with the peripheral edge during the approach operation by the first movement process, If the first determination process determines that the tool has come into contact with the peripheral edge, an acquisition process is performed to acquire the coordinates of the main spindle as acquisition points, After the acquisition point is acquired by the acquisition process, a second movement process is performed to retract the main shaft in a predetermined retraction direction. It includes a control unit that performs the following: In a numerical control device that generates a machining path for the spindle based on a plurality of acquired points obtained by repeatedly performing the approach operation and the retraction operation, the control unit generates a machining path for the spindle. After the acquisition point is acquired by the acquisition process, the control unit executes a determination process to determine the retraction direction. The aforementioned decision process is, The angle θ between the direction of the vector from the acquisition point to the reference point and the axial direction from which the rotation axis of the main shaft extends is a predetermined determination angle θ. 0 A second determination process to determine whether it is greater than or not, The second determination process determines that the angle θ is the determination angle θ 0 If it is determined to be greater, the direction toward a retraction point away from the masterwork at a position on a plane that includes the vector and intersects in the axial direction is set as the retraction direction, and the angle θ determined by the second determination process is the determination angle θ 0 If the following is determined, a first setting process is performed to set the direction in which the spindle retracted from the masterwork during the previous retraction operation as the retraction direction. including A numerical control device characterized by the following.

2. The masterwork is configured to be rotatable by a support shaft, and the masterwork is rotatable relative to the main spindle by the rotation of the spindle axis, the support shaft of the masterwork, or both. When the relative angle of the support shaft with respect to the rotation axis of the main spindle at the acquisition point is taken as the reference angle, the control unit performs a rotation process to rotate the masterwork by an angle ω relative to the reference angle during the approach operation in the first movement process as the main spindle moves from the acquisition point to the reference point. When the main axis moves from a first acquisition point, which is one of the acquisition points, to a second acquisition point, which is close to the corresponding reference point among the plurality of reference points that corresponds to the first acquisition point, and then moves to a third acquisition point that is acquired after the first acquisition point, When the spindle is located at the first acquisition point, the angle by which the masterwork rotates relative to the reference angle is Pω. When the spindle reaches the second acquisition point, the angle by which the masterwork rotates relative to the reference angle is Tω. The distance from the first acquisition point to the corresponding reference point is L0, Lp In that case, The aforementioned angle ω is, ω=Pω+{(Tω-Pω)・(Lp / L0)} Satisfying the conditions A numerical control device according to claim 1, characterized by the following:

3. The aforementioned decision process is, The process includes a correction process that corrects the position of the reference point based on the current acquisition point and the acquisition point acquired immediately before acquiring the current acquisition point. A numerical control device according to claim 1, characterized by the following:

4. The control unit, A third movement process that moves the main shaft from the current acquisition point to the immediate retraction point, which is the retraction point immediately before acquiring the current acquisition point, A fourth movement process is performed to move the main spindle from the previous retraction point to the current retraction point, which is the retraction point corresponding to the current acquisition point, after the movement of the main spindle to the previous retraction point by the third movement process. A third determination process determines whether the tool came into contact with the peripheral edge when the spindle moved to the current retraction point by the fourth movement process. Execute, The aforementioned decision process is, The third determination process determines that the tool has come into contact with the peripheral edge, and the retraction direction is set to a direction from the acquisition point toward a second region opposite to the first region where the retraction point is located on the plane with respect to the vector; and the third determination process determines that the tool has not come into contact with the peripheral edge, and the retraction direction is set to a direction from the acquisition point toward the first region, including a second setting process. A numerical control device according to claim 1, characterized by the following:

5. The control unit performs a fourth determination process to determine whether the spindle has reached the nearby acquisition point during the process of moving from the acquisition point toward the nearby acquisition point which is close to the reference point corresponding to the acquisition point. In the aforementioned decision process, If the fourth determination process determines that the main shaft has reached the proximity acquisition point, the second setting process sets the retraction direction. The numerical control device according to claim 4, characterized by the above.

6. To control a machine tool equipped with a spindle for mounting tools, A first movement step involves performing an approach operation to bring the spindle closer to the peripheral edge of the masterwork along a reference path determined based on a plurality of reference points set along the outer or inner edge of the masterwork, A first determination step to determine whether the tool has come into contact with the peripheral edge during the approach movement by the first movement step, If the first determination step determines that the tool has come into contact with the peripheral edge, the acquisition step involves acquiring the coordinates of the main spindle as acquisition points, After the acquisition point is acquired in the acquisition step, a second movement step is performed to retract the main shaft in a predetermined retraction direction. Equipped with, A control method for a numerical control device that generates a machining path for the spindle based on a plurality of acquired points obtained by repeatedly performing the approaching operation and the retracting operation, After the acquisition point is acquired by the acquisition step, the system includes a determination step for determining the retraction direction. The aforementioned decision step is, The angle θ between the direction of the vector from the acquisition point to the reference point and the axial direction from which the rotation axis of the main shaft extends is a predetermined determination angle θ. 0 A second determination step to determine whether it is greater than or not, The second determination step determines that the angle θ is the determination angle θ 0 If it is determined to be greater, the direction toward a retraction point away from the masterwork at a position on a plane that includes the vector and intersects in the axial direction is set as the retraction direction, and the angle θ determined in the second determination step is the determination angle θ 0 If the following is determined, the first setting step is to set the direction in which the spindle retracted from the masterwork during the previous retraction operation as the retraction direction. including A control method characterized by the following.

7. A first movement step involves an approach operation in which the spindle on which the tool is mounted is brought closer to the peripheral edge of the masterwork along a reference path determined based on a plurality of reference points set along the outer or inner edge of the masterwork, A first determination step in which it is determined whether or not the tool has come into contact with the peripheral edge during the approach movement by the first movement step, If the first determination step determines that the tool has come into contact with the peripheral edge, the acquisition step is performed in which the coordinates of the spindle are acquired as acquisition points, After the acquisition point is acquired in the acquisition step, a second movement step is performed in which a retraction operation is carried out to retract the main shaft in a predetermined retraction direction. A program for generating a machining path for the spindle, which is performed by causing the computer of a numerical control device to execute the above and control the machine tool equipped with the spindle, based on a plurality of acquired points obtained by repeatedly performing the approaching operation and the retracting operation, To the aforementioned computer, After the acquisition point is acquired by the acquisition step, the determination step for determining the retraction direction is executed. In the aforementioned decision step, The angle θ between the direction of the vector from the acquisition point to the reference point and the axial direction from which the rotation axis of the main shaft extends is a predetermined determination angle θ. 0 A second determination step to determine whether it is greater than or not, the angle θ in the second determination step is the determination angle θ 0 if it is determined that the angle is larger, the direction from the acquisition point toward a retraction point that is on a plane including the vector and intersecting the axial direction and away from the master workpiece is set as the retraction direction, and in the second determination step, the angle θ is the determination angle θ 0 if it is determined that the angle is equal to or less than the determination angle, a first setting step of setting, as the retraction direction, the direction in which the spindle retracted from the master workpiece in the previous retraction operation Make it happen A program characterized by the following.

8. A first movement step involves performing an approach operation to bring the spindle on which the tool is mounted closer to the peripheral edge of the masterwork along a reference path determined based on a plurality of reference points set along the outer or inner edge of the masterwork, A first determination step to determine whether the tool has come into contact with the peripheral edge during the approach movement by the first movement step, If the first determination step determines that the tool has come into contact with the peripheral edge, the acquisition step involves acquiring the coordinates of the main spindle as acquisition points, After the acquisition point is acquired in the acquisition step, a second movement step is performed to retract the main shaft in a predetermined retraction direction. A storage medium that stores a program for generating a machining path for the spindle based on a plurality of acquired points obtained by repeatedly performing the approaching operation and the retracting operation, by causing the computer of the numerical control device to execute the command and control the machine tool equipped with the spindle, To the aforementioned computer, After the acquisition point is acquired by the acquisition step, the determination step for determining the retraction direction is executed. In the aforementioned decision step, The angle θ between the direction of the vector from the acquisition point to the reference point and the axial direction from which the rotation axis of the main shaft extends is a predetermined determination angle θ. 0 A second determination step to determine whether it is greater than or not, The second determination step determines that the angle θ is the determination angle θ 0 If it is determined to be greater, the direction toward a retraction point away from the masterwork at a position on a plane that includes the vector and intersects in the axial direction is set as the retraction direction, and the angle θ determined in the second determination step is the determination angle θ 0 If the following is determined, the first setting step is to set the direction in which the spindle retracted from the masterwork during the previous retraction operation as the retraction direction. A program to execute A storage medium characterized by its ability to store data.

Citation Information

Patent Citations

  • Machine tool, processing route generation method, and computer program

    JP2023051252A