Machine tool control device, control system and control method

By calculating and realizing the phase with the shortest phase alignment time in the polygon processing control device, the phase alignment control method is used to solve the problem of long phase alignment time in polygon processing, which significantly improves the efficiency of polygon processing.

CN115315327BActive Publication Date: 2024-10-01FANUC LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202180023539.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-03-26
Filing Date
2021-03-24
Publication Date
2024-10-01
Estimated Expiration
2041-03-24

AI Technical Summary

Technical Problem

In polygon processing, the existing technology requires the workpiece axis and the tool axis to temporarily stop or accelerate or decelerate to achieve phase alignment, resulting in a long phase alignment time, especially when the phase difference is large.

Method used

By implementing rotational phase calculation, machinability phase calculation, and optimal phase calculation before phase alignment in the control device, the phase that takes the shortest time to align the phases is determined, and the workpiece axis and tool axis are controlled based on this. rotation to shorten phase alignment time.

Benefits of technology

In polygon processing, the time required for phase alignment is significantly shortened and processing efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115315327B_ABST
    Figure CN115315327B_ABST
Patent Text Reader

Abstract

In polygon machining equipment with multiple tools, the time required for phase alignment is shortened. In polygon machining phase alignment, the phase (R CURRENT ) and the phase command value that can be processed (R NEW (n)), while considering the phase alignment method, the maximum speed and other restrictions, the new phase command value (R') is calculated. NEW By making the phase equal to the new phase command value (R' NEW ) alignment, which can shorten the time required for phase alignment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a control device, a control system and a control method for controlling polygon processing performed by a tool having a plurality of cutters. Background Art

[0002] In the past, there was polygonal machining in which the outer surface of a workpiece was machined into a polygon by rotating the tool and the workpiece at a fixed ratio. In polygonal machining, the number of tools and the rotation ratio of the tool axis and the workpiece axis are adjusted to machine the surface of the workpiece into a polygonal shape. For example, when the number of tools mounted on the tool axis is 2 and the rotation ratio of the workpiece axis to the tool axis is 1:2, the tool axis rotates 2 times during the period when the workpiece axis rotates 1 time, and the 2 tools cut 2 places respectively, for a total of 4 places, and the outer surface of the workpiece is a quadrilateral. When the number of tools mounted on the tool axis is 3 and the rotation ratio of the workpiece axis to the tool axis is 1:2, the outer surface of the workpiece is a hexagon.

[0003] In a machine tool that performs polygon processing, the workpiece axis and the tool axis are sometimes phase-aligned for accurate cutting. For example, when the workpiece is roughly processed and then the rotation speed is changed for fine processing, or when processing is performed in a manner that forms the vertices of a polygon at a specific position on the side of the workpiece, or when the workpiece and the tool are temporarily separated and then reprocessed from another position, the workpiece axis and the tool axis need to be rotated in a manner that becomes a fixed phase (relative angle) (for example, when the workpiece axis is 0 degrees, the tool axis must also rotate in a manner that becomes 90 degrees).

[0004] For example, Fig.11A As shown in FIG. 1 , when machining both ends of a workpiece into a hexagon, it is necessary to align the positions of the machining surface on one end with the machining surface on the other end. Fig. 11B As shown in Figure 1, the machined surface deviates. In cases where phase alignment is required, such as Fig. 11C As shown, machining begins after the phases of the workpiece axis and the tool axis are aligned.

[0005] Patent Document 1 states that “polygonal machining that requires alignment of the outer peripheral surface of the workpiece W with a predetermined positional relationship can be easily performed simply by stopping the spindle at a predetermined fixed point such as the spindle origin.”

[0006] Patent Document 1: Japanese Patent Application Publication No. 2014-188660 Summary of the invention

[0007] Problems to be solved by the invention

[0008] The technique described in Patent Document 1 is a technique for synchronizing the phases of a plurality of machining operations by stopping a tool at a predetermined position. However, in the technique of Patent Document 1, it is necessary to temporarily stop the tool.

