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

The numerical control device addresses thermal displacement inaccuracies by validating thermal correction commands and preventing tool exchanges when limits are exceeded, ensuring accurate tool positioning and preventing damage.

JP2024137262APending Publication Date: 2024-10-07BROTHER KOGYO KK

Patent Information

Application Number
JP2023048717
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-24
Publication Date
2024-10-07

AI Technical Summary

Technical Problem

Existing numerical control devices for machine tools inaccurately estimate thermal displacement of screw shafts due to ambient temperature variations, leading to incorrect tool exchange positions and potential damage during tool changes.

Method used

A numerical control device that includes a thermal correction determination unit to validate thermal displacement correction commands, a tool exchange determination unit to prevent tool exchange operations when thermal displacement exceeds allowable limits, and a prohibition unit to prevent tool exchange if thermal displacement correction is valid, ensuring accurate tool positioning and preventing damage.

Benefits of technology

Prevents incorrect tool exchanges by ensuring thermal displacement corrections are within allowable limits, maintaining tool changer integrity and enabling precise tool positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024137262000001_ABST
    Figure 2024137262000001_ABST
Patent Text Reader

Abstract

To provide a numerical value control device, a control method, a program, and a storage medium capable of controlling so as not to perform tool replacements when there is a possibility that tool replacements may not be performed correctly.SOLUTION: When executing an ATC operation, if thermal displacement compensation is set to be performed on an X-axis (S51: YES), and unless a thermal displacement compensation amount of the X-axis is equal to or greater than an X-axis lower limit value and equal to or less than an X-axis upper limit value (S52: NO), a CPU of a numerical value control device sets the execution of the ATC operation to impossible (ATC execution=NG) (S53). The CPU similarly determines whether or not an ATC operation can be executed when thermal displacement compensation is performed for a Z-axis and a Y-axis. If the execution of the ATC operation is impossible (prohibited), the CPU performs a notification with alarm.SELECTED DRAWING: Figure 8
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 technology]

[0002] The machine tool includes a spindle head that rotatably holds a spindle on which a tool is attached, a nut that is connected to the spindle head, and a screw shaft that screws into the nut via rolling elements. The screw shaft rotates when driven by a motor, and the spindle moves along the screw shaft. When the screw shaft is driven, frictional heat generated between the screw shaft and the nut and heat generated by driving the motor cause the screw shaft to extend, displacing the movement position of the spindle. The numerical control device of the machine tool described in Cited Document 1 calculates the amount of thermal displacement of the screw shaft based on the amount of heat generated by the screw shaft and the amount of heat generated by the motor connected to the screw shaft. The numerical control device drives the screw shaft based on the calculation result, and moves the spindle to the corrected position. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Patent No. 6582522 Summary of the Invention [Problem to be solved by the invention]

[0004] When machining a workpiece by correcting the movement position of the spindle according to the amount of thermal displacement, if there is a deviation between the machining position specified in the program and the actual machining position, the user may adjust the movement position of the spindle. The numerical control device of Patent Document 1 calculates the amount of thermal displacement by calculation based on estimation from the operation pattern of the axis movement, etc., so that the amount of thermal displacement contains an estimation error, especially when it is affected by the usage environment such as the ambient temperature. Therefore, if the user sets the adjustment incorrectly or if the amount of movement corresponding to the estimated error of the amount of thermal displacement is added, not only the machining position but also the position where the tool is changed may be shifted, and the tool change may not be performed correctly.