[0009] When the phase alignment is performed while the workpiece axis and the tool axis are rotating, the phase is shifted by accelerating or decelerating the workpiece axis or the tool axis. Fig. 9A as well as Fig. 9B As shown, increasing the amount of phase shift increases the time required for phase alignment.

[0010] In a polygon processing apparatus having a plurality of tools, a technique for shortening the time required for phase alignment is desired.

[0011] Means for solving problems

[0012] A control device for controlling a machine tool in one embodiment of the present invention comprises a first axis for rotating a tool having a plurality of tools and a second axis for rotating a workpiece, and the first axis and the second axis are rotated simultaneously to perform polygonal machining, the control device comprising: a machining setting storage unit for storing the number of tools; a current phase calculation unit for calculating the phases of the rotating first axis and the second axis before phase alignment; a machinable phase calculation unit for calculating the phase specified by a machining program and the phase when the angle of the first axis is offset from the phase specified by the machining program by the interval of a plurality of tools; an optimal phase calculation unit for finding the phase with the shortest time required to align the phases from the plurality of phases calculated by the machinable phase calculation unit; and a phase alignment control unit for controlling the first axis and the second axis to rotate in a manner aligned with the phase calculated by the optimal phase calculation unit.

[0013] A control system for a machine tool in one embodiment of the present invention comprises a first axis for rotating a tool having a plurality of tools and a second axis for rotating a workpiece, and the first axis and the second axis are rotated simultaneously to perform polygon processing, the control system comprising: a processing setting storage unit for storing the number of the tools; a current phase calculation unit for calculating the phases of the rotating first axis and the second axis before phase alignment; a machinable phase calculation unit for calculating the phase specified by a processing program and the phase when the angle of the first axis is offset from the phase specified by the processing program by the interval of a plurality of tools; an optimal phase calculation unit for finding the phase with the shortest time required to align the phases from the plurality of phases calculated by the machinable phase calculation unit; and a phase alignment control unit for controlling the first axis and the second axis to rotate in a manner aligned with the phase calculated by the optimal phase calculation unit.

[0014] The present invention discloses a control method for controlling a machine tool, which has a first axis for rotating a tool having multiple tools and a second axis for rotating a workpiece, and the first axis and the second axis are rotated simultaneously to perform polygon processing, and the control method performs the following control: storing the number of tools; calculating the phase before phase alignment of the first axis and the second axis based on the current position of the first axis, the current position of the second axis, and the rotation ratio instructed by a processing program; calculating multiple phases that can be processed based on the rotation ratio specified by the processing program, the phase instruction value specified by the processing program, and the number of tools; calculating the optimal phase with the shortest time required to change the phase of the first axis and the second axis based on the difference between the phase before phase alignment and the phase that can be processed; and performing phase alignment of the first axis and the second axis based on the optimal phase.

[0015] Effects of the Invention

[0016] According to one aspect of the present invention, in a polygon machining device having a plurality of tools, the time required for phase alignment can be shortened. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a hardware structure diagram of the numerical control device in the present disclosure.

[0018] Figure 2 It is a block diagram of the numerical control device in the present disclosure.

[0019] Figure 3 This is a diagram when the tool axis is temporarily decelerated and phase alignment is performed.

[0020] Figure 4 This is a diagram when the workpiece axis is temporarily accelerated and phase alignment is performed.

[0021] Figure 5 2 is a diagram showing phase alignment of polygon processing according to the present disclosure.

[0022] Figure 6 This is a diagram showing the relationship between the current position X of the workpiece, the current position Y of the tool, and the number T of tools.

[0023] Figure 7 is a flow chart illustrating the phase alignment method of the present disclosure.

[0024] Figure 8 is the new phase command value R' NEW The calculation process is described in the flowchart.

[0025] Fig. 9A This is a diagram for explaining conventional phase alignment.

[0026] Fig. 9B This is a diagram for explaining conventional phase alignment.