[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 perform control so as not to execute tool change when there is a possibility that tool change cannot be performed correctly. [Means for solving the problem]

[0006] According to a first aspect of the present invention, a machine tool including a spindle to which a tool can be attached, a spindle head for rotatably supporting the spindle, a plurality of screw shafts extending in three mutually intersecting axial directions that are used for relative movement of the spindle head with respect to a table that holds a workpiece to be cut by the tool, and a tool changer for changing the tool attached to the spindle is controlled based on an NC program composed of a plurality of blocks having control commands, and a numerical value for correcting the amount of movement of the spindle head based on a calculation result of a thermal displacement amount in the axial direction of at least one of the plurality of screw shafts is provided. A numerical control device is provided, which is characterized in that the control device includes a thermal compensation determination unit that determines whether an instruction by a thermal displacement compensation command that instructs correction of the movement amount of the spindle head in the axial direction of the screw shaft is valid, a tool change determination unit that determines whether an instruction to be executed according to the NC program is a tool change command that instructs changing the tool, and a prohibition unit that prohibits execution of a tool change operation based on the tool change command when the tool change determination unit determines that the instruction to be executed is the tool change command and the thermal compensation determination unit determines that the instruction by the thermal displacement compensation command is valid. When executing the tool change command, the numerical control device does not execute the tool change operation if the instruction by the thermal displacement compensation command that corrects the movement amount of the spindle head is valid. Therefore, even if the movement position of the spindle head is significantly deviated from the tool change position by the tool change device due to an estimated error included in the correction amount based on the calculation result of the thermal displacement amount and the adjustment of the movement amount of the spindle head by the user, the numerical control device does not damage the tool change device by prohibiting execution of the tool change operation.

[0007] The prohibition unit of the first aspect includes a limit judgment unit that judges whether or not a thermal displacement compensation amount, which is a compensation value of the movement amount of the spindle head in the axial direction of the screw shaft to be corrected by the thermal displacement compensation command, is within a range of a predetermined limit compensation amount, and may prohibit execution of a tool exchange operation based on the tool exchange command when the tool exchange judgment unit judges that the command to be executed is the tool exchange command, the thermal compensation judgment unit judges that the instruction by the thermal displacement compensation command is valid, and further the limit judgment unit judges that the range of the limit compensation amount is exceeded. The tool exchange device has a permissible mechanical deviation range for the deviation of the movement position of the spindle head from the tool exchange position. When executing a tool exchange command, even if the instruction by the thermal displacement compensation command to correct the movement amount of the spindle head is valid, the numerical control device executes the tool exchange operation if the thermal displacement compensation amount falls within the range of the limit compensation amount, which is an allowable amount. In other words, the numerical control device prohibits execution of the tool exchange operation if the movement position of the spindle head deviates beyond the range of the limit compensation amount from the tool exchange position by the tool exchange device, so that the tool exchange device is not damaged.

[0008] In the first aspect, the numerical control device may further include a notification unit that notifies the user of the prohibition when the prohibition unit prohibits the execution of the tool change operation based on the tool change command. When the numerical control device prohibits the execution of the tool change operation, the numerical control device notifies the user of the prohibition. Thus, the user can recognize that the movement position of the spindle head is misaligned and perform adjustment work so that the tool change can be performed correctly.

[0009] In the first aspect, the spindle head moves from a return position, which is a position to which the tool moves after the workpiece is machined by the tool and where the tool does not collide with the workpiece, to an exchange position where the tool exchange device exchanges the tool held by the spindle with a next tool to be used next, via a preparation position, which is a position away from the exchange position, in a direction opposite to an exchange direction in which the spindle head moves to hold the tool in a tool holding unit of the tool exchange device, and the tool exchange command includes a first movement command which is a command to move the spindle head from the return position to the preparation position, and a second movement command which is a command to move the spindle head from the preparation position to the exchange position, and the tool exchange determination unit may determine whether the command to be executed is the tool exchange command based on whether the command being executed is the second movement command. The numerical control device determines whether to prohibit the execution of a tool exchange operation during the movement of the spindle head from the preparation position to the exchange position. Thus, the numerical control device can move the spindle head from the return position to the preparation position without any restrictions.

[0010] The tool change determination unit of the first aspect may determine whether the command to be executed is the tool change command based on whether the command to start execution is the second movement command. The numerical control device determines whether to prohibit execution of the tool change operation when the spindle head starts moving from the preparation position to the tool change position. Thus, the numerical control device can move the spindle head from the return position to the preparation position without any restrictions.

[0011] The limit determination unit of the first aspect may determine whether or not the thermal displacement compensation amount in the direction along the replacement direction when the spindle head is located at the preparation position is within the range of the limit compensation amount. The preparation position is a position through which the spindle head passes immediately before moving to the replacement position. Therefore, the numerical control device can determine whether or not the thermal displacement compensation amount is within the range of the limit compensation amount by using the thermal displacement compensation amount at the preparation position, which is closer to the replacement position and therefore has a smaller error in the thermal displacement compensation amount.

[0012] According to a second aspect of the present invention, there is provided a method for controlling a machine tool including a spindle to which a tool can be attached, a spindle head for rotatably supporting the spindle, a plurality of screw shafts extending in three intersecting axial directions and used for relative movement of the spindle head with respect to a table for holding a workpiece to be machined by the tool, and a tool changer for changing the tool attached to the spindle, based on an NC program composed of a plurality of blocks having control commands, the method comprising the steps of: correcting an amount of movement of the spindle head based on a calculation result of an amount of thermal displacement in an axial direction of at least one of the plurality of screw shafts; The present invention provides a control method comprising: a thermal correction judgment step of judging whether or not an instruction by a thermal displacement compensation command instructing correction of the amount of movement of the spindle head in the axial direction of the screw shaft is valid; a tool change judgment step of judging whether or not an instruction to be executed according to the NC program is a tool change command instructing the replacement of the tool; and an inhibition step of inhibiting execution of a tool change operation based on the tool change command when it is judged in the tool change judgment step that the instruction to be executed is the tool change command and it is judged in the thermal correction judgment step that the instruction by the thermal displacement compensation command is valid. Therefore, the second aspect has the same effect as the first aspect.

[0013] According to a third aspect of the present invention, a machine tool including a spindle to which a tool can be attached, a spindle head for rotatably supporting the spindle, a plurality of screw shafts extending in three intersecting axial directions that are used for relative movement of the spindle head with respect to a table that holds a workpiece to be machined by the tool, and a tool changer for changing the tool attached to the spindle, is controlled based on an NC program composed of a plurality of blocks having control commands, and the program causes a numerical control device to function to correct the amount of movement of the spindle head based on a calculation result of a thermal displacement amount in the axial direction of at least one of the plurality of screw shafts, a thermal compensation determination step of determining whether an instruction by a thermal displacement compensation command for instructing correction of the amount of movement of the spindle head in the axial direction of the screw shaft is valid, a tool change determination step of determining whether an instruction to be executed according to the NC program is a tool change command for instructing the replacement of the tool, and an inhibition step of inhibiting execution of a tool change operation based on the tool change command when it is determined in the tool change determination step that the instruction to be executed is the tool change command and when it is determined in the thermal compensation determination step that the instruction by the thermal displacement compensation command is valid. Therefore, the third aspect has the same effect as the first aspect.

[0014] According to a fourth aspect of the present invention, there is provided a machine tool including a spindle to which a tool can be attached, a spindle head for rotatably supporting the spindle, a plurality of screw shafts extending in three intersecting axial directions and used for relative movement of the spindle head with respect to a table for holding a workpiece to be machined by the tool, and a tool changer for changing the tool attached to the spindle, based on an NC program composed of a plurality of blocks having control commands, the machine tool comprising: a spindle to which a tool can be attached; a spindle head for rotatably supporting the spindle; a plurality of screw shafts extending in three intersecting axial directions and used for relative movement of the spindle head with respect to a table for holding a workpiece to be machined by the tool; and a tool changer for changing the tool attached to the spindle, the machine tool being controlled based on an NC program composed of a plurality of blocks having control commands, the program causing a numerical control device to function to correct an amount of movement of the spindle head based on a calculation result of an amount of thermal displacement in an axial direction of at least one of the plurality of screw shafts, a thermal correction judgment step of judging whether or not an instruction by a thermal displacement compensation command instructing correction of the movement amount of the spindle head in the axial direction of the screw shaft is valid, a tool change judgment step of judging whether or not an instruction to be executed according to the NC program is a tool change command instructing the replacement of the tool, and an inhibition step of prohibiting execution of a tool change operation based on the tool change command when it is judged in the tool change judgment step that the instruction to be executed is the tool change command and it is judged in the thermal correction judgment step that the instruction by the thermal displacement compensation command is valid. Therefore, the fourth aspect has the same effect as the first aspect. [Brief description of the drawings]

[0015] [Figure 1] FIG. 2 is a perspective view of the machine tool 1 as seen from the upper right rear. [Diagram 2] FIG. [Diagram 3] 2 is a perspective view showing a schematic view of an X-axis moving mechanism 11, a Z-axis moving mechanism 12, and a Y-axis moving mechanism 13. FIG. [Figure 4] FIG. [Diagram 5] FIG. 1 is a diagram showing a processing area, an ATC area, and each reference point. [Figure 6] 2 is a block diagram showing the electrical configuration of the machine tool 1. FIG. [Figure 7] 1 is a flowchart of NC control processing (automatic). [Figure 8] 13 is a flowchart of an ATC execution confirmation process. [Figure 9] 1 is a flowchart of NC control processing (manual). DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0016] An embodiment of the present invention will be described. In the following description, left and right, front and rear, and up and down are used as indicated by arrows in the drawings. The left and right direction, up and down direction, and front and rear direction of the machine tool 1 are the X-axis direction, Y-axis direction, and Z-axis direction of the machine tool 1, respectively. The machine tool 1 shown in FIG. 1 is a column traverse type machine tool in which the spindle 7 extends in the front and rear direction (Z-axis direction) and the column 5 moves in the X-axis direction and Z-axis direction. "ATC" in this embodiment is an abbreviation for "Automatic Tool Changer." Also, "NC" in this embodiment is an abbreviation for "Numerical Control."

[0017] The following describes the structure of the machine tool 1. As shown in Figures 1 and 2, the machine tool 1 includes a base 2, a column 5, an X-axis movement mechanism 11, a Z-axis movement mechanism 12, a Y-axis movement mechanism 13 (see Figure 3), a spindle head 6, a spindle 7, a control box 8, a rotary table 9, an ATC device 30, etc.

[0018] The base 2 is an iron base in the shape of a roughly rectangular parallelepiped that is long in the Z-axis direction. The X-axis movement mechanism 11 is provided at the rear of the upper surface of the base 2, and supports the moving body 15 so that it can move in the X-axis direction. The Z-axis movement mechanism 12 is provided on the upper surface of the moving body 15. The Z-axis movement mechanism 12 supports the column 5 so that it can move in the Z-axis direction. The column 5 is an upright pillar that extends in the vertical direction. The column 5 has a vertically elongated rectangular through-hole 5A on its front surface. The through-hole 5A passes through the column 5 in the front-rear direction. The Y-axis movement mechanism 13 is provided on the front surface of the column 5, and supports the spindle head 6 so that it can move in the Y-axis direction.

[0019] As shown in FIG. 3, the X-axis moving mechanism 11, the Z-axis moving mechanism 12, and the Y-axis moving mechanism 13 are ball screw drive mechanisms. FIG. 3 shows a simplified view of the main parts of the X-axis moving mechanism 11, the Z-axis moving mechanism 12, and the Y-axis moving mechanism 13 shown in FIG. 1. The X-axis moving mechanism 11 includes a pair of X-axis linear guides 11A, an X-axis ball screw 11B, and an X-axis motor 62 on the upper surface of the base 2. The X-axis linear guide 11A extends in the X-axis direction and guides the moving body 15 in the X-axis direction. The X-axis ball screw 11B extends in the X-axis direction and is disposed between the pair of X-axis linear guides 11A. The moving body 15 includes a nut (not shown) on the lower surface. The nut is screwed into the X-axis ball screw 11B. The X-axis motor 62 rotates the X-axis ball screw 11B in the forward and reverse directions. Therefore, the moving body 15 moves in the X-axis direction together with the nut.

[0020] The Z-axis moving mechanism 12 is provided with a pair of Z-axis linear guides 12A, a Z-axis ball screw 12B, and a Z-axis motor 63 on the upper surface of the moving body 15. The Z-axis linear guide 12A extends in the Z-axis direction and guides the column 5 in the Z-axis direction. The Z-axis ball screw 12B extends in the Z-axis direction and is disposed between the pair of Z-axis linear guides 12A. The column 5 is provided with a nut (not shown) on the lower surface. The nut is screwed into the Z-axis ball screw 12B. The Z-axis motor 63 rotates the Z-axis ball screw 12B in the forward and reverse directions. Therefore, the column 5 moves in the Z-axis direction together with the nut, and also moves in the X-axis direction via the moving body 15. The Y-axis moving mechanism 13 is provided with a Y-axis ball screw 13B and a Y-axis motor 64 on the column 5. The Y-axis ball screw 13B extends in the Y-axis direction and is disposed in front of the column 5. The spindle head 6 is located inside the through hole 5A. The spindle head 6 is provided with a nut (not shown). The nut is screwed onto the Y-axis ball screw 13B. The Y-axis motor 64 rotates the Y-axis ball screw 13B in the forward and reverse directions. Therefore, the spindle head 6 moves in the Y-axis direction together with the nut, and further moves in the Z-axis and X-axis directions via the column 5 and the moving body 15.

[0021] As shown in Figs. 1 and 2, the spindle head 6 extends in the Z-axis direction and is provided so as to be movable in the Y-axis direction along the front surface of the column 5 by the Y-axis moving mechanism 13. The spindle head 6 is movable in the Y-axis direction between the machining area and the tool exchange area (hereinafter referred to as the "ATC area"; see Fig. 2). The machining area is provided in a space on the base 2 side (lower side) of the Y-axis origin. The Y-axis origin is the position where the Y-axis machine coordinate is 0 (Y = 0 mm). The machining area is an area where machining of a workpiece (workpiece) fixed to the rotary table 9 is performed. The ATC area is a space on the opposite side (upper side) of the machining area with respect to the Y-axis origin, and is provided at a position overlapping with the machining area in the Z-axis direction. The ATC area is an area where tool exchange is performed by the ATC device 30. The machine tool 1 can move the spindle 7 between the machining area and the ATC area by vertically moving the spindle head 6.

[0022] The spindle 7 is provided coaxially within the spindle head 6. The spindle head 6 rotatably supports the spindle 7. A motor holding box 29 is fixed to the rear of the spindle head 6. The motor holding box 29 extends rearward from the rear of the spindle head 6 and holds a spindle motor 61 (see Figure 3) inside. The motor holding box 29 protrudes rearward from the through-hole 5A of the column 5. The output shaft of the spindle motor 61 extends forward and is coaxially connected to the rear end of the spindle 7.

[0023] The spindle 7 has a tool mounting hole 38 and a holder holding member 19 (see FIG. 2). The tool mounting hole 38 is provided at the tip (front end) of the spindle 7. The tool mounting hole 38 expands in a substantially conical shape toward the tip of the spindle 7. The holder holding member 19 is provided at the back side of the tool mounting hole 38. A tool holder 90 (see FIG. 2) is detachably attached to the tool mounting hole 38. The tool holder 90 has a gripped portion 94, a tapered portion 92, and a pull stud 93 (see FIG. 2). The gripped portion 94 is formed cylindrically on one end side of the tool holder 90 and holds a tool 91 inside. The gripped portion 94 has a groove portion 95 that goes around the outer circumferential surface. The side wall portion of the groove portion 95 is tapered. The gripped portion 94 is a portion that is gripped by a gripping portion 358 of the grip arm 35 described later. The width of groove portion 95 is greater than the width of roller portions 356, 357 (described later) of grip arm 35. Tool holder 90 is equipped with a tapered portion 92 and a pull stud 93 (see FIG. 2) on the other end. Tapered portion 92 is approximately conical, and fits closely into tool mounting hole 38 of spindle 7. Pull stud 93 protrudes rearward from the apex of tapered portion 92. When tapered portion 92 is attached to tool mounting hole 38, holder holding member 19 holds pull stud 93, and tool holder 90, which holds a tool 91, is attached to the spindle 7.

[0024] A pair of support members 17, 18 are provided at the rear of the base 2. The support members 17, 18 are spaced apart from each other in the left-right direction and extend upward, supporting the control box 8 from below. The control box 8 houses a control panel (not shown) inside. The control panel controls the operation of the machine tool 1. A fixed base 16 is rotatably provided on the front side of the upper surface of the base 2. A rotating table 9 is fixed to the fixed base 16. The rotating table 9 is located in front of the spindle head 6. A workpiece is fixed to the upper surface of the rotating table 9 with a jig (not shown), and it is rotatable 360 ​​degrees around a rotation axis parallel to the Y-axis direction.

[0025] A pair of support columns 21, 22 are provided on the front side and on both the left and right sides of the upper surface of the base 2. A connecting plate 23 (see FIG. 1) is fixed between the upper parts of the support columns 21 and 22 that face each other. The ATC device 30 is fixed to the front surface of the connecting plate 23. Therefore, the ATC device 30 is located between the column 5 and the rotary table 9 and above the spindle head 6 by the support columns 21, 22. The ATC device 30 includes a tool magazine 31, a reduction gear 32, a magazine motor 33, etc. The tool magazine 31 includes a magazine base 37 and a plurality of grip arms 35. The magazine base 37 is substantially disk-shaped and is supported on the front surface of the connecting plate 23 so as to be rotatable about a rotating shaft (not shown) that extends in the front-rear direction and whose front side is inclined downward with respect to the rear side. The reduction gear 32 and the magazine motor 33 are attached to the tool magazine 31. The output shaft (not shown) of the magazine motor 33 meshes with the rotating shaft of the magazine base 37 via the reduction gear 32. The power of the magazine motor 33 is transmitted to the rotation shaft of the magazine base 37 via the reduction gear 32 .

[0026] The multiple grip arms 35 are arranged along the outer periphery of the magazine base 37 and extend radially outward. With the tool holder 90 lying horizontally, the grip arms 35 grip the tool holder 90 in the Y-axis direction perpendicular to the tool holder 90. As shown in FIG. 4, the grip arm 35 includes a base 351, a pair of claw members 352 and 353, and a spring member 355. The base 351 extends in the vertical direction. An upper end of the base 351 is fixed to the outer periphery of the magazine base 37 with a plurality of screws. An engagement portion 354 is formed at the lower end of the base 351. The engagement portion 354 is a portion that engages with the groove portion 95 of the tool holder 90 from above.

[0027] A pair of claw members 352, 353 extend in the vertical direction and are arranged side by side in the left-right direction. Each of the claw members 352, 353 is supported by a base 351 at approximately the center in the vertical direction so as to be rotatable about a rotation axis in the front-rear direction. The lower ends of the claw members 352, 353 include roller portions 356, 357 whose rotation axis is in the front-rear direction. A spring member 355 is arranged between the upper ends of the claw members 352, 353 and biases the roller portions 356, 357 in a direction in which they approach each other.

[0028] The engaging portion 354 and the pair of claw members 352, 353 constitute a gripping portion 358 that grips the tool holder 90. The gripping portion 358 grips the gripped portion 94 by engaging the engaging portion 354 in a groove portion 95 of the gripped portion 94 of the tool holder 90, disposing the roller portions 356, 357 of the pair of claw members 352, 353 in the groove portion 95, and sandwiching the gripped portion 94 by a biasing force. The gripping arm 35 that exchanges tools with the spindle 7 moves to an ATC position (described later) of the tool magazine 31. The ATC position is the lowest position of the tool magazine 31. At the ATC position, the up-down direction, left-right direction, and front-rear direction of the gripping arm 35 are aligned in the Y-axis direction, the X-axis direction, and the Z-axis direction of the machine tool 1, respectively.

[0029] When the ATC position of the spindle 7 is shifted relative to the tool transfer position of the grip arm 35 due to the influence of heat, the gripped portion 94 of the tool holder 90 is shifted in position relative to the gripping portion 358 of the grip arm 35. In the Z-axis direction, the roller portions 356 and 357 of the grip arm 35 are guided from the tapered side wall portion to the bottom wall portion of the groove portion 95 of the tool holder 90, so that the deviation in the Z-axis direction can be mechanically corrected. In the X-axis direction, the grip arm 35 presses the groove portion 95 of the tool holder 90 in the +X direction and the -X direction, respectively, with the roller portions 356 and 357, and the pressing forces are balanced, so that the deviation in the X-axis direction can be mechanically corrected. In the Y-axis direction, the grip arm 35 presses the groove portion 95 of the tool holder 90 in the Y-axis direction with the roller portions 356 and 357, so that the groove portion 95 is pressed against the engagement portion 354, so that the deviation in the Y-axis direction can be mechanically corrected.

[0030] As shown in Figures 1 and 2, a magazine cover (not shown) is fixed to the front of the upper part of each of the support pillars 21, 22. The magazine cover is box-shaped and covers the periphery of the tool magazine 31. The magazine cover prevents chips and cutting fluid splashes from adhering to the tool magazine 31. An opening (not shown) is provided in the bottom wall of the magazine cover. The opening is rectangular when viewed from the bottom, and is located directly below the ATC position, which is the lowest part of the tool magazine 31. A shutter (not shown) is provided in the opening. The shutter opens and closes the opening under the control of a control panel. When the shutter is open, the spindle 7 passes through the opening and can move to the ATC position.