[0027] Fig. 10A It is a diagram for explaining the phase alignment of the present disclosure.

[0028] Fig. 10B It is a diagram for explaining the phase alignment of the present disclosure.

[0029] Fig. 10C This is a diagram for explaining the phase alignment of the present disclosure.

[0030] Fig.11A This is a diagram for explaining the necessity of phase alignment in polygon processing.

[0031] Fig. 11B This is a diagram for explaining the necessity of phase alignment in polygon processing.

[0032] Fig. 11C This is a diagram for explaining the necessity of phase alignment in polygon processing. DETAILED DESCRIPTION

[0033] An embodiment in which the control device of the present disclosure is mounted on a numerical controller 100 will be described below.

[0034] Figure 1 It is a hardware configuration diagram of a numerical control device 100 according to an embodiment.

[0035] The CPU 111 included in the numerical controller 100 of the present embodiment is a processor that controls the entire numerical controller 100. The CPU 111 reads a system program stored in the ROM 112 via the bus 120, and controls the entire numerical controller 100 according to the system program. The RAM 113 temporarily stores temporary calculation data, display data, various data input by the operator via the input unit 30, and the like.

[0036] The nonvolatile memory 114 is composed of, for example, a memory backed up by a battery (not shown), an SSD (Solid State Drive), etc. Even if the power of the numerical control device 100 is turned off, the nonvolatile memory 114 maintains the storage state. The program read from the external device 72 via the interface 115 and the program input via the input unit 30 are stored in the nonvolatile memory 114. In addition, various data obtained from various parts of the numerical control device 100, machine tools, etc. (for example, setting parameters obtained from machine tools, etc.) are stored in the nonvolatile memory 114. The programs and various data stored in the nonvolatile memory 114 can also be expanded in the RAM 113 when executed / used. In addition, various system programs such as well-known analysis programs are written in advance to the ROM 112.

[0037] The interface 115 is an interface for connecting the numerical control device 100 and an external device 72 such as an adapter. Programs, various parameters, etc. are read from the external device 72. In addition, programs, various parameters, etc. edited in the numerical control device 100 can be stored in an external storage unit via the external device 72. The PLC (Programmable Logic Controller) 116 controls the numerical control device 100 by inputting and outputting signals with devices such as machine tools, robots, and sensors installed in the machine tools and robots through the I / O unit 117 using the sequence program built into the numerical control device 100.

[0038] The data read into the memory and the data obtained as a result of executing the program are outputted via the interface 118 and displayed on the display unit 70. The input unit 30 composed of MDI, operation panel, touch panel, etc. transfers the instructions and data based on the operator's operation to the CPU 111 via the interface 119.

[0039] The axis control circuit 130 for controlling each axis of the machine tool receives the axis movement command from the CPU 111 and outputs the axis command to the servo amplifier 140. The servo amplifier 140 receives the command and drives the servo motor 150 for moving the axis of the machine tool. The servo motor 150 of the axis has a built-in position / speed detector, and the position / speed feedback signal from the position / speed detector is fed back to the axis control circuit 130 to perform position / speed feedback control. Figure 1 The hardware structure diagram of FIG. 1 shows only one axis control circuit 130, servo amplifier 140, and servo motor 150, but in fact, a number corresponding to the number of axes of the machine tool to be controlled is prepared. Figure 2 ) shows an example in which there are at least two servo motors for the workpiece axis and the tool axis.

[0040] The spindle control circuit 160 receives a spindle rotation command for rotating the spindle of the machine tool, and outputs a spindle speed signal to the spindle amplifier 161. The spindle amplifier 161 receives the spindle speed signal and rotates the spindle motor 162 of the spindle at the commanded rotation speed. The spindle motor 162 is coupled to a position encoder 163, and the position encoder 163 outputs feedback pulses in synchronization with the rotation of the spindle. The output feedback pulses are read by the CPU 111.