[0031] The machine origin and a number of reference points set in the ATC area will be described with reference to Fig. 5. The machine origin of the machine tool 1 is the position where the machine coordinates of the X-axis and Y-axis are 0 and the machine coordinate of the Z-axis is the rear end position of the machining area, and is determined according to the structure of the machine tool 1. The machine origin of the X-axis is the X-axis origin (X = 0 mm), the machine origin of the Y-axis is the Y-axis origin (Y = 0 mm), and the machine origin of the Z-axis is the Z-axis origin (Z = rear end position). Note that the position of the machine origin changes depending on the structure of the machine tool 1, and therefore the sizes of the machining area and the ATC area set based on the machine origin also change depending on the structure of the machine tool 1.

[0032] In the ATC area, a tool exchange position (hereinafter referred to as "ATC position"), an ATC origin, and an ATC preparation position are set. These ATC position, ATC origin, and ATC preparation position are reference points to which the spindle 7 is moved and positioned when performing a tool exchange operation (hereinafter referred to as "ATC operation"). The ATC position is a position where a tool is transferred between the grip arm 35 indexed to the tool transfer position in the tool magazine 31. The ATC origin is a position moved in the Z-axis + direction (rearward) from the ATC position, and is the rear end position of the ATC area. The ATC origin is a position where the tool magazine 31 can be rotated without interference between the tool held by the grip arm 35 and the spindle 7. The ATC preparation position is a position moved in the Y-axis - direction (downward) from the ATC position, and is the boundary position between the machining area and the ATC area. The ATC preparation position is a position with the same coordinates in the Z-axis direction as the ATC position.

[0033] Based on the above three reference points, tool exchange paths 51, 52 are set in the ATC area. The tool exchange paths 51, 52 form an inverted L-shaped path. The tool exchange path 51 is a path that extends in the Y-axis + direction (upward) from the ATC preparation position to the ATC position. The tool exchange path 52 is a path that extends in the Z-axis + direction (rearward) from the ATC position to the ATC origin. The tool exchange paths 51, 52 are paths along which the spindle head 6 moves during ATC operation. In this embodiment, in principle, in the ATC area, the spindle 7 is restricted in movement so that it can only move on the tool exchange paths 51, 52 and cannot move anywhere else.

[0034] An example of the ATC operation of the machine tool 1 will be described. In this embodiment, in order to explain the position of the spindle 7 during the ATC operation, the movement of the spindle head 6 will be described as "movement of the spindle 7." In addition, in the following description, the ATC position on the X-axis will be referred to as the ATC position X-axis, the ATC position on the Y-axis will be referred to as the ATC position Y-axis, and the ATC position on the Z-axis will be referred to as the ATC position Z-axis.

[0035] When the workpiece machining is completed, the spindle 7 is located, for example, at point P0 in the machining area. At this time, the shutter of the magazine cover is in a closed state. The spindle 7 mounts the tool holder 90, which holds a tool 91, in the tool mounting hole 38 (see FIG. 2). The holder holding member 19 of the spindle 7 holds the pull stud 93 of the tool holder 90.

[0036] The machine tool 1 performs an orienting operation of the spindle 7 while retracting the Z axis of the spindle 7 located at point P0 toward the Z axis origin (see arrow A1). The orienting operation is an operation to return the angle of the spindle 7 to a reference position (e.g., 0 degrees). The spindle 7 reaches point P1. Next, the shutter of the magazine cover is opened, and the X axis of the spindle 7 located at point P1 is moved to the ATC position X axis while the Y axis is moved to the Y axis origin (Y = 0 mm) (see arrow A2). The spindle 7 reaches point P2. Next, the Z axis of the spindle 7 located at point P2 is moved forward to the ATC position Z axis (see arrow A3). The spindle 7 reaches the ATC preparation position.

[0037] Next, the spindle 7 is raised from the ATC preparation position along the tool changing path 51 (see arrow A4). At this time, the grip arm 35, which is indexed to the tool transfer position, is exposed downward through the opening of the magazine cover. As the spindle 7 rises, the tool holder 90 attached to the spindle 7 passes through the opening of the magazine cover and is pushed into the grip arm 35 from below. When the spindle 7 reaches the ATC position, the tool holder 90 attached to the spindle 7 engages with and is gripped by the grip arm 35. At the same time, the holder holding member 19 inside the spindle 7 releases the hold of the pull stud 93. The tool holder 90 can now be removed from the spindle 7.

[0038] With the grip arm 35 clamping the tool holder 90 to be mounted on the spindle 7, the machine tool 1 moves the spindle 7 backward from the ATC position along the tool exchange path 52 (see arrow A5). When the spindle 7 reaches the ATC origin, the tool holder 90 is removed from the spindle 7. Next, the ATC device 30 rotates the tool magazine 31 clockwise (forward rotation) or counterclockwise (reverse rotation) to index the grip arm 35, which holds the tool holder of the next tool to be mounted (hereinafter referred to as the "next tool"), to the tool transfer position (see pivoting arrows A61 (forward rotation), A62 (reverse rotation)). As a result, the tool holder of the next tool is positioned in front of the spindle 7 in the Z-axis direction.

[0039] Next, the machine tool 1 advances the spindle 7 from the ATC origin along the tool change path 52 (see arrow A7). This causes the tool holder of the next tool to be inserted into the spindle 7. At the same time as reaching the ATC position, the tool holder of the next tool is attached to the spindle 7. The holder holding member 19 inside the spindle 7 holds the pull stud 93 of the tool holder.

[0040] Next, the machine tool 1 lowers the spindle 7, to which the tool holder of the next tool is attached, from the ATC position along the tool exchange path 51, and positions it at the ATC preparation position (see arrow A8). This completes the ATC operation of the spindle 7. To continue machining the workpiece, the machine tool 1 moves the spindle 7, to which the tool holder of the next tool is attached, from the ATC preparation position toward the next command point within the machining area. The command point is the target position to which the spindle 7 is moved after the ATC operation is completed, and may be set by a control command of the NC program, for example.

[0041] In the above example, the Z axis of the spindle 7 located at point P0 is retracted to the Z axis origin, but for example, a point R (return point) where the tool 91 attached to the spindle 7 does not contact the workpiece and jig on the rotary table 9 may be set and the spindle 7 may be retracted to that point R. In this case, point R may be located forward of the ATC position on the Z axis (ATC position on the Z axis). When point R is located forward of the ATC position on the Z axis, the spindle 7 may move from point R to the ATC preparation position without passing through point P2.

[0042] The electrical configuration of machine tool 1 will be described with reference to Fig. 6. Machine tool 1 includes a numerical control device 40, a spindle motor 61, an X-axis motor 62, a Z-axis motor 63, a Y-axis motor 64, a magazine motor 33, drive circuits 71-75, encoders 61A, 62A, 63A, 64A, 33A, an operation panel 25, a speaker 28, etc.

[0043] The numerical control device 40 includes a CPU 41, a ROM 42, a RAM 43, a storage device 44, a communication I / F 45, an input / output interface 46, etc. The CPU 41 controls the numerical control device 40. The ROM 42 stores various programs such as an NC control program. The NC control program executes the NC control process (see FIG. 7) described below. The RAM 43 stores various data during the execution of various processes. The storage device 44 is a non-volatile memory, and stores, for example, an NC program for machining as well as various data. The communication I / F 45 can be connected to a terminal (not shown) by wire or wirelessly. The input / output interface 46 is connected to the operation panel 25, the speaker 28, and the drive circuits 71 to 75.

[0044] The storage device 44 stores a set value for the allowable range of the thermal displacement compensation amount for each of the X-axis, Z-axis, and Y-axis, and an adjustment value of the thermal displacement compensation amount by the user. The set value of the allowable range is a mechanical allowable amount for the deviation between the gripping portion 358 and the gripped portion 94 when the gripping arm 35 indexed to the tool transfer position grips the tool holder 90. The allowable range in the Z-axis direction is based on the range of the width of the groove portion 95 of the tool holder 90. The allowable range in the X-axis direction is based on the range in which the pair of claw members 352, 353 of the gripping arm 35 can rotate. The allowable range in the Y-axis direction is based on the range in which the pair of claw members 352, 353 of the gripping arm 35 can rotate. The set value of the allowable range can be set by the user based on the specifications of the gripping arm 35 and the tool holder 90 within the range of 0.000 to 9.999 mm in each of the +X direction, -X direction, +Z direction, -Z direction, +Y direction, and -Y direction. The adjustment value is an adjustment amount that the user sets when correcting the deviation between the tool transfer position of the grip arm 35 and the ATC position of the spindle 7 due to an error in the thermal displacement compensation amount, and the effectiveness (%) by which the thermal displacement compensation amount is multiplied is set.

[0045] The spindle motor 61 rotates the spindle 7 to which a tool is attached. The X-axis motor 62, the Z-axis motor 63, and the Y-axis motor 64 move the workpiece and the spindle 7 relatively in the X-axis, Z-axis, and Y-axis directions. The magazine motor 33 rotates the tool magazine 31. The spindle motor 61, the X-axis motor 62, the Z-axis motor 63, the Y-axis motor 64, and the magazine motor 33 are servo motors. The drive circuit 71 controls the spindle motor 61 based on a control signal from the CPU 41. The drive circuit 72 controls the X-axis motor 62 based on a control signal from the CPU 41. The drive circuit 73 controls the Z-axis motor 63 based on a control signal from the CPU 41. The drive circuit 74 controls the Y-axis motor 64 based on a control signal from the CPU 41. The drive circuit 75 controls the magazine motor 33 based on a control signal from the CPU 41.

[0046] The encoder 61A detects the rotational position of the spindle motor 61 and transmits the detection signal to the drive circuit 71. The drive circuit 71 performs feedback control of the spindle motor 61 based on the detection signal, and outputs the rotation angle of the spindle 7 according to the rotational position to the CPU 41. The encoder 62A detects the rotational position of the X-axis motor 62 and transmits the detection signal to the drive circuit 72. The drive circuit 72 performs feedback control of the X-axis motor 62 based on the detection signal, and outputs the position of the spindle 7 in the X-axis direction according to the rotational position to the CPU 41. The encoder 63A detects the rotational position of the Z-axis motor 63 and transmits the detection signal to the drive circuit 73. The drive circuit 73 performs feedback control of the Z-axis motor 63 based on the detection signal, and outputs the position of the spindle 7 in the Z-axis direction according to the rotational position to the CPU 41. The encoder 64A detects the rotational position of the Y-axis motor 64 and transmits the detection signal to the drive circuit 74. The drive circuit 74 performs feedback control of the Y-axis motor 64 based on the detection signal. The encoder 33A detects the rotational position of the magazine motor 33 and transmits the detection signal to the drive circuit 75. The drive circuit 75 performs feedback control of the magazine motor 33 based on the detection signal. The CPU 41 detects the rotational position of the tool magazine 31 based on the detection signal of the encoder 33A received from the drive circuit 75. The operation panel 25 includes a display unit 26 and an operation unit 27. The display unit 26 is a touch panel, and displays various information based on control signals from the CPU 41, and also accepts various inputs and transmits them to the CPU 41. The operation unit 27 includes, for example, a plurality of physical press keys (not shown), and accepts various operations and transmits them to the CPU 41. The speaker 28 outputs various sounds.

[0047] The command format for ATC operation is explained below. ATC operation can be set by the control command of the NC program. For example, commands such as G100 and M06 can be used as the command format. The coordinate value of the command point and the Z-axis coordinate value of the P1 point or R point are specified by being included in the tool change command. Specific examples of G100 and M06 are as follows. ·G100T_L_X_Y_Z_R_ ·M06T_L_X_Y_Z_R_ T, L, X, Y, Z, and R are addresses. T is a tool number, a pot number, or a group number. L specifies the T modal value after G100. The T modal value indicates the tool number or the pot number to be replaced in the following tool replacement command. X, Y, and Z are the coordinate values ​​of the command point. R is the Z-axis coordinate value of the P1 point or the R point, which is the coordinate value of the position where the tool does not contact the workpiece and the jig on the table. In addition, the CPU 41 applies a tool length offset to position the spindle 7 to the P1 point or the R point. The tool length offset is to correct the Z-axis coordinate value so that the tip of the tool becomes the reference point. The tool length offset value is, for example, a value obtained by measuring in advance the length in the Z-axis direction between the position of the tip of the tool and the position of the machine coordinate of the spindle 7 with the tool held in the tool holder 90 and the tool holder 90 attached to the spindle 7. The tool offset value may be specified by being included in the tool change command as described above, or may be set in advance by the user as a parameter and stored in the storage device 44 in association with the tool number.

[0048] In addition, the command formats that can be used are M353 and M355 commands. The M353 command is a command that permits the execution of thermal displacement compensation for each of the X-axis, Z-axis, and Y-axis. Each screw shaft of the X-axis ball screw 11B, Z-axis ball screw 12B, and Y-axis ball screw 13B extends due to the heat generated by the driving of each motor, the X-axis motor 62, the Z-axis motor 63, and the Y-axis motor 64, and the frictional heat generated between each screw shaft and each nut, and the destination of the main shaft 7 is displaced. Thermal displacement compensation is a process for compensating for the displacement of each axis caused by the influence of heat.

[0049] Since thermal displacement correction is well known, detailed description will be omitted, but the thermal displacement correction amount is generally calculated as follows. The CPU 41 calculates the heat generation amount of the bearings supporting each screw shaft on each motor side, the heat generation amount of the bearings supporting each screw shaft on the opposite side of each motor, and the heat generation amount for each divided section obtained by dividing the range (between bearings) in which each nut moves on each screw shaft into a plurality of sections. The CPU 41 calculates the temperature distribution of each screw shaft based on the heat generation amount of each divided section, the heat generation amount of each bearing, parameters related to the mechanical structure such as the length and diameter of each screw shaft, and parameters related to physical properties such as density and specific heat. Then, the CPU 41 calculates the thermal displacement amount of each divided section based on the calculated temperature distribution of each screw shaft. The CPU 41 calculates the thermal displacement amount of the destination position of each nut on each screw shaft relative to the origin position as the thermal displacement correction amount based on the thermal displacement amount of each divided section. If an adjustment value is set by the user, the thermal displacement correction amount is multiplied by the adjustment value (effectiveness (%)). The M353 command is executed before the execution of the G100 or M06 command. When the M353 command is executed, the movement of the spindle 7 by the subsequent G100 or M06 command is performed to the coordinates where thermal displacement compensation has been performed for the coordinates of the check position. The M355 command is also a command to cancel the execution of thermal displacement compensation. The M355 command is also executed before the execution of the G100 or M06 command. When the M355 command is executed, the movement of the spindle 7 by the subsequent G100 or M06 command is performed in a state where thermal displacement compensation for the coordinates of the check position has been canceled (without performing thermal displacement compensation).

[0050] The NC control process will be described with reference to Figs. 7 to 9. When the power supply of the numerical control device 40 is turned on, the CPU 41 reads the NC control program from the ROM 42 and executes the NC control process. In the NC control process, a thermal displacement compensation flag and an ATC execution flag are used. The thermal displacement compensation flag and the ATC execution flag are stored in the RAM 43. The thermal displacement compensation flag is used to determine whether or not thermal displacement compensation is executed for each of the X-axis, Z-axis, and Y-axis in the movement of the spindle 7. The ATC execution flag is used to determine whether or not an ATC operation is executed. In the NC control process, the user selects an NC program on the operation panel 25. When the CPU 41 receives an operation to execute the NC program selected on the operation panel 25, it reads the NC program from the ROM 42 and executes this process. In addition, the flow in Fig. 7 is a flow when NC control is executed automatically.

[0051] As shown in FIG. 7, the CPU 41 reads the selected NC program from the storage device 44 (S11). The CPU 41 interprets one block from the first line of the read NC program (S12). The CPU 41 judges whether the control command of the interpreted block is M30 (end command) or not (S13). If the interpreted control command is not M30 (S13: NO), the CPU 41 judges whether the interpreted control command is M353 or not (S14). If the interpreted control command is not M353 (S14: NO), the CPU 41 shifts the process to S21. If the interpreted control command is M353 (S14: YES), the CPU 41 turns on the thermal displacement compensation flag stored in the RAM 43 (S16). If the thermal displacement compensation flag is on (thermal displacement compensation=OK in FIG. 7), it indicates that the spindle 7 is moved after thermal displacement compensation is performed for each of the X-axis, Z-axis, and Y-axis in the command G100 or M06. The CPU 41 calculates the amount of thermal displacement compensation at the check position for each of the X-axis, Z-axis, and Y-axis (S17). The check position is the ATC preparation position, that is, the position (X, Z, Y = ATC position X-axis, ATC position Z-axis, 0). The CPU 41 stores the amount of thermal displacement compensation for each of the X-axis, Z-axis, and Y-axis in the RAM 43 (S18), and performs thermal displacement compensation (S19). The CPU 41 adds the amount of thermal displacement compensation to each coordinate of the check position, and if an adjustment value is set, multiplies it by the adjustment value (effectiveness), thereby correcting the coordinate of the check position. The CPU 41 moves to the next block (S32), returns to S12, and repeats the above process.