[0041] Figure 2 1 is a block diagram of a numerical control device 100 as one embodiment of the present disclosure. The numerical control device 100 includes a current phase calculation unit 11, a machinable phase calculation unit 12, an optimal phase calculation unit 13, a program analysis unit 41, a phase alignment control unit 20, an axis control unit 30, a machining setting storage unit 40, a machining data storage unit 50, and a machining program storage unit 42.

[0042] The numerical control device 100 is connected to a machine tool for polygon processing. The machine tool for polygon processing has a tool axis as a first axis and a workpiece axis as a second axis. A workpiece is mounted on the workpiece axis, and a tool is mounted on the tool axis. A servo motor 150 is mounted on the tool axis and the workpiece axis, and a servo amplifier 140 performs phase alignment of the servo motor 150 according to a command from a phase alignment control unit 20.

[0043] The machining setting storage unit 40 stores the number T of tools attached to the tool shaft.

[0044] The program analysis unit 41 extracts the rotation ratio P:Q between the workpiece and the tool and the phase command value R (angle) from the machining program. The phase command value R is a command for specifying the phase difference between the tool axis and the workpiece axis.

[0045] The positions (angles) of the workpiece axis and the tool axis during machining are stored in the machining data storage unit 50. The positions of the workpiece axis and the tool axis are fed back from the servo amplifier 140.

[0046] The current phase calculation unit 11 calculates the phase R of the workpiece axis and the tool axis before phase alignment based on the current position X of the workpiece axis and the current position Y of the tool axis stored in the processing data storage unit 50 and the rotation ratio output from the program analysis unit 41. CURRENT .

[0047] The machinable phase calculation unit 12 calculates the phase difference between the workpiece axis and the tool axis that satisfies the machinable condition based on the number of tools T stored in the machining setting storage unit 40, the rotation ratio output from the program analysis unit 41, and the phase command value. The phase difference that satisfies the condition is the same as the number of tools.

[0048] The optimum phase calculation unit 13 calculates the change amount when the phase of the workpiece axis and the tool axis is changed to a phase difference that satisfies the processing condition while considering whether the workpiece axis and the tool axis can be accelerated or decelerated respectively. The optimum phase calculation unit 13 determines a new phase command value based on the phase difference that minimizes the change amount when the phase is changed.

[0049] The phase alignment control unit 20 outputs the movement amounts of the workpiece axis and the tool axis to the axis control unit 30 based on the current position X of the workpiece axis and the current position Y of the tool axis stored in the processing data storage unit 50 and the new phase command value calculated by the optimal phase calculation unit 13 .

[0050] The axis control unit 30 outputs axis movement commands to the tool axis and the workpiece axis. The servo motor 150 controls the tool axis and the workpiece axis according to the axis movement commands. Position information X and Y of the tool axis and the workpiece axis are fed back to the numerical controller 100.

[0051] In the polygon processing of the present disclosure, a new phase command value is calculated and polygon processing is performed with the phase command value. Phase alignment is performed with the phase command value that minimizes the amount of change when the phase changes, thereby shortening the time required for phase alignment.

[0052] Hereinafter, the phase alignment of polygon processing of the present disclosure will be described in comparison with the phase alignment of conventional polygon processing.

[0053] [Existing Phase Alignment]

[0054] Figure 3 , 4 FIG. 1 shows the time change of the tool axis when phase alignment is performed in conventional polygon machining. Figure 3 This is a diagram when the tool axis is decelerated and phase alignment is performed. Figure 4 These are diagrams when the workpiece axis is accelerated and phase aligned. In these diagrams, the solid line shows the actual tool axis angle. The dotted line shows the tool axis angle during phase alignment calculated based on the rotation ratio, the phase command value, and the actual angle of the workpiece axis.

[0055] Conventionally, the phases of the workpiece axis and the tool axis are aligned with the phase determined by the phase command value by accelerating or decelerating at least one of the workpiece axis and the tool axis from the commanded rotation speed.

[0056] [Overview of Phase Alignment of the Present Disclosure]