[0052] The CPU 41 judges whether the interpreted control command is M355 (S21). If the interpreted control command is not M355 (S21: NO), the CPU 41 shifts the process to S26. If the interpreted control command is M355 (S21: YES), the CPU 41 turns off the thermal displacement compensation flag stored in the RAM 43 (S22). If the thermal displacement compensation flag is off (thermal displacement compensation=NG in FIG. 7), it indicates that the thermal displacement compensation for each of the X-axis, Z-axis, and Y-axis is to be canceled in the G100 or M06 command. The CPU 41 performs a process to cancel the thermal displacement compensation (S23). The CPU 41 sets each coordinate of the check position to a coordinate that is not to be compensated. The CPU 41 moves to the next block (S32), returns to S12, and repeats the above process.

[0053] The CPU 41 determines whether the interpreted control command is G100 or M06 (S26). If it is neither G100 nor M06 (S26: NO), the CPU 41 executes the interpreted control command (S31). The CPU 41 moves to the next block (S32), returns to S12, and repeats the above process. If the control command of the interpreted block is G100 or M06 (S26: YES), the CPU 41 executes ATC execution confirmation process (S27).

[0054] The ATC execution confirmation process will be described with reference to FIG. 8. When the ATC execution confirmation process is executed, the CPU 41 turns on the ATC execution flag stored in the RAM 43 (ATC execution=OK in FIG. 8) (S50). If the CPU 41 has stored in the RAM 43 in the process of S22 that the thermal displacement compensation for the X-axis is to be cancelled (thermal displacement compensation for the X-axis=NG) (S51: NO), the CPU 41 shifts the process to S56. If the CPU 41 has stored in the RAM 43 in the process of S16 that the spindle 7 is to be moved after thermal displacement compensation for the X-axis is performed (thermal displacement compensation for the X-axis=OK) (S51: YES), the CPU 41 determines whether the thermal displacement compensation amount for the X-axis stored in the RAM 43 is equal to or greater than the set value of the allowable range in the -X direction (hereinafter referred to as the "X-axis lower limit value") and equal to or less than the set value of the allowable range in the +X direction (hereinafter referred to as the "X-axis upper limit value") (S52). If the X-axis thermal displacement compensation amount is equal to or greater than the X-axis lower limit value and equal to or less than the X-axis upper limit value (S52: YES), the CPU 41 shifts the process to S56. If the X-axis thermal displacement compensation amount is smaller than the X-axis lower limit value or is larger than the X-axis upper limit value (S52: NO), the CPU 41 turns off the ATC execution flag stored in the RAM 43 (ATC execution=NG in FIG. 8) (S53) and shifts the process to S56. When the ATC execution flag is on, it indicates that the execution of the ATC operation is permitted, and when it is off, it indicates that the execution of the ATC operation is not permitted (prohibited).

[0055] If the CPU 41 has stored in the RAM 43 in the process of S22 that the thermal displacement compensation for the Z axis is to be cancelled (thermal displacement compensation for the Z axis=NG) (S56: NO), the CPU 41 proceeds to S61. If the CPU 41 has stored in the RAM 43 in the process of S16 that the spindle 7 is to be moved after thermal displacement compensation for the Z axis is performed (thermal displacement compensation for the Z axis=OK) (S56: YES), the CPU 41 judges whether the thermal displacement compensation amount for the Z axis stored in the RAM 43 is equal to or greater than the set value of the allowable range in the -Z direction (hereinafter referred to as the "Z axis lower limit value") and equal to or less than the set value of the allowable range in the +Z direction (hereinafter referred to as the "Z axis upper limit value") (S57). If the thermal displacement compensation amount for the Z axis is equal to or greater than the Z axis lower limit value and equal to or less than the Z axis upper limit value (S57: YES), the CPU 41 proceeds to S61. If the thermal displacement compensation amount for the Z axis is smaller than the Z axis lower limit value, or if the thermal displacement compensation amount for the Z axis is greater than the Z axis upper limit value (S57: NO), the CPU 41 turns off the ATC execution flag stored in the RAM 43 (ATC execution=NG in FIG. 8) (S58), and transitions to processing in S61.

[0056] If the CPU 41 has stored in the RAM 43 in the process of S22 that the thermal displacement compensation for the Y axis is to be cancelled (Y-axis thermal displacement compensation=NG) (S61: NO), the CPU 41 proceeds to S66. If the RAM 43 has stored in the RAM 43 in the process of S16 that the spindle 7 is to be moved after the thermal displacement compensation for the Y axis is performed (Y-axis thermal displacement compensation=OK) (S61: YES), the CPU 41 judges whether the amount of thermal displacement compensation for the Y axis stored in the RAM 43 is equal to or greater than the set value of the allowable range in the -Y direction (hereinafter referred to as the "Y-axis lower limit value") and equal to or less than the set value of the allowable range in the +Y direction (hereinafter referred to as the "Y-axis upper limit value") (S62). If the amount of thermal displacement compensation for the Y axis is equal to or greater than the Y-axis lower limit value and equal to or less than the Y-axis upper limit value (S62: YES), the CPU 41 proceeds to S66. If the thermal displacement compensation amount for the Y-axis is smaller than the Y-axis lower limit value, or if the thermal displacement compensation amount for the Y-axis is greater than the Y-axis upper limit value (S62: NO), the CPU 41 turns off the ATC execution flag stored in the RAM 43 (ATC execution=NG in FIG. 8) (S63), and transitions to the process at S66.

[0057] If the ATC operation cannot be performed (prohibited) (S66: YES), the CPU 41 issues an alarm (S67). The CPU 41 issues an alarm by sounding an alarm from the speaker 28 and displaying the error content and recovery method on the display unit 26. The error content is displayed, for example, as "The thermal displacement automatic compensation amount has exceeded the compensation limit value during ATC." The recovery method is displayed, for example, as "Press [Reset] to cancel the alarm. Then, execute M355 / operation call 355 in memory operation to cancel the thermal displacement compensation amount.", "The user parameter (thermal displacement automatic compensation) may be set incorrectly. Check the parameters.", "Review the operating conditions (is the movement of each axis excessively large?).", "Check the load while each axis is stopped with the load monitor and check for interference, etc.", "If this occurs frequently during memory operation, add M355 / operation call 355 (cancel thermal displacement compensation amount) before the tool change command.", etc. The CPU 41 ends the execution of the NC program. The user follows the recovery method displayed during memory operation to resolve the error.

[0058] If it is determined in S66 that the execution of the ATC operation is permitted (S66: NO), the CPU 41 shifts the process to S28. Returning to the flow of FIG. 7, the CPU 41 starts the above-mentioned ATC operation (S28) and waits for the end of the ATC operation (S29: NO). When the series of ATC operations of G100 or M06 ends (S29: YES), the CPU 41 moves to the next block (S32) and interprets the next block (S12). If the interpreted next block is M30 (S13: YES), the CPU 41 ends the execution of the NC program. In S66, the CPU 41 determines whether the execution of the ATC operation is permitted based on whether the ATC execution flag stored in the RAM 43 is on or off.

[0059] Next, a case where NC control processing is executed according to a user's operation will be described. The user selects an NC program on the operation panel 25. When the CPU 41 receives an instruction to execute the NC program selected on the operation panel 25, it reads the NC program from the ROM 42 and executes this processing. Note that the flow in FIG. 9 is a flow when NC control is executed manually.

[0060] As shown in FIG. 9, the CPU 41 accepts a key operation by the user on the touch panel of the operation unit 27 (S81). The CPU 41 waits until a key operation is performed (S82: NO). If a key operation is performed (S81: YES), the CPU 41 judges whether the content of the operated key is any of the operations of [single action tool change], [forward rotation of magazine], and [reverse rotation of magazine] (S83). If the content of the operated key is not any of [single action tool change], [forward rotation of magazine], and [reverse rotation of magazine] (S83: NO), and if it is an operation of [end] (S88: YES), the CPU 41 ends the execution of the NC program. If the content of the operated key is not any of [single action tool change], [forward rotation of magazine], [reverse rotation of magazine], and [end] (S88: NO), the CPU 41 executes an operation corresponding to the operated key (S89). After executing the operation, the CPU 41 returns to S81 and accepts a key operation by the user.