[0057] Figure 5 The phase alignment of the polygon machining of the present disclosure is shown. In the polygon machining of the present disclosure, the phase difference between the workpiece axis and the tool axis that satisfies the machining conditions is calculated. Figure 5 The three dotted lines in FIG. 1 show the angle of the tool axis when the phase matches the phase command value commanded by the machining program, and the angle of the tool axis when the angle is deviated from the phase command value by the tool interval. Figure 5 In the example, set the number of tools to 3.

[0058] exist Figure 5 In the example, the actual tool axis is temporarily decelerated to align with the phase when the tool axis angle deviates 240 degrees from the phase when the phase is consistent with the phase command value instructed by the machining program. By selecting a phase command value that reduces the amount of phase change, the time required for phase alignment can be shortened.

[0059] [Description of Phase Alignment of the Present Disclosure]

[0060] The phase alignment of the present disclosure is specifically described. As a premise, the rotation ratio P:Q is defined as the tool axis rotating Q times during the period when the workpiece axis rotates P times. In addition, the rotation ratio P:Q and the phase command value R are specified. When the current position of the workpiece axis is set to X and the current position of the tool axis is set to Y in the phase-matched state, the workpiece axis and the tool axis rotate at the specified rotation speed so that X and Y always satisfy the following mathematical formula 1.

[0061] [Formula 1]

[0062]

[0063] In the above formula, any angle A is equal to an angle obtained by adding a numerical value that is an integral multiple of 360 to A.

[0064] Before the phase alignment is performed, the workpiece axis and the tool axis satisfy the rotation ratio P:Q and rotate at the commanded rotation speed.

[0065] In the following description, the origin (zero point) of the axis is the position indicated by the arrow at the top of the drawing. The position on the axis is rounded to zero every time the axis rotates once (over 360°).

[0066] In the position alignment of the present disclosure, first, the phase R between the workpiece axis and the tool axis before phase alignment is calculated. CURRENT .

[0067] When the current position of the workpiece axis is X and the current position of the tool axis is Y, the above phase R CURRENT The calculation can be performed using Math Formula 22 as follows.

[0068] [Formula 2]

[0069]

[0070] When there are multiple tools, when the tools are rotated at intervals between the tools, only the order of the tools is changed, and the positions of the tools do not change. Therefore, even if the tool axis is shifted from the phase-matched state to the tool interval state, the same processing result as the phase-matched state is obtained. When the number of tools is set to T, the phase of the processing result specified by the phase command value is expressed as follows according to Mathematical Formula 1.

[0071] [Formula 3]

[0072]

[0073] According to the above formula 3, the phase command value R in formula 1 can be replaced by the phase command value R as shown in the following formula 4: NEW (n).

[0074] [Formula 4]

[0075]

[0076] According to the processable phase command value R obtained in equation 4 NEW The phase R between the workpiece axis and the tool axis before phase alignment obtained in equation 2 in (n) is CURRENT , calculate the new phase command value R' that minimizes the phase change during phase alignment NEW , and is used in the phase alignment control unit 20.

[0077] Regarding the amount of phase change, for example, when the workpiece axis and the tool axis can be freely controlled, the difference between the phase command values ​​before and after phase alignment is the smallest. In addition, when the tool axis can only be temporarily decelerated to change the phase, the phase R can be changed by only CURRENT Therefore, the phase command value closest to the above direction can minimize the phase change.

[0078] [Calculation Example of Phase Alignment in the Present Disclosure]

[0079] The phase alignment of the present disclosure is described using actual numerical values. The machining setting storage unit 40 stores the number of tools T=3. In the machining program, the rotation ratio is set to 1:2, and the phase command value R=60 is commanded. The current position of the workpiece axis before the start of the phase alignment is X=90, and the current position of the tool axis is Y=330. Figure 6 The relationship between the current position X of the workpiece, the current position Y of the tool, and the number T of tools is shown.

[0080] like Figure 6 As shown, the current position X of the workpiece is the position rotated 90° counterclockwise from the origin of the workpiece axis (the position indicated by the arrow at the top of the figure). The current position Y of the tool is the position rotated 330° counterclockwise from the origin of the tool axis.

[0081] By substituting the current position X of the workpiece, the current position Y of the tool, and the rotation ratio 1:2 into Formula 2, the phase R between the workpiece axis and the tool axis before phase alignment is calculated as follows: CURRENT .

[0082] [Formula 5]

[0083]

[0084] If the current position X of the workpiece, the current position Y of the tool, the rotation ratio 1:2, and the phase command value R are substituted into equation (4), the processable phase command value R is NEW(n) can be calculated as follows. NEW The value of (n) is the number of tools present.

[0085] [Formula 6]

[0086]

[0087] The phase change is calculated by considering the phase alignment method, the maximum rotation speed of the workpiece axis and the tool axis, etc., but without these restrictions, the closest to R CURRENT R NEW The value of (n) becomes the new phase command value R' NEW The phase alignment control unit 20 uses the new phase command value R' NEW Perform phase alignment.

[0088] Next, refer to Figure 7 The phase alignment method of the numerical controller 100 of the present disclosure is described below. Before starting the machining program, the number of tools is set. Here, the number of tools T is set to 3 (step S1).

[0089] Next, the machining program is started (step S2). The program analysis unit 41 analyzes the machining program and first starts the rotation of the workpiece rotation axis (step S3). In addition, the program analysis unit 41 analyzes the instruction to start polygon machining with the rotation ratio P:Q of the workpiece and the tool being 1:2 and the phase instruction value R being 60 (step S4). The axis control unit 30 rotates the workpiece axis and the tool axis according to the instruction of the machining program.

[0090] When the workpiece axis and the tool axis reach the specified speed for polygon processing (step S5), the calculation of the new phase command value R' begins. NEW (Step S6).

[0091] When determining the new phase command value R' NEW When the tool axis or workpiece axis is temporarily decelerated or accelerated, the phase is aligned with the new phase command value R' NEW Alignment (step S7). When the phase alignment is completed, polygonal cutting is performed (step S8).

[0092] Reference Figure 8 , the new phase command value R' of step S6 NEW In the calculation of the new phase command value, the current position X of the workpiece axis and the current position Y of the tool axis are obtained (step S11), and the phase R of the workpiece axis and the tool axis before phase alignment is calculated. CURRENT (Step S12). Then, the machinable phase calculation unit 12 calculates the machinable phase command value R using the number T of tools. NEW (n) (Step S13).NEW (n) is the number of tools T. The optimal phase calculation unit 13 selects a new phase command value R' that minimizes the amount of change when the phase changes, taking into account the phase alignment method, the maximum rotation speed of the workpiece axis and the tool axis, and other limitations. NEW (Step S14).

[0093] Fig. 9A and Fig. 9B shows the previous phase alignment, Figures 10A to 10C The phase alignment of the present disclosure is shown. Fig. 9A and Fig. 9B ,as well as Figures 10A to 10C Both show the phase change when the workpiece axis is 0 degrees and the tool axis is 195 degrees. In the past, phase alignment was performed based on the phase of the instruction during processing (phase instruction value R). Therefore, under the above conditions, if Fig. 10A As shown, the phase command value is 90 degrees.

[0094] In polygon machining, since a plurality of tools are provided, there is no problem even if the phase alignment is performed with the angle of the tool axis shifted by the phase of the interval between the tools. Therefore, the appropriate phase is the number of tools.

[0095] In this disclosure, Fig. 10B As shown, an appropriate phase is selected from multiple phases to minimize the time spent on phase alignment (the amount of phase change is minimal). Fig. 10C In the example of FIG. 1 , by changing the phase command value from 90 degrees to 210 degrees, the phase change amount is reduced.