[0061] If the operated key is any of the operations of [tool change single action], [magazine forward rotation], and [magazine reverse rotation] (S83: YES), the operation pattern is determined (S91). In the case of the operation of [tool change single action], the CPU 41 determines the operation pattern according to the operation of moving from the P0 point to the P1 point or the R point (A1 in FIG. 5), the operation of moving from the P1 point or the R point to the ATC preparation position and the ATC position via the ATC position to the ATC origin (A2, A3, A4, A5 in FIG. 5), and the operation of moving from the ATC origin to the ATC preparation position via the ATC position (A7, A8 in FIG. 5). In the case of the operation of [magazine forward rotation] or [magazine reverse rotation], the CPU 41 determines the operation pattern according to the operation of the spindle 7 to avoid interference between the tool magazine 31 and the spindle 7 when the tool magazine 31 is turned (A61 or A62 in FIG. 5).

[0062] The CPU 41 judges whether the determined motion pattern includes a motion within the ATC region (S96). Since the motion (A1 in FIG. 5) from point P0 to point P1 or point R does not include a motion within the ATC region (S96: NO), the CPU 41 executes the motion pattern and moves the spindle 7 (S98). The CPU 41 returns to S81 and accepts a key operation by the user.

[0063] The operation of moving from the P0 point or the R point to the ATC origin via the ATC preparation position and the ATC position (A2, A3, A4, A5 in FIG. 5), and the operation of moving from the ATC origin to the ATC preparation position via the ATC position (A7, A8 in FIG. 5) include operations within the ATC area (S96: YES), so the CPU 41 first executes the above-mentioned ATC execution confirmation process (S97). If the M353 command has been executed in the NC program executed beforehand, "thermal displacement compensation = OK" is stored in the RAM 43. In this case, if the thermal displacement compensation amount is within the allowable range, the execution of the ATC operation is permitted, and if the thermal displacement compensation amount is outside the allowable range, the execution of the ATC operation is not permitted (prohibited). If the M355 command has been executed in the NC program executed beforehand, "thermal displacement compensation = NG" is stored in the RAM 43, and the execution of the ATC operation is permitted. After the ATC execution confirmation process is completed, the CPU 41 executes the operation pattern and moves the spindle 7 (S98). The CPU 41 returns to S81 and accepts a key operation by the user.

[0064] As described above, when executing the G100 or M06 command, the numerical control device 40 does not execute an ATC operation if the instruction to perform thermal displacement compensation by the M353 command and then move the spindle 7 is stored in the RAM 43. Therefore, even if the movement position of the spindle head 6 is significantly deviated from the tool exchange position by the ATC device 30 due to the estimation error included in the compensation amount based on the calculation result of the thermal displacement amount and the user's adjustment of the movement amount of the spindle head 6, the numerical control device 40 will not damage the ATC device 30 by prohibiting the execution of the ATC operation.

[0065] The ATC device 30 has a permissible mechanical deviation range for deviation of the moving position of the spindle head 6 from the tool exchange position. When executing the G100 or M06 command, even if the instruction to perform thermal displacement compensation by the M353 command and then move the spindle 7 is stored in the RAM 43, the numerical control device 40 executes the ATC operation if the amount of thermal displacement compensation is within the range of the set value of the allowable range (any of the ranges of the X-axis lower limit value or more and the X-axis upper limit value or less, the range of the Z-axis lower limit value or more and the Z-axis upper limit value or less, and the range of the Y-axis lower limit value or more and the Y-axis upper limit value or less). In other words, if the moving position of the spindle head 6 deviates from the tool exchange position by the ATC device 30 beyond the range of the set value of the allowable range, the numerical control device 40 prohibits the execution of the ATC operation, so that the ATC device 30 is not damaged.

[0066] When the execution of the ATC operation is prohibited, the numerical control device 40 notifies the user of the prohibition. Therefore, the user can recognize that the movement position of the spindle head 6 is misaligned and perform an adjustment operation so that the tool can be changed correctly.

[0067] The ATC preparation position is a position that the spindle head 6 passes through immediately before moving to the ATC position. Therefore, the numerical control device 40 can use the ATC preparation position, which is closer to the ATC position and therefore has a smaller error in the thermal displacement compensation amount, as a check position, and use the thermal displacement compensation amount at the ATC preparation position to determine whether the thermal displacement compensation amount is within the set value range of the allowable range.

[0068] In the above description, the X-axis ball screw 11B, the Z-axis ball screw 12B, and the Y-axis ball screw 13B are an example of the "multiple screw shafts" of the present invention. The ATC device 30 is an example of the "tool exchange device" of the present invention. The M353 command is an example of the "thermal displacement compensation command" of the present invention. A state in which the spindle 7 is moved after performing thermal displacement compensation for at least one of the X-axis, Z-axis, and Y-axis (thermal displacement compensation = OK) is stored in the RAM 43 is an example of a state in which the "instruction by the thermal displacement compensation command is valid" of the present invention. The CPU 41 that executes the processes of S51, S56, and S61 is an example of the "thermal compensation determination unit" of the present invention. The G100 or M06 command is an example of the "tool exchange command" of the present invention. The CPU 41 that executes the process of S26 is an example of the "tool exchange determination unit" of the present invention. The CPU 41 that executes the processes of S53, S58, and S63 is an example of the "prohibition unit" of the present invention. The ranges from the X-axis lower limit value to the X-axis upper limit value, the Z-axis lower limit value to the Z-axis upper limit value, and the Y-axis lower limit value to the Y-axis upper limit value are examples of the "range of limit correction amount" of the present invention. The CPU 41 that executes the processes of S52, S57, and S62 is an example of the "limit determination unit" of the present invention. The CPU 41 that executes the process of S67 is an example of the "notification unit" of the present invention. Point P1 or point R is an example of the "return position" of the present invention. The ATC position is an example of the "exchange position" of the present invention. The grip arm 35 is an example of the "tool holding unit" of the present invention. The ATC preparation position is an example of the "preparation position" of the present invention.

[0069] The present invention is not limited to the above embodiment, and various modifications can be made. The machine tool 1 moves the column 5 in the X-axis direction, the spindle 7 in the Z-axis direction, and the spindle 7 in the Y-axis direction to relatively move the workpiece and the tool 91 in the X-axis, Y-axis, and Z-axis directions, but other structures are also possible, and for example, the column 5 may be moved in two axial directions, the X-axis and the Z-axis, and the spindle 7 may be moved in the Y-axis direction.

[0070] Among the motion patterns of [single action tool change] in NC control processing (manual), the motion (A2, A3, A4, A5 in FIG. 5) moving from P1 point or R point to the ATC preparation position, via the ATC position, to the ATC origin may be divided into a motion pattern of moving from P0 point or R point to the ATC preparation position (A2, A3 in FIG. 5) and a motion of moving from the ATC preparation position to the ATC origin via the ATC position (A4, A5 in FIG. 5). When the spindle 7 starts moving from the ATC preparation position to the ATC position (first), the numerical control device 40 judges whether or not to prohibit the execution of the ATC motion, so that the spindle head 6 can move from the P1 point or R point to the ATC preparation position without any restrictions.

[0071] In the above case, the operation pattern may be further divided into an operation of moving from point P0 or point R to the ATC preparation position (A2, A3 in FIG. 5), an operation of moving from the ATC preparation position to the ATC position (A4 in FIG. 5), and an operation of moving from the ATC position to the ATC origin (A5 in FIG. 5). Also, the operation of moving from the ATC origin to the ATC preparation position via the ATC position (A7, A8 in FIG. 5) may be divided into an operation pattern of moving from the ATC origin to the ATC position (A7 in FIG. 5) and an operation of moving from the ATC position to the ATC preparation position (A8 in FIG. 5).