[0096] As described above, the numerical control device 100 of the present disclosure calculates the phase R between the workpiece axis and the tool axis before the phase alignment in the polygon machining. CURRENT , processable phase command value R NEW (n), while considering the phase alignment method, the maximum speed and other restrictions, calculate the new phase command value R' NEW The amount of change of the tool axis or workpiece axis becomes shorter, and the time required for phase alignment becomes shorter.

[0097] Explanation of symbols

[0098] 100 Numerical control device

[0099] 111 CPU

[0100] 11 Current phase calculation unit

[0101] 12 Machinable phase calculation unit

[0102] 13 Optimal Phase Calculation Unit

[0103] 20 Phase alignment control unit

[0104] 30-axis control unit

[0105] 40 Processing setting storage unit

[0106] 41 Program Analysis Department

[0107] 42 Processing program storage unit

[0108] 50 In-process data storage unit.

Claims

1. A control device for controlling a machine tool, the machine tool having a first axis for rotating a tool having a plurality of cutting tools and a second axis for rotating a workpiece, and performing polygonal machining by rotating the first axis and the second axis simultaneously, characterized in that: The control device comprises: a processing setting storage unit, which stores the number of the cutting tools; a current phase calculation unit that calculates the phases of the first axis and the second axis of rotation before phase alignment; a machinable phase calculation unit that calculates a phase specified by a machining program and a phase when the angle of the first axis is shifted from the phase specified by the machining program by a plurality of intervals of the tool; an optimum phase calculation unit for finding a phase that takes the shortest time to align the phases from among the plurality of phases calculated by the processable phase calculation unit; as well as A phase alignment control unit controls the first shaft and the second shaft to rotate so as to be aligned with the phase calculated by the optimal phase calculation unit.

2. The control device according to claim 1, characterized in that: The current phase calculation unit calculates a phase before the first axis and the second axis are aligned based on a current position of the first axis, a current position of the second axis, and a rotation ratio specified by the machining program.

3. The control device according to claim 1, characterized in that: The machinable phase calculation unit calculates a plurality of machinable phases based on a rotation ratio specified by the machining program, a phase command value specified by the machining program, and the number of the tools.

4. The control device according to claim 3, characterized in that: The optimal phase calculation unit calculates the optimal phase that minimizes the time required to change the phases of the first axis and the second axis based on the difference between the phase before the phase alignment and the phase at which the machining can be performed.

5. A control system for controlling a machine tool, the machine tool having a first axis for rotating a tool having a plurality of cutting tools and a second axis for rotating a workpiece, and performing polygonal machining by rotating the first axis and the second axis simultaneously, characterized in that: The control system comprises: a processing setting storage unit, which stores the number of the cutting tools; a current phase calculation unit that calculates the phases of the first axis and the second axis of rotation before phase alignment; a machinable phase calculation unit that calculates a phase specified by a machining program and a phase when the angle of the first axis is shifted from the phase specified by the machining program by a plurality of intervals of the tool; an optimum phase calculation unit for finding a phase that takes the shortest time to align the phases from among the plurality of phases calculated by the processable phase calculation unit; as well as A phase alignment control unit controls the first shaft and the second shaft to rotate so as to be aligned with the phase calculated by the optimal phase calculation unit.

6. A method for controlling a machine tool, the machine tool having a first axis for rotating a tool having a plurality of cutting tools and a second axis for rotating a workpiece, and performing polygonal machining by rotating the first axis and the second axis simultaneously, characterized in that: The control method performs the following control: storing the quantity of the tool; calculating a phase before phase alignment between the first axis and the second axis based on a current position of the first axis, a current position of the second axis, and a rotation ratio specified by the machining program; calculating a plurality of machinable phases according to a rotation ratio specified by the machining program, a phase command value specified by the machining program, and the number of the tools; calculating an optimum phase that minimizes the time required to change the phases of the first axis and the second axis based on a difference between the phase before the phase alignment and the phase that enables the machining; and The phases of the first axis and the second axis are aligned based on the optimal phase.