[0072] The numerical control device 40 may perform the ATC execution confirmation process not only at the start of the movement of the spindle 7 from the ATC preparation position to the ATC position, but also during the movement to determine whether or not to prohibit the execution of the ATC operation. Even in this case, the numerical control device 40 can move the spindle head 6 from the P1 point or the R point to the ATC preparation position without any restrictions. The machine tool 1 may be a vertical machine tool in which the axial direction of the spindle is vertical. In the case of a vertical machine tool, the ATC execution confirmation process in the NC control process (automatic) may be executed as the first process when the G100 command is executed. Also, in the case of a vertical machine tool such as that described in Japanese Patent Publication No. 7-80109, for example, only the Z-axis ball screw extending in the vertical direction is involved in the movement of the spindle 7 in the ATC operation. Therefore, the check position is the position of "Z = machine origin" on the Z axis, and the X-axis and Y-axis do not need to be targets for checking whether or not thermal displacement compensation is executed in the ATC execution confirmation process. Also, the ATC execution confirmation process in NC control processing (manual) is determined based on whether or not the motion pattern is included in the ATC area, and may be executed at the beginning of the motion pattern. That is, the motion pattern in which the spindle 7 moves from the machining end position to the Z-axis mechanical origin is not subject to the ATC execution confirmation process, but the motion patterns in which the spindle 7 moves from the Z-axis mechanical origin to the ATC origin, the magazine is rotated, and the ATC origin is moved to the Z-axis mechanical origin are subject to the ATC execution confirmation process.

[0073] The machine tool 1 may be a vertical double-arm type machine tool. Even in the case of a vertical double-arm type machine tool, the ATC execution confirmation process in the NC control process (automatic) may be executed as the first process when executing the G100 command. In the case of a vertical double-arm type machine tool, the check position is the position of "X, Z, Y = 0, Z-axis machine origin, 0". Also, the ATC execution confirmation process in the NC control process (manual) may be executed at the beginning of the operation pattern, judging whether the operation pattern is included in the ATC area. That is, any of the operation patterns of the operation of the spindle 7 moving from the machining end position to the Z-axis ATC origin, the operation of the spindle 7 moving from the Z-axis ATC origin to the ATC origin, the operation of replacing the tool attached to the spindle 7, and the operation of the spindle 7 moving from the ATC origin to the Z-axis machine origin may be the target of the ATC execution confirmation process. [Explanation of symbols]

[0074] 1 Machine tools 6 Spindle head 7 Spindle 9 Rotating Table 11B X-axis ball screw 12B Z-axis ball screw 13B Y-axis ball screw 30 ATC device 35 Grip Arm 40 Numerical Control Device 41 CPU 91 Tools

Claims

1. A numerical control device controls a machine tool based on an NC program composed of a plurality of blocks having control commands, the machine tool comprising a spindle to which a tool can be attached, a spindle head rotatably supporting the spindle, a plurality of screw shafts extending in three intersecting axial directions and used for relative movement of the spindle head with respect to a table holding a workpiece to be machined by the tool, and a tool changer for changing the tool attached to the spindle, the machine tool comprising: a spindle to which a tool can be attached; a thermal correction determination unit that determines whether or not an instruction by a thermal displacement correction command that instructs correction of the amount of movement of the spindle head in the axial direction of the screw shaft is valid; a tool change determination unit that determines whether a command to be executed according to the NC program is a tool change command instructing the change of the tool; a prohibition unit that prohibits execution of a tool change operation based on the tool change command when the tool change determination unit determines that the command to be executed is the tool change command and when the thermal compensation determination unit determines that an instruction by the thermal displacement compensation command is valid; A numerical control device comprising:

2. The prohibition unit is a limit determination unit that determines whether or not a thermal displacement compensation amount, which is a compensation value for the amount of movement of the spindle head in the axial direction of the screw shaft that is to be compensated for by the thermal displacement compensation command, is within a range of a predetermined limit compensation amount; When the tool change determination unit determines that the command to be executed is the tool change command, the thermal compensation determination unit determines that the instruction by the thermal displacement compensation command is valid, and the limit determination unit determines that the range of the limit compensation amount is exceeded, the execution of a tool change operation based on the tool change command is prohibited. The numerical control device according to claim 1 .

3. The tool change command is executed based on the tool change command by the prohibition unit. The numerical control device according to claim 2 .

4. during tool replacement, the spindle head moves from a return position, which is a position to which the tool moves after the workpiece is processed by the tool and where the tool does not collide with the workpiece, to an replacement position, which is a position where the tool replacement device replaces the tool held by the spindle with a next tool that is the tool to be used next, via a preparation position, which is a position away from the replacement position, in a direction opposite to a replacement direction, which is a direction in which the spindle head moves to hold the tool in a tool holding unit of the tool replacement device; The tool change command is a first movement command which is a command to move the spindle head from the return position to the preparation position; a second movement command which is a command to move the spindle head from the preparation position to the replacement position; Including, The tool change determination unit determines whether a command to be executed is the tool change command based on whether a command being executed is the second movement command. The numerical control device according to claim 3 .

5. The tool change determination unit determines whether a command to be executed is the tool change command based on whether a command to start execution is the second movement command. The numerical control device according to claim 4 .

6. The limit determination unit is determining whether the thermal displacement compensation amount in the direction along the replacement direction when the spindle head is located at the preparation position is within the range of the limit compensation amount; The numerical control device according to claim 5 .

7. A control method for a numerical control device which controls a machine tool including a spindle to which a tool can be attached, a spindle head rotatably supporting the spindle, a plurality of screw shafts extending in three intersecting axial directions and used for relative movement of the spindle head with respect to a table which holds a workpiece to be machined by the tool, and a tool changer which changes the tool attached to the spindle, based on an NC program composed of a plurality of blocks having control commands, and corrects an amount of movement of the spindle head based on a calculation result of an amount of thermal displacement in an axial direction of at least one of the plurality of screw shafts, a thermal correction judgment step of judging whether or not an instruction by a thermal displacement correction command instructing correction of the amount of movement of the spindle head in the axial direction of the screw shaft is valid; a tool change determination step of determining whether or not a command executed according to the NC program is a tool change command instructing a change of the tool; a prohibition step of prohibiting execution of a tool change operation based on the tool change command when the tool change determination step determines that the command to be executed is the tool change command and when the thermal compensation determination step determines that an instruction by the thermal displacement compensation command is valid; A control method comprising:

8. A program for controlling a machine tool based on an NC program composed of a plurality of blocks having control commands, the machine tool comprising a spindle on which a tool can be attached, a spindle head rotatably supporting the spindle, a plurality of screw shafts extending in three intersecting axial directions and used for relative movement of the spindle head with respect to a table holding a workpiece to be machined by the tool, and a tool changer for changing the tool attached to the spindle, the program comprising: a program for causing a numerical control device to function to correct an amount of movement of the spindle head based on a calculation result of an amount of thermal displacement in an axial direction of at least one of the plurality of screw shafts; On the computer, a thermal correction judgment step of judging whether or not an instruction by a thermal displacement correction command instructing correction of the amount of movement of the spindle head in the axial direction of the screw shaft is valid; a tool change determination step of determining whether or not a command executed according to the NC program is a tool change command instructing a change of the tool; a prohibition step of prohibiting execution of a tool change operation based on the tool change command when the tool change determination step determines that the command to be executed is the tool change command and when the thermal compensation determination step determines that an instruction by the thermal displacement compensation command is valid; A program characterized by executing the above.

9. A program for controlling a machine tool based on an NC program composed of a plurality of blocks having control commands, the machine tool comprising a spindle on which a tool can be attached, a spindle head rotatably supporting the spindle, a plurality of screw shafts extending in three intersecting axial directions and used for relative movement of the spindle head with respect to a table holding a workpiece to be machined by the tool, and a tool changer for changing the tool attached to the spindle, the program comprising: a program for causing a numerical control device to function to correct an amount of movement of the spindle head based on a calculation result of an amount of thermal displacement in an axial direction of at least one of the plurality of screw shafts; On the computer, a thermal correction judgment step of judging whether or not an instruction by a thermal displacement correction command instructing correction of the amount of movement of the spindle head in the axial direction of the screw shaft is valid; a tool change determination step of determining whether or not a command executed according to the NC program is a tool change command instructing a change of the tool; a prohibition step of prohibiting execution of a tool change operation based on the tool change command when the tool change determination step determines that the command to be executed is the tool change command and when the thermal compensation determination step determines that an instruction by the thermal displacement compensation command is valid; A program that executes A storage medium storing the above.

Citation Information

Patent Citations

  • Machine tool, calculation method and computer program

    JP6582522B2

Cited By

  • Intelligent control method for tool changing robot of shield tunneling machine

    CN120715910A