Numerical control device, system, control method, and program

By estimating and storing machine tool load conditions in CNC equipment and directly applying these estimation results during program execution, the problem of needing to readjust the operation speed after tool settings changes is solved, and the effect of rotating the tool magazine with optimal conditions during the first program operation is achieved.

JP2025074398APending Publication Date: 2025-05-14BROTHER KOGYO KK
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023185170
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-10-30
Publication Date
2025-05-14

AI Technical Summary

Technical Problem

After the tool settings change, existing machine tools need to readjust the operating speed to match the new load conditions, resulting in an extended tool change time.

Method used

A CNC device is designed to optimize the rotation time constant of the tool magazine's rotation axis by estimating the load conditions of the tool magazine's rotation axis and storing it with a specific setting mode, and then directly read and apply these estimation results when the program is executed, avoiding re-estimation.

Benefits of technology

After the tool setting changes, the tool magazine can be rotated with the optimal load conditions during the first program operation, reducing the tool change time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025074398000001_ABST
    Figure 2025074398000001_ABST
Patent Text Reader

Abstract

To provide a numerical control device capable of rotating a tool magazine with a time constant optimum for the loading conditions even during a first program run after a setup change, a system, a control method, and a program.SOLUTION: A control unit of a numerical control device estimates the loading conditions around a rotation axis of a tool magazine. The loading conditions are defined by a loaded tool inertia and the unbalanced load of the loaded tool. The control unit stores the estimation results of the loading conditions in association with estimation variables (#500 to #505) corresponding to the setup patterns in the tool magazine. When setting instruction variables (#30054 and #30055) are read during execution of an NC program, the control unit sets the estimation results stored in association with the estimation variables as the read loading conditions. The control unit also calculates the time constant for acceleration and deceleration during the rotation of the tool magazine and executes the rotation operation of the tool magazine according to the set loading conditions.SELECTED DRAWING: Figure 12
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 system, a control method, and a program. [Background technology]

[0002] There is known a machine tool equipped with a tool magazine for loading tools, which calculates the inertia around the rotation axis of the tool magazine and changes the rotation speed of the tool magazine according to the calculated inertia. Patent Document 1 discloses a machine tool in which the operating speed of the tool magazine can be adjusted by a user operation. [Prior art documents] [Patent documents]

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

[0004] In the machine tool of Patent Document 1, when the loading conditions (the inertia and offset load of the tool to be loaded) are changed due to a tool changeover, etc., it is necessary to re-adjust the operating speed and update the inertia and offset load. For example, when using the machine in such a way that a fixed setup pattern is replaced and operated, even if the setup pattern is changed to one in which loading conditions have been set before, it is necessary to re-estimate the loading conditions. Therefore, there is a problem in that the tool change time cannot be reduced in the first program operation after the setup changeover.

[0005] An object of the present invention is to provide a numerical control device, system, control method, and program that can rotate a tool magazine with a time constant that is optimal for the loading conditions even in the first program operation after a setup change. [Means for solving the problem]

[0006] The numerical control device of claim 1 is a numerical control device that outputs a command to a motor for a machine tool having a tool magazine that can load tools and that transports the tools to a predetermined position by rotating the tool magazine, and includes a control unit, the control unit executes the following steps: an estimation process for estimating loading conditions defined by the inertia around the rotation axis of the tool magazine and an offset load; a storage process for storing the estimation result of the estimation process in association with an estimation variable corresponding to a setup pattern of the tools in the tool magazine; a setting process for setting the estimation result stored in the storage process and associated with the estimation variable as the loading condition when a setting instruction variable is read during execution of an NC program; a calculation process for calculating a time constant for acceleration and deceleration of the motor during a rotation operation of the tool magazine according to the loading condition set in the setting process; and a rotation execution process for executing the rotation operation of the tool magazine with the time constant calculated in the calculation process. The numerical control device can store the estimation result of the loading conditions in association with the estimation variable for each setup pattern. Therefore, when the loading conditions are changed to a setup pattern for which the loading conditions have already been estimated, the numerical control device can read out the estimated results corresponding to the setup pattern after the changeover and set them as the loading conditions. Therefore, even when running the first NC program after the changeover to the estimated setup pattern, the numerical control device can rotate the tool magazine with a time constant that is optimal for the loading conditions without re-estimating the loading conditions.

[0007] The storage process of the numerical control device of claim 2 may be a process of storing the estimation result in association with the estimation variable when a storage instruction variable is read, which is an instruction to store the estimation result of the estimation process in association with the estimation variable during execution of the NC program. Therefore, the numerical control device can store the estimation result in association with the estimation variable without a user operation during execution of the NC program.

[0008] The estimation process of the numerical control device of claim 3 may be a process of estimating the loading condition based on a result of executing the turning operation with a reference time constant at which the motor can operate when the setup pattern is a reference setup pattern. Therefore, when estimating the loading condition, the numerical control device can safely turn the tool magazine regardless of the setup pattern.

[0009] The control method of claim 4 is a control method of a numerical control device that outputs a command to a motor for a machine tool having a tool magazine that can hold tools and that transports the tools to a predetermined position by rotating the tool magazine with the motor, and is characterized in that it includes an estimation step of estimating loading conditions defined by the inertia around the rotation axis of the tool magazine and an offset load, a storage step of storing the estimation result of the estimation step in association with an estimated variable corresponding to a setup pattern of the tools in the tool magazine, a setting step of setting the estimation result stored in the storage step and associated with the estimated variable as the loading condition when a setting instruction variable is read during execution of an NC program, a calculation step of calculating a time constant for acceleration and deceleration of the motor during a rotating operation of the tool magazine in accordance with the loading condition set in the setting step, and a rotation execution step of executing the rotating operation of the tool magazine with the time constant calculated in the calculation step. The numerical control device can obtain the effect of claim 1 by performing each of the above steps.

[0010] The program of claim 5 is a program executable by a computer of a numerical control device that outputs a command to a motor for a machine tool having a tool magazine that can hold tools and that transports the tools to a predetermined position by rotating the tool magazine with the motor, and is characterized in that the computer is made to execute the following steps: an estimation step of estimating loading conditions defined by the inertia around the rotation axis of the tool magazine and an offset load; a storage step of storing the estimation result of the estimation step in association with an estimation variable corresponding to a setup pattern of the tools in the tool magazine; a setting step of setting the estimation result stored in the storage step and associated with the estimation variable as the loading condition when a setting instruction variable is read during execution of an NC program; a calculation step of calculating a time constant for acceleration and deceleration of the motor during a rotating operation of the tool magazine in accordance with the loading condition set in the setting step; and a rotation execution step of executing the rotating operation of the tool magazine with the time constant calculated in the calculation step. The numerical control device can obtain the effect of claim 1 by the computer of the numerical control device performing each of the above steps.

[0011] The system of claim 6 is a system including a numerical control device for outputting a command to a motor for a machine tool having a tool magazine capable of loading tools and rotating by the drive of the motor to transport the tools to a predetermined position, and a PLC for controlling the numerical control device, wherein a control unit of the numerical control device executes an estimation process for estimating a loading condition defined by an inertia about a rotation axis of the tool magazine and an offset load, and the PLC includes a first specified data register which is turned on when a specific condition is satisfied, a first data register which stores an estimation result of the estimation process, and a first specified data register which, when the first specified data register is turned on, transmits the estimation result stored in the first data register to the tool magazine. The present invention is characterized in that the control unit of the numerical control device further executes a setting process for setting the estimation result stored in the third data register as the loading condition, a calculation process for calculating a time constant for acceleration / deceleration of the motor during a swing operation of the tool magazine according to the loading condition set in the setting process, and a swing execution process for executing the swing operation with the time constant calculated in the calculation process. The second data register of the PLC stores the estimated results of the loading conditions for each setup pattern. When the loading conditions are already changed to the estimated setup pattern, the estimated results stored in the second data register and corresponding to the setup pattern are stored in the third data register of the PLC. The numerical control device sets the estimated results stored in the third data register as the loading conditions. Therefore, even when running the first NC program after changing the setup to the estimated setup pattern, the numerical control device can rotate the tool magazine with a time constant that is optimal for the loading conditions without re-estimating the loading conditions.

[0012] In the system of claim 7, the second specified data register may be a plurality of second specified data registers corresponding to the plurality of setup patterns, the second data register may be a plurality of second data registers associated with the plurality of second specified data registers, and the third data register may store the estimation result stored in the second data register corresponding to the second specified data register that is turned on among the plurality of second specified data registers. Therefore, the system can store the estimation result for each of the plurality of setup patterns, and can perform the rotation operation with an optimal time constant according to the plurality of setup patterns.

[0013] In the system of claim 8, the specific condition may be the end of the NC program. Therefore, the system can set the last estimated result of the NC program as the loading condition, thereby improving the reliability of the estimated result.

[0014] In the system of claim 9, the PLC may further control a tool changing device that changes the tools in the tool magazine, and when the PLC receives a completion signal indicating that the tool changeover is completed from the tool changing device, the PLC may turn on the second specific data register corresponding to the changeover completed setup pattern. Therefore, the system can set the estimation result corresponding to the changeover completed setup pattern of the tool magazine as the loading condition.

[0015] A control method according to claim 10 is a control method for a system including a numerical control device for outputting a command to a motor of a machine tool having a tool magazine capable of loading tools and rotating the tool magazine by being driven by the motor to transport the tools to a predetermined position, and a PLC for controlling the numerical control device, wherein the numerical control device performs an estimation step of estimating a loading condition defined by an inertia about a rotation axis of the tool magazine and an offset load, and the PLC performs a first on step of turning on a first specified data register when a specific condition is satisfied, a first storage step of storing the estimation result in the estimation step in the first data register, and a second storage step of storing the estimation result stored in the first data register when the first specified data register is turned on, in the tool magazine. a second storing step of storing the estimation result stored in the second data register in correspondence with the tool setup pattern in the tool magazine in a second data register, a second on step of turning on a second specified data register after the setup change of the tool magazine is completed, and a third storing step of storing the estimation result stored in the second data register in a third data register when the second specified data register is turned on, and the numerical control device further performs a setting step of setting the estimation result stored in the third data register as the loading condition, a calculation step of calculating a time constant for acceleration / deceleration of the motor during the swing operation of the tool magazine in accordance with the loading condition set in the setting step, and a swing execution step of executing the swing operation with the time constant calculated in the calculation step. The effect recited in claim 6 can be obtained by the numerical control device and the PLC constituting the system performing the above corresponding steps.

[0016] A computer-readable storage medium having the above program stored thereon is also novel and useful. [Brief description of the drawings]

[0017] [Figure 1] FIG. 2 is a front view of the machine tool 1 and the tool changer 70. [Diagram 2] 2 is a partially cutaway view of the periphery of the spindle head 7 as viewed from the right side. [Diagram 3] 13 is a diagram showing the tool magazine 21 when the angle θ of the magazine body 22 is 0 deg. [Figure 4] 13 is a diagram showing the tool magazine 21 when the angle θ of the magazine body 22 is a reference angle θa. [Diagram 5] 2 is a block diagram showing the electrical configuration of a numerical control device 40, a machine tool 1, and a tool changer 70. FIG. [Figure 6] FIG. 4 is a functional block diagram of a control unit 41. [Figure 7] 13 is a flowchart of a loading condition setting process. [Figure 8] FIG. 13 is a diagram showing a loading condition setting screen 51. [Figure 9] 1 is a table showing a list of macro variables. [Figure 10] 13 is a table showing estimated variables for setup patterns A to C. [Figure 11] FIG. 13 shows NC programs A1, B1, and C1 for the first execution after a changeover to setup patterns A to C. [Figure 12] 13A to 13C are diagrams showing NC programs A2, B2, and C2 to be implemented for the second or subsequent times after the setup change to setup patterns A to C. [Figure 13] 4 is a flowchart of a loading condition estimation process (first embodiment). [Figure 14] FIG. 2 is a block diagram showing the electrical configuration of the system 100. [Figure 15] 1 is a table showing a list of functions of BDX and BDY. [Figure 16] FIG. 1 is an image of an OM used to store estimation results. [Figure 17] This is an image of the OM used to set loading conditions. [Figure 18] 11 is a table showing loading condition setting signals, an OM for inertia estimation, and an OM for unbalanced load estimation for setup patterns A to C. [Figure 19] FIG. 13 is an image diagram of an OM for storing the estimation results of setup patterns A to C and an OM for setting loading conditions. [Figure 20]13 is a flowchart of a PLC side control process (second embodiment). [Figure 21] 13 is a flowchart of an NC side control process (second embodiment). [Figure 22] FIG. 13 is a diagram showing NC programs A3, B3, and C3 in which G-codes are set (first modified example). [Diagram 23] 11 is a block diagram showing an electrical configuration of a system 200 (second modified example). [Figure 24] 13 is a table (second modified example) showing a list of communication commands. [Diagram 25] 13 is a timing chart (second modified example) of transmission and reception of communication commands when a program operation in the setup pattern A is the first time. [Figure 26] 13 is a timing chart (second modified example) of transmission and reception of communication commands when a program operation in the setup pattern A is performed for the second or subsequent times. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0018] A first embodiment of the present invention will be described with reference to Figs. 1 to 13. In the following description, left / right, up / down, and front / rear directions are used as indicated by arrows in the drawings. The left / right, up / down, and front / rear directions of machine tool 1 are the X-axis, Y-axis, and Z-axis directions of machine tool 1, respectively. Machine tool 1 shown in Fig. 1 is a vertical machining center with a spindle 9 extending in the up / down direction (Z-axis direction). "ATC" in this embodiment is an abbreviation for "Automatic Tool Changer." "NC" in this embodiment is an abbreviation for "Numerical Control."

[0019] The structure of the machine tool 1 will be described with reference to Figs. 1 and 2. The machine tool 1 includes a base 2, a column 5, a control box 6, a table 13, a spindle head 7, a spindle 9, a tool changer 20, and a tool replacement device 70. The base 2 is a metal base having a substantially rectangular parallelepiped shape. The column 5 is erected at the rear of the upper part of the base 2. The control box 6 is provided on the rear side of the column 5. The control box 6 houses a numerical control device 40 (see Fig. 5), which will be described later. The table 13 is movable in two axial directions, the X-axis direction and the Y-axis direction. The spindle head 7 moves up and down in the Z-axis direction in front of the column 5. As shown in Fig. 2, the spindle 9 is rotatably supported inside the spindle head 7. The spindle motor 65 is fixed to the upper part of the spindle head 7. The spindle 9 is connected to a drive shaft 65A extending downward from the spindle motor 65. The spindle 9 is rotated by the drive of the spindle motor 65. The main shaft 9 is provided with a mounting hole 92, a shaft hole 91, a clamping portion 93, and a draw bar 94. The mounting hole 92 is provided at the lower end of the main shaft 9 and communicates with the shaft hole 91 which extends coaxially with the main shaft 9. The clamping portion 93 is provided above the mounting hole 92. The draw bar 94 is provided inside the shaft hole 91.

[0020] Tool 3 includes holder 17 and cutting tool 4. Holder 17 holds cutting tool 4 at one end, and includes mounting portion 17A and pull stud 17B at the other end. Mounting portion 17A is mounted in mounting hole 92. Pull stud 17B protrudes from the top of mounting portion 17A in the axial direction of cutting tool 4. An information medium (not shown) using a magnetic memory element is attached to pull stud 17B. Tool information such as tool number, tool length, tool length compensation value, tool diameter, tool diameter compensation value, and tool weight is recorded on the information medium. When mounting portion 17A is mounted in mounting hole 92, clamping portion 93 clamps pull stud 17B. When drawbar 94 presses clamping portion 93 downward, clamping portion 93 releases clamping of pull stud 17B.

[0021] The spindle head 7 is provided with a crank lever 30 and a tension coil spring (not shown) on the inside. The crank lever 30 is generally inverted L-shaped when viewed from the right side and can swing around a support shaft 31. The support shaft 31 extends in the left-right direction and is fixed inside the spindle head 7. The front end of the crank lever 30 engages from above with a pin 95 provided on a draw bar 94. A plate cam 32 is provided on the rear end of the crank lever 30. A cam follower 34 is supported forward on the upper front surface of the column 5. The cam follower 34 slides on the cam surface of the plate cam 32 which moves up and down. The tension coil spring constantly urges the crank lever 30 clockwise when viewed from the right side. Therefore, the crank lever 30 constantly releases the downward pressure of the pin 95.

[0022] The structure of the tool changer 20 will be described with reference to FIG. 2. The tool changer 20 includes a tool magazine 21, a support base 24, a reducer 25, and a magazine motor 64. The tool magazine 21 is of a turret type. The tool magazine 21 includes a magazine body 22, a rotating shaft 23, and a plurality of grip arms 8. The magazine body 22 is disk-shaped. The rotating shaft 23 is inclined obliquely downward with respect to the front of the machine tool 1. The axis of the rotating shaft 23 passes through a center Q (see FIG. 3) of the magazine body 22 described later. The rotating shaft 23 is provided at the center of rotation of the magazine body 22. The front surface of the magazine body 22 faces the front side of the machine tool 1. The grip arms 8 are provided at predetermined intervals in the circumferential direction on the outer periphery of the magazine body 22. In this embodiment, 28 grip arms 8 are provided on the magazine body 22. Therefore, the tool magazine 21 can load 28 tools 3. The grip arm 8 is provided so as to be swingable in the front-rear direction around a fulcrum 26 fixed to the outer periphery of the magazine body 22. The grip arm 8 has a gripping portion 81 at its tip. The gripping portion 81 detachably grips the holder 17. The spindle position of the tool magazine 21 is the lowest position of the magazine body 22, a position adjacent to and facing the spindle 9. The grip arm 8 at the spindle position faces the spindle 9 and is the target position for tool replacement.

[0023] The support base 24 is fixed to a frame (not shown). The frame is fixed to the column 5 and is provided near the spindle head 7. The support base 24 supports the rotating shaft 23. The reducer 25 is fixed to the upper part of the support base 24. The reducer 25 has a plurality of gears and cams (not shown). The magazine motor 64 is fixed to the upper part of the reducer 25. The drive shaft of the magazine motor 64 is connected to the reducer 25. The reducer 25 reduces the driving force of the magazine motor 64 and transmits it to the rotating shaft 23. Therefore, the tool magazine 21 rotates by the driving force of the magazine motor 64.

[0024] The ATC operation will be described with reference to FIG. 2. The ATC operation is a tool exchange operation, which is an operation for attaching and detaching the tool 3 to the spindle 9. With the attachment portion 17A of the tool 3 attached to the attachment hole 92 of the spindle 9, the spindle head 7 rises from the machining position of the workpiece fixed to the table 13. The cam follower 34 slides from top to bottom on the cam surface of the plate cam 32 of the crank lever 30. The crank lever 30 rotates counterclockwise as viewed from the right side about the support shaft 31. The front end of the crank lever 30 engages with the pin 95 from above and presses the draw bar 94 downward. The draw bar 94 urges the clamping portion 93 downward. Therefore, the clamping portion 93 releases the clamping of the pull stud 17B. The grip arm 8 at the spindle position swings counterclockwise as viewed from the right side about the fulcrum base 26 as the spindle head 7 rises. The gripping portion 81 of the grip arm 8 grips the tool 3 currently attached to the spindle 9 (hereinafter referred to as the “current tool 3”) at the same time as the clamping by the clamping portion 93 is released.

[0025] The spindle head 7 rises further toward the ATC origin. The current tool 3 held by the gripper 81 is released from the mounting hole 92 of the spindle 9. When the spindle head 7 reaches the ATC origin, the tool changer 20 rotates the magazine body 22 by rotating the magazine motor 64 based on a command from the numerical control device 40. The tool changer 20 indexes the next tool 3 to be mounted (hereinafter referred to as the "next tool 3") to the spindle position, as specified by a control command in the NC program. The next tool 3 indexed to the spindle position is positioned below the spindle 9.

[0026] The spindle head 7 descends from the ATC origin. The mounting portion 17A of the holder 17 of the next tool enters the mounting hole 92 of the spindle 9. With the mounting portion 17A inserted into the mounting hole 92, the spindle head 7 descends further. The cam follower 34 slides on the cam surface of the plate cam 32 from bottom to top. The crank lever 30 rotates clockwise around the support shaft 31 as viewed from the right side. The front end of the crank lever 30 moves upward away from the pin 95, releasing the downward pressure on the draw bar 94. The draw bar 94 releases the downward bias of the clamping portion 93. The clamping portion 93 clamps the pull stud 17B of the next tool 3. The next tool 3 is attached to the spindle 9. As the spindle head 7 descends further, the gripping portion 81 of the grip arm 8 comes off the next tool 3 attached to the spindle 9. This completes the tool change from the current tool 3 to the next tool 3 in the spindle 9.

[0027] The configuration of the tool changer 70 will be described with reference to Fig. 1. The tool changer 70 is a robot that receives a command from, for example, the numerical control device 40 and performs a setup change of the tool 3 in the tool magazine 21. The tool changer 70 of this embodiment is a multi-joint robot arm.

[0028] The tool changing device 70 includes a base 71, an arm 72, a tool gripping unit 73, and a stocker 75. The base 71 is installed to the right of the machine tool 1. The arm 72 is installed on the top surface of the base 71 and is a multi-joint arm consisting of multiple arms. The tool gripping unit 73 is attached to the tip of the arm 72 and includes a pair of claws 731. The pair of claws 731 can grip a tool 3. The tool gripping unit 73 is provided with an information reading and writing device 732. The information reading and writing device 732 includes a magnetic head and can read and write information from a magnetic memory element. The information reading and writing device 732 can read and write information from an information medium attached to the pull stud 17B of the holder 17 of the tool 3. The stocker 75 is installed on the top surface of the base 71 and can store multiple tools 3.

[0029] The tool changer 70 having the above structure can, in response to a command from the numerical control device 40, remove the tool 3 from the grip arm 8 located at the attachment / detachment position of the tool magazine 21 and transport the tool 3 to the stocker 75, and can also transport the tool 3 from the stocker 75 and attach the tool 3 to the grip arm 8 located at the attachment / detachment position of the tool magazine 21. This allows the tool changer 70 to change the setup of the tool 3 in the tool magazine 21.

[0030] 3 and 4, the loading state of the tools 3 in the tool magazine 21 will be described. For example, as shown in FIG. 3, the tool magazine 21 is in a state in which the tools 3 are supported by 12 of the 28 grip arms 8, that is, grip arms 801-811 and 828. No tools 3 are attached to the grip arms 812-827. The tools 3 attached to the grip arms 801-811 and 828 are the tools 301-311 and 328. The weights G1-G28 of the tools 301-311 and 328 may all be the same or may be different from each other. Note that in this embodiment, the weights G1-G28 are all described as being the same.

[0031] When the tool magazine 21 is in the loaded state shown in Fig. 3, many of the tools 3 supported by the grip arm 8 are located on the left side of the magazine body 22. Therefore, an unbalanced load that tends to rotate the magazine body 22 around the center Q of the magazine body 22 acts on the magazine body 22 due to the tools 301-311, 328. The unbalanced load is a rotational moment. The unbalanced load due to the tools 301-311, 328 is a total unbalanced load. The total unbalanced load tends to rotate the magazine motor 64 in a specific direction (counterclockwise in the case of Fig. 3).

[0032] The total unbalanced load varies based on the position of the grip arm 8 supporting the tool 3, the weight of the tool 3 supported by the grip arm 8, and the angle θ of the magazine body 22. When the grip arm 801 is in the spindle position, the angle θ is 0 deg. When the angle θ is 0 deg and the magazine body 22 rotates clockwise around the center Q, the angle θ becomes positive. When the magazine body 22 rotates counterclockwise around the center Q, the angle θ becomes negative.

[0033] When the tool magazine 21 is in the state shown in FIG. 4 (angle θ=−58 deg), the offset loads of the tools 301-311, 328 acting on the magazine body 22 balance each other with the center Q as the fulcrum. The total offset load becomes zero. The angle θ of the magazine body 22 at which the total offset load becomes zero is the reference angle θ. a The loading state of the tools 3 in the tool magazine 21 changes when the tools 3 are replaced. The replacement of the tools 3 is an operation in which a user, a robot, or the like replaces the tools 3 loaded in the tool magazine 21 with tools 3 not loaded in the tool magazine 21 before the machine tool 1 processes a workpiece.

[0034] With reference to FIG. 5, the main parts of the electrical configuration of the numerical control device 40, the machine tool 1, and the tool changer 70 will be described. For the sake of convenience, in this embodiment, the electrical configuration for controlling the operation of the tool magazine 21 will be mainly described, and the description of the other electrical configurations will be omitted. The numerical control device 40 includes a control unit 41, a ROM 42, a RAM 43, a storage unit 44, an input / output unit 45, a drive circuit 48, and the like. The control unit 41 is connected to the drive circuit 48 via the input / output unit 45. The control unit 41 includes a CPU and the like, and controls the operation of the machine tool 1 by outputting commands to various motors that drive the machine tool 1. The ROM 42 stores various programs such as a loading condition setting program and a loading condition estimation program. The loading condition setting program is a program that executes a loading condition setting process (see FIG. 7) described later. The loading condition estimation program is a program that executes a loading condition estimation process (see FIG. 13) described later.

[0035] The RAM 43 stores various data generated during the execution of various processes. The storage unit 44 is a rewritable storage medium, such as an EPROM, an EEPROM, or a flash memory. The storage unit 44 stores the NC program, a reference inertia, a reference offset load, a reference time constant, and the like, which will be described later. The input / output unit 45 inputs and outputs various signals between the drive circuit 48, the drive circuit 49, an encoder 641, which will be described later, the control unit 41, the ROM 42, the RAM 43, the storage unit 44, the operation unit 18, and the display unit 19.

[0036] The drive circuit 48 corresponds to the magazine motor 64, and outputs a pulse signal to the magazine motor 64 based on a command output by the control unit 41. The encoder 641 detects the rotational position of the magazine motor 64, and feeds back the detection signal to the drive circuit 48 and the input / output unit 45. The encoder 641 is a general absolute value encoder, and is a position sensor that detects and outputs the absolute position of the rotational position. The drive circuit 49 corresponds to the motor that drives the tool changer 70, and outputs a pulse signal to the motor based on a command output by the control unit 41. The operation unit 18 accepts instructions input by a user's operation, and the display unit 19 displays information to notify the user. The display unit 19 is a liquid crystal touch panel, and also functions as an operation unit.

[0037] A configuration based on the functions of the control unit 41 will be described with reference to FIG. 6. Here, the control of the magazine motor 64 by the control unit 41 will be described. The control unit 41 includes a speed adjustment unit 411, a time constant calculation unit 412, and an inertia / offset load acquisition unit 413. The speed adjustment unit 411 receives a time series change (waveform) of the speed of the magazine motor 64, adjusts the speed waveform, and outputs it to the drive circuit 48. The speed adjustment unit 411 adjusts the speed waveform according to the fluctuation of the offset load generated in the magazine body 22 of the tool magazine 21. The speed adjustment unit 411 has a first filter 421, a second filter 422, and a third filter 423 that adjust and smooth the speed waveform. The first to third filters 421 to 423 are moving average filters. The first filter 421 is a filter for limiting the maximum acceleration during speed adjustment, and the second filter 422 and the third filter 423 are low-pass filters for suppressing the resonance of the rotating shaft 23. The time constant (hereinafter referred to as t1) of the first filter 421 varies depending on the position of the grip arm 8 supporting the tool 3, the weight of the tool 3 supported by the grip arm 8, and the angle θ of the magazine body 22. The time constant (hereinafter referred to as t2) of the second filter 422 and the time constant (hereinafter referred to as t3) of the third filter 423 are fixed values. The inertia / offset load acquisition unit 413 acquires the inertia and offset load of the tool magazine 21 during rotation based on feedback information from the encoder 641.

[0038] Next, a method for the inertia / offset load acquisition unit 413 to acquire the inertia and offset load will be described. The offset load (Tw) is defined as "Fθsin(θ)" (Equation 1). Fθ is the offset load coefficient. θ is the angle of the magazine body 22. Tw is minimum when θ=0°, and maximum when θ=90°. The inertia (J) is defined as "Jθ"=u-f" (Equation 2). θ" represents the second time differential of the angle θ. u is the torque output by the drive circuit 48 to the magazine motor 64, and is a measured value acquired from the drive circuit 48. f satisfies the following formula. ·f=Fθsin(θ)+Fcsign(θ′)+Dθ′ (Math 3) In the formula 3, θ′ represents a first time differential of the angle θ. Fc represents the Coulomb friction with respect to the tool magazine 21. D represents the viscous friction coefficient with respect to the tool magazine 21.

[0039] The inertia / offset load acquisition unit 413 acquires the offset load (Tw) and the inertia (J) from Equations 1 to 3 using the rotational position of the magazine motor 64 included in the feedback information from the encoder 641. Hereinafter, the inertia (J) and the offset load (Tw) acquired by the inertia / offset load acquisition unit 413 will be referred to as the acquired inertia J and the acquired offset load Tw, respectively. The time constant calculation unit 412 calculates a time constant t1 based on the acquired offset load Tw, the acquired inertia J, the reference inertia Jb, the reference offset load Twb, and the reference time constant tb. The reference inertia Jb, the reference offset load Twb, and the reference time constant tb are stored in the storage unit 44 as defaults.

[0040] The reference time constant tb is a time constant that allows the magazine motor 64 to operate without exceeding the maximum torque that can be output in a reference loading state. The reference loading state is a loading state in which the maximum inertia and maximum unbalanced load are determined by the machine specifications, and is, for example, a state in which the tools 3 are loaded with the tools biased to one side of the tool magazine 21 as shown in FIG. 1. The maximum inertia is the reference inertia Jb. The maximum unbalanced load is the reference unbalanced load Twb. The reference inertia Jb and the reference unbalanced load Twb are reference loading conditions and can be set by the user.

[0041] Here, a method for calculating the time constant t1 by the time constant calculation unit 412 will be described. Since torque in a rotational motion is the product of angular acceleration and inertia, it can be estimated that when Tw is at its maximum, that is, when θ is 90°, the following relationship holds: amaxb = (Tm - |Twb|) / Jb (Number 4) Here, amaxb is the angular acceleration, and Tm is the maximum torque of the magazine motor 64.

[0042] In this case, the reference time constant tb, which is inversely proportional to amaxb, can be expressed as follows: tb=Vmax / amaxb (Number 5) Note that Vmax is the maximum angular velocity.

[0043] From Equation 4 and Equation 5, the angular acceleration (a'max) during calculation and the time constant t1 to be obtained can be expressed by the following equation. ·a'max=(Tm-|Tw|) / J (Number 6) t1=Vmax / a'max (equation 7) As described above, Tw and J are the obtained offset load Tw and the obtained inertia J.

[0044] Substituting equation 6 for a'max in equation 7, t1 is given by the following equation. t1=(JVmax) / (Tm-|Tw|) (Equation 8).

[0045] Then, when equation 4 is rewritten for Tm, it becomes Tm = Jbamaxb + |Twb|. When this is substituted for Tm in equation 8, t1 becomes the following equation. ·t1=(JVmax) / (Jbamaxb+|Twb|-|Tw|) (Number 9) Furthermore, when equation 5 is rewritten for amaxb, it becomes amaxb = Vmax / tb. Substituting this into amaxb in equation 9, t1 becomes the following equation. ·t1=Jtb / {Jb+tb(|Twb|-|Tw|) / Vmax} (Number 10)

[0046] The time constant calculation unit 412 calculates the time constant t1 using equation 10, and updates the reference time constant tb stored in the storage unit 44 to the time constant t1 obtained by the calculation. Thereafter, the speed adjustment unit 411 uses the updated time constant t1 to adjust and smooth the waveform of the speed of the magazine motor 64 output to the drive circuit 48, and also adjusts the acceleration of the turning operation to an optimum value.

[0047] The above explanation is a method for estimating the inertia and offset load of the entire tool magazine 21, but the inertia and offset load of the tools 3 loaded in the tool magazine 21 (hereinafter referred to as loaded tools) can be calculated using the following equations 11 and 12. The inertia and offset load of the loaded tools can be used for screen display or setting. Loaded tool inertia = inertia of tool magazine 21 (when tools are loaded) - inertia of tool magazine 21 (when no tools are loaded) (Equation 11) Loaded tool unbalanced load = Unbalanced load of tool magazine 21 (when tools are loaded) - Unbalanced load of tool magazine 21 (when no tools are loaded) (Equation 12)

[0048] The loading condition setting process will be described with reference to Figures 7 and 8. The loading conditions are the inertia and unbalanced load of the loaded tools around the rotation axis 23 of the tool magazine 21. By setting appropriate loading conditions for the loading state of the tool magazine 21, the control unit 41 can optimally adjust the acceleration of the positioning operation of the tool magazine 21 when it is turned. The user can set the loading conditions of the tool magazine 21 on the operation unit 18. When the control unit 41 receives an operation to set the loading conditions, it reads a loading condition setting program from the ROM 42 and executes this process.

[0049] The control unit 41 reads setting data from the memory unit 44 (S1). The setting data is various data including standard loading conditions, estimation results, loading condition settings, function settings, etc., which will be described later. The control unit 41 displays a loading condition setting screen 51 on the display unit 19 (S2).

[0050] As shown in FIG. 8, the loading condition setting screen 51 has display areas 511 to 515. The display area 511 displays the operation procedure and notes for setting the loading conditions. The display area 512 displays the reference loading conditions. The reference loading conditions are the reference inertia and reference offset load of the loading tool calculated based on the above-mentioned reference inertia Jb and reference offset load Twb. The display area 513 displays the estimation result of the loading conditions by the control unit 41 and the estimated date and time. The estimation of the loading conditions by the control unit 41 will be described later. The display area 514 displays the loading condition settings. The loading condition settings are the loading conditions currently being set, and are the inertia and offset load of the loading tool. The loading condition settings can be set by inputting them as well as automatically updated as described later. The display area 515 displays the enable or disable of each of the two function settings. The two function settings are magazine rotation acceleration adjustment and automatic update of the loading condition settings. The magazine rotation acceleration adjustment is a function for adjusting the acceleration of rotation of the tool magazine 21 to an appropriate value for the set loading conditions. The automatic update of loading condition settings is a function for automatically updating the loading condition settings displayed in the display area 514 to the loading conditions estimated by the control unit 41. The control unit 41 displays such a loading condition setting screen 51 on the display unit 19, so that the user can check the operation procedure for setting the loading conditions, the reference loading conditions, the estimated results and estimated date and time, the loading condition settings, the function settings, and the like.

[0051] As shown in FIG. 7, the control unit 41 judges whether or not the setting of the loading condition has been accepted (S3). If the setting of the loading condition has not been accepted (S3: NO), the control unit 41 advances the process to S5 described later. If the setting of the loading condition has been accepted (S3: YES), the control unit 41 updates the loading condition setting value among the setting data stored in the storage unit 44 to the accepted content (S4), and displays the accepted loading condition setting value in the display area 514. Next, the control unit 41 judges whether or not the change of the function setting has been accepted (S5). If the change of the function setting has not been accepted (S5: NO), the control unit 41 advances the process to S7 described later. If the change of the function setting has been accepted (S5: YES), the control unit 41 changes the function setting data among the setting data stored in the storage unit 44 to the accepted content (S6). The control unit 41 judges whether or not the end operation of the loading condition setting has been accepted (S7). If the end operation has not been received (S7: NO), the control unit 41 returns to S3 and repeats the above process. If the end operation has been received (S7: YES), the control unit 41 ends this process.

[0052] 9 and 10, the storage and setting of the estimated results of the loading conditions using macro variables will be described. In this embodiment, the estimated results of the loading conditions are stored and set for each setup pattern by using dedicated macro variables. The macro variables are set in the NC program. For example, as shown in FIG. 9, #30052, #30053, #30054, #30055, etc. are used as dedicated macro variables. #30052 is used to store the estimated value of the loaded tool inertia. #30053 is used to store the estimated value of the loaded tool offset load. #30054 is used to set the stored estimated value of the loaded tool inertia as the loading condition. #30055 is used to set the stored loaded tool offset load as the loading condition.

[0053] Since the estimated values ​​of the loaded tool inertia and the loaded tool offset load differ for each setup pattern, they need to be stored for each setup pattern. Therefore, in this embodiment, estimation variables are used in addition to the macro variables. The estimation variables are variables for storing the estimated values ​​of the loaded tool inertia and the loaded tool offset load. As shown in FIG. 10, for example, when there are three setup patterns A, B, and C, the inertia estimation variable and the offset load estimation variable are set separately for each setup pattern. The inertia estimation variable is a variable for storing the estimated value of the loaded tool inertia. The offset load estimation variable is a variable for storing the estimated value of the loaded tool offset load. The inertia estimation variable corresponding to the setup pattern A is #500, and the offset load estimation variable is #501. The inertia estimation variable corresponding to the setup pattern B is #502, and the offset load estimation variable is #503. The inertia estimation variable corresponding to the setup pattern C is #504, and the unbalanced load estimation variable is #505.

[0054] A method for setting macro variables in an NC program for initial execution after a changeover will be described with reference to Figure 11. Here, when a changeover is performed in the order of three setup patterns A, B, and C, NC programs A1, B1, and C1 that are executed for the first time in each setup pattern will be described. NC program A1 is an example of an NC program for initial execution for setup pattern A. NC program B1 is an example of an NC program for initial execution for setup pattern B. NC program C1 is an example of an NC program for initial execution for setup pattern C.

[0055] The NC program A1 will be described. The "#30051=1" in the first line is a macro variable that instructs to reset the loading condition settings. The loading conditions may have changed after the tool magazine 21 is changed over by the tool changer 70. If the tool magazine 21 is rotated with a suboptimal acceleration immediately after the loading conditions have changed, a large load will be placed on the reducer 25 and other components. In this case, the life of the reducer 25 and other components will be shortened, and an error due to insufficient torque may cause the program to stop operating. Therefore, the control unit 41 resets the currently set loading condition settings, estimates the optimal loading conditions for the current loading state, and stores the estimated results for each setup pattern.

[0056] "G100T1" is a tool exchange command for tool T1. Since the loading condition setting was reset at the first line in the NC program, the rotation of the tool magazine 21 during the ATC operation based on the tool exchange command is accelerated and decelerated at the reference time constant. This allows the tool magazine 21 to rotate safely and without problems in the NC program A1 being executed. Then, the loading conditions (loaded tool inertia and loaded tool offset load) are estimated based on the drive data obtained by the rotation of the tool magazine 21. Next, "#500=#30052" is a command to store the estimated value of the loaded tool inertia estimated during the execution of the NC program A1 in #500. "#501=#30053" is a command to store the estimated value of the loaded tool offset load estimated during the execution of the NC program A1 in #501. M30 is the end code of the NC program. The control unit 41 can store the estimated result of the loading condition of the setup pattern A by executing such an NC program A1. The estimated value of the loaded tool inertia and the estimated value of the loaded tool offset load are stored in the storage unit 44 in association with the estimation variables (#500 and #501).

[0057] The NC program B1 will be described. "#30051=1", "G100T1", and "M30" are the same as those set in the NC program A1. "#502=#30052" is a command to store in #502 the estimated value of the loaded tool inertia estimated during execution of the NC program B1. "#503=#30053" is a command to store in #503 the estimated value of the loaded tool unbalanced load estimated during execution of the NC program B1. By executing such an NC program B1, the control unit 41 can store the estimated results of the loading conditions of the setup pattern B. The estimated values ​​of the loaded tool inertia and the loaded tool unbalanced load are stored in the memory unit 44 in correspondence with the estimation variables (#502 and #503).

[0058] The NC program C1 will be described. "#30051=1", "G100T1", and "M30" are the same as those set in the NC program A1. "#504=#30052" is a command to store in #504 the estimated value of the loaded tool inertia estimated during execution of the NC program C1. "#505=#30053" is a command to store in #505 the estimated value of the loaded tool offset load estimated during execution of the NC program C1. By executing such an NC program C1, the control unit 41 can store the estimated results of the loading conditions of the setup pattern C. The estimated values ​​of the loaded tool inertia and the loaded tool offset load are stored in the memory unit 44 in correspondence with the estimation variables (#504 and #505).

[0059] With reference to Figure 12, a method for setting macro variables in NC programs executed from the second time onwards after a changeover will be described. Here, when changeovers are repeatedly performed in the order of three changeover patterns A, B, and C, NC programs A2, B2, and C2 executed from the second time onwards in each changeover pattern will be described. NC program A2 is for changeover pattern A, and is the NC program executed from the second time onwards after a changeover. NC program B2 is for changeover pattern B, and is the NC program executed from the second time onwards after a changeover. NC program C2 is for changeover pattern C, and is the NC program executed from the second time onwards after a changeover.

[0060] The NC program A2 will be described. The first line "#30054=#500" is a command to set the loading condition to the estimated value of the loaded tool inertia in the setup pattern A stored in the memory unit 44 in correspondence with #500. The second line "#30055=#501" is a command to set the loading condition to the estimated value of the loaded tool offset load in the setup pattern A stored in the memory unit 44 in correspondence with #501. "G100T1" and "M30" are as described above. By executing such an NC program A2, the control unit 41 can automatically and quickly set the estimated value of the loading condition of the setup pattern A stored in the memory unit 44 as the loading condition without re-estimating the loading condition after the setup change to the setup pattern A.

[0061] The NC program B2 will be described. The first line "#30054=#502" is a command to set the loading condition to the estimated value of the loaded tool inertia in the setup pattern B stored in the memory unit 44 in correspondence with #502. The second line "#30055=#503" is a command to set the loading condition to the estimated value of the loaded tool offset load in the setup pattern B stored in the memory unit 44 in correspondence with #503. "G100T1" and "M30" are as described above. By executing such NC program B2, the control unit 41 can automatically and quickly set the estimated value of the loading condition of the setup pattern B stored in the memory unit 44 as the loading condition without re-estimating the loading condition after the setup change to the setup pattern B.

[0062] The NC program C2 will be described. The first line "#30054=#504" is a command to set the loading condition to the estimated value of the loaded tool inertia in the setup pattern C stored in the memory unit 44 in correspondence with #504. The second line "#30055=#505" is a command to set the loading condition to the estimated value of the loaded tool offset load in the setup pattern C stored in the memory unit 44 in correspondence with #505. "G100T1" and "M30" are as described above. By executing such an NC program C2, the control unit 41 can automatically and quickly set the estimated value of the loading condition of the setup pattern C stored in the memory unit 44 as the loading condition without re-estimating the loading condition after the setup change to the setup pattern C.

[0063] The loading condition estimation process will be described with reference to Fig. 13. When an NC program is selected on the operation unit 18 and an operation to start execution of the selected NC program is performed, the control unit 41 reads the NC program from the storage unit 44 and starts execution of the NC program, and also reads the loading condition estimation program from the ROM 42 to execute this process.

[0064] <First time running NC program for each setup pattern> For example, the case where the program operation is performed for the first time after the setup is changed to the setup pattern A will be described. The user selects the NC program A1 (see FIG. 11) and performs an operation to start execution. The control unit 41 reads the NC program A1 from the storage unit 44 and interprets it block by block. The control unit 41 judges whether or not there is a macro variable (#30051=1) for resetting the loading condition setting in the first line (S11). Since "#30051=1" is in the first line (S11: YES), the control unit 41 resets the loading condition setting stored in the storage unit 44 (S17) and changes the loading condition to the value of the standard loading condition (S18). At this time, the display of the loading condition setting in the display area 514 of the loading condition setting screen 51 may be updated to the value of the standard loading condition. The control unit 41 sets a standard time constant based on the standard loading condition (S19).

[0065] The control unit 41 executes the program operation (S20), and when a tool change is performed therein, the rotation operation of the tool magazine 21 is accelerated or decelerated at a reference time constant. The reference time constant is a time constant at which the magazine motor 64 can operate when the setup pattern of the tools 3 in the tool magazine 21 is the reference setup pattern. The reference setup pattern is a setup pattern of the tools 3 that results in the maximum inertia and maximum offset load determined by the machine specifications. The control unit 41 estimates the loading conditions (loaded tool inertia and loaded tool offset load) based on the drive data obtained by the rotation operation (S21). The control unit 41 stores the estimation result in the memory unit 44, and displays it in the display area 513 of the loading condition setting screen 51. During the program operation, the control unit 41 interprets one block at a time. The control unit 41 judges whether or not the interpreted block has macro variables (#30052, #30053) for storing estimated values ​​(S22). If there is no macro variable with an estimated value stored (S22: NO), the control unit 41 judges whether the NC program A1 has ended (S24). If the NC program A1 has not ended (S24: NO), the control unit 41 returns to S20 to continue executing the NC program A1 and repeats the estimation of the loading conditions (S21).

[0066] As shown in Fig. 11, before the end code (M30) of the NC program A1, a block including "#30052" and a block including "#30053" are lined up. Since "#30054" and "#30055" are macro variables for storing estimated values ​​(S22: YES), the control unit 41 associates the estimated value of the loaded tool inertia with #500 and the estimated value of the loaded tool offset load with #501, respectively, and stores them in the storage unit 44 (S23). Next, since the NC program A1 ends at M30 (S24: YES), the control unit 41 ends this process. In this way, the control unit 41 can store the estimated values ​​of the loading conditions estimated during the program operation for each setup pattern by using the macro variables in the NC program executed for the first time after the setup change.

[0067] <2nd and subsequent executions of NC programs for each setup pattern> For example, the following description will be given assuming that the program is running for the second or subsequent time after the setup has been changed to setup pattern A. In this case, the user selects NC program A2 (see FIG. 12) and performs an operation to start execution. As shown in FIG. 12, the beginning of NC program A2 is not a macro variable for resetting the loading condition setting (S11: NO), so the control unit 41 judges whether or not there are macro variables (#30054, #30055) for setting the loading conditions (S12). The first line of NC program A2 is "#30054" and the second line is "#30055", both of which are macro variables for setting the loading conditions (S12: YES). Therefore, the control unit 41 reads out from the storage unit 44 the estimated value of the loaded tool inertia of the setup pattern A associated with #500 specified by "#30054" and the estimated value of the loaded tool offset load of the setup pattern A associated with #501 specified by "#30055", and sets them as the loading conditions (S13). Note that if there is no macro variable for setting the loading conditions in the interpreted block (S12: NO), the control unit 41 does not change the current loading condition setting value stored in the storage unit 44, and proceeds to the process of S14 described later.

[0068] The control unit 41 calculates a time constant using the current loading condition values ​​stored in the memory unit 44 (S14). The control unit 41 executes the program operation (S15), and when a tool change is performed during the program operation, the control unit 41 accelerates or decelerates the rotation operation of the tool magazine 21 using the calculated appropriate time constant. The control unit 41 determines whether the NC program has ended (S16). If the NC program has not ended (S16: NO), the control unit 41 returns to S15 and continues to execute the NC program A2. If the NC program A2 has ended (S16: YES), the control unit 41 ends this process.

[0069] In this way, when the control unit 41 executes the NC program corresponding to the setup pattern for the second or subsequent time after the setup change, it can set the estimated values ​​of the loaded tool inertia and loaded tool offset load, which have already been estimated and stored in the storage unit 44, as the loading conditions by setting macro variables in the NC program. Therefore, the numerical control device 40 can rotate the tool magazine 21 with a time constant optimal for the loading conditions even if it is the first program operation after setup to the setup pattern for which the loading conditions have been estimated.

[0070] In the above explanation, #500 to #505 are examples of "estimated variables" of the present invention, and #30052 and #30053 are examples of "storage instruction variables" of the present invention. #30054 and #30055 are examples of "setting instruction variables" of the present invention. The process of S21 in FIG. 13 is an example of "estimation processing" of the present invention. The process of S23 is an example of "storage processing" of the present invention. The process of S13 is an example of "setting processing" of the present invention. The process of S14 is an example of "calculation processing" of the present invention. The process of S15 is an example of "turn execution processing" of the present invention.

[0071] As described above, the numerical control device 40 of the first embodiment of the present invention outputs a command to the magazine motor 64 for the machine tool 1. The machine tool 1 is provided with the tool magazine 21. The tool magazine 21 can hold tools 3, and is turned by the magazine motor 64 to transport the tools 3 to a predetermined position. The control unit 41 of the numerical control device 40 estimates the loading conditions around the turning axis 23 of the tool magazine 21. The loading conditions are determined by the inertia of the loaded tools and the offset load of the loaded tools. The control unit 41 stores the estimated results of the loading conditions in the memory unit 44 in association with the estimated variables (#500 to #505) corresponding to the setup pattern of the tools 3 in the tool magazine 21. When the control unit 41 reads the setting instruction variables (#30054 and #30055) during the execution of the NC program, it reads out the estimated results stored in association with the estimated variables from the memory unit 44 and sets them as the loading conditions. The control unit 41 calculates a time constant for acceleration / deceleration of the magazine motor 64 during the turning operation of the tool magazine 21 in accordance with the set loading conditions. The control unit 41 executes the turning operation of the tool magazine 21 with the calculated time constant.

[0072] This allows the numerical control device 40 to store the estimated results of the loading conditions in association with the estimated variables for each setup pattern. Therefore, when the loading conditions are changed to an already estimated setup pattern, the numerical control device 40 can set the stored estimated results as the loading conditions. Therefore, the numerical control device 40 can rotate the tool magazine 21 with a time constant optimal for the loading conditions even when running the first NC program after changing the setup to the estimated setup pattern.

[0073] When the control unit 41 reads the storage instruction variable during execution of the NC program, the control unit 41 stores the estimation result in association with the estimated variable. The storage instruction variable is an instruction to store the estimation result of the loading condition in association with the estimated variable. Therefore, the numerical control device 40 can store the estimation result in association with the estimated variable without user operation during execution of the NC program.

[0074] The control unit 41 estimates the loading conditions based on the result of executing the rotation operation with the reference time constant. The reference time constant is a time constant at which the magazine motor 64 can operate when the setup pattern of the tools 3 in the tool magazine 21 is the reference setup pattern. The reference setup pattern is a setup pattern of the tools 3 that results in the maximum inertia and maximum unbalanced load determined by the machine specifications. Therefore, when estimating the loading conditions, the numerical control device 40 can safely rotate the tool magazine 21 regardless of the setup pattern.

[0075] A second embodiment of the present invention will be described with reference to Figs. 14 to 17. As shown in Fig. 14, a system 100 includes a numerical control device 40, a tool changer 70, and a PLC 150. The configurations of the numerical control device 40 and the tool changer 70 are the same as those of the first embodiment, and therefore the same reference numerals as those of the first embodiment are used and the description thereof will be omitted. The numerical control device 40 controls the operation of the machine tool 1. The PLC (programmable logic controller) 150 is communicably connected to the input / output unit 45 of the numerical control device 40 and the tool changer 70, and controls the operation of each of the numerical control device 40 and the tool changer 70. The PLC 150 includes a control unit 151 and a storage unit 152. The storage unit 152 stores various programs such as a PLC side control program. The PLC side control program is a program for executing a PLC side control process (see Fig. 20) described later.

[0076] Referring to FIG. 15, an OM (Object Memory) used by the PLC 150 will be described. The OM is a data register provided in the memory unit 152 of the PLC 150, and is, for example, a PLC signal, a memory area, etc. The PLC signal is an on / off signal. In this embodiment, BY100 is used to reset the loading conditions, BX182 and BDX are used to store the estimation results, and X001 and BDY are used to set the loading conditions. BY100, BX182, and X001 are PLC signals. BDX is a memory area for storing the estimation results, and BDY is a memory area for setting the loading conditions. Since the numerical control device 40 can communicate with the PLC 150, the control unit 41 of the numerical control device 40 can access the OM of the PLC 150 to read and write data.

[0077] Here, since BDX and BDY are 16-bit data, they can only take values ​​in the range of -32768 to 32767. In contrast, as shown in FIG. 8, the loading condition setting screen 51 has display areas 513 and 514 in which the estimated results of the loading conditions and the set values ​​of the loading conditions are displayed. Considering the range of values ​​and the number of significant digits that the estimated results and the set values ​​can take, the ranges that BDX and BDY can take are insufficient. Therefore, in this embodiment, the data of the estimated results and the set values ​​of the loaded tool inertia and the loaded tool offset load are expressed by dividing them into upper 16 bits and lower 16 bits. BDX100 to BDX101 are two storage areas used to store the estimated results of the loaded tool inertia. BDX102 to BDX103 are two storage areas used to store the estimated results of the loaded tool offset load. BDY100 to BDX101 are two storage areas used to set the previously stored estimated results of the loaded tool inertia as loading conditions. BDY102 to BDX103 are two storage areas used to set the previously stored estimated results of the loaded tool offset load as loading conditions.

[0078] A specific method of using OM used for storing the estimation result will be described with reference to FIG. 16. BX182 is an estimated value storage signal, and is turned on / off by the PLC 150. When the PLC 150 turns on BX182 at the end of the program, four MOV commands are executed. MOV / BDX100 / D100 is a command to store the value of BDX100 in D100. The upper 16 bits of the estimated value of the loaded tool inertia are stored in BDX100. Therefore, when the MOV command is executed, the upper 16 bits of the estimated value of the loaded tool inertia are stored in D100. MOV / BDX101 / D101 is a command to store the value of BDX101 in D101. The lower 16 bits of the estimated value of the loaded tool inertia are stored in BDX101. Therefore, when the MOV command is executed, the lower 16 bits of the estimated value of the loaded tool inertia are stored in D101. MOV / BDX102 / D102 is a command to store the value of BDX102 in D102. The upper 16 bits of the estimated value of the loaded tool offset load are stored in BDX102. Therefore, when the MOV command is executed, the upper 16 bits of the estimated value of the loaded tool offset load are stored in D102. MOV / BDX103 / D103 is a command to store the value of BDX103 in D103. The lower 16 bits of the estimated value of the loaded tool offset load are stored in BDX103. Therefore, when the MOV command is executed, the lower 16 bits of the estimated value of the loaded tool offset load are stored in D103. Note that D100 to D103 are OMs that can be used generically by the PLC150.

[0079] A specific method of using OM used for setting loading conditions will be described with reference to FIG. 17. X001 is a loading condition setting signal, which is turned on / off by the PLC 150. When the PLC 150 turns on X001 after a setup change, four MOV commands are executed. MOV / D100 / BDY100 is a command to set the value of D100 to BDY100. BDY100 is an area that stores the upper 16 bits of the value of the loaded tool inertia to be set as a loading condition. As described above, the upper 16 bits of the estimated value of the loaded tool inertia are stored in D100. Therefore, when the MOV command is executed, the upper 16 bits of the estimated value of the loaded tool inertia are stored in BDY100. MOV / D101 / BDY101 is a command to set the value of D101 to BDY101. BDY101 is an area that stores the lower 16 bits of the value of the loaded tool inertia as a loading condition. As described above, the lower 16 bits of the estimated value of the loaded tool inertia are stored in D101. Therefore, when the MOV command is executed, the lower 16 bits of the estimated value of the loaded tool inertia are stored in BDY100.

[0080] MOV / D102 / BDY102 is a command to set the value of D102 to BDY102. BDY102 is an area for storing the upper 16 bits of the value of the loaded tool eccentric load set as a loading condition. As described above, the upper 16 bits of the estimated value of the loaded tool eccentric load are stored in D102. Therefore, when the MOV command is executed, the upper 16 bits of the estimated value of the loaded tool eccentric load are stored in BDY102. MOV / D103 / BDY103 is a command to set the value of D103 to BDY103. BDY103 is an area for storing the lower 16 bits of the value of the loaded tool eccentric load set as a loading condition. As described above, the lower 16 bits of the estimated value of the loaded tool eccentric load are stored in D103. Therefore, when the MOV command is executed, the lower 16 bits of the estimated value of the loaded tool eccentric load are stored in BDY103.

[0081] For example, when there are multiple setup patterns in the tool magazine 21, it is preferable to provide, for each setup pattern, an OM that is turned on after a setup change, an OM that stores the estimated results of the loaded tool inertia, and an OM that stores the estimated results of the loaded tool offset load in the storage unit 152 of the PLC 150. This enables the numerical control device 40 to quickly and appropriately switch the loading conditions according to the setup pattern.

[0082] As shown in FIG. 18, for example, in the case where there are three setup patterns A, B, and C, in the setup pattern A, X001 is provided as a loading condition setting signal, D100-D101 as an OM for inertia estimation, and D102-D103 as an OM for unbalanced load estimation. In the setup pattern B, X002 is provided as a loading condition setting signal, D104-D105 as an OM for inertia estimation, and D106-D107 as an OM for unbalanced load estimation. In the setup pattern C, X003 is provided as a loading condition setting signal, D108-D109 as an OM for inertia estimation, and D110-D111 as an OM for unbalanced load estimation. The OM for inertia estimation is a storage area for storing the estimation result of the loaded tool inertia. The OM for unbalanced load estimation is a storage area for storing the estimation result of the loaded tool unbalanced load.

[0083] As shown on the left side of Fig. 19, as an OM used to store the estimated values ​​of the loaded tool inertia and the loaded tool offset load, three X001 to X003 branch off from BX182, which turns on when an NC program ends, and four MOV commands further branch off from each of these X001 to X003. When an NC program ends, BX182 turns on, and a loading condition setting signal that corresponds to the setup pattern of the NC program that has ended among X001 to 003 turns on. Then, the four MOV commands that correspond to the loading condition setting signals that have turned on are executed.

[0084] For example, when the program operation in the setup pattern A is completed, the PLC 150 turns on BX182 and also turns on X001 corresponding to the setup pattern A. This causes the MOV command corresponding to X001 to be executed, so that the estimated results of the setup pattern A can be stored in D100 to D103. When the program operation in the setup pattern B is completed, the PLC 150 turns on BX182 and also turns on X002 corresponding to the setup pattern B. This causes the MOV command corresponding to X002 to be executed, so that the estimated results of the setup pattern B can be stored in D104 to D107. When the program operation in the setup pattern C is completed, the PLC 150 turns on BX182 and also turns on X003 corresponding to the setup pattern C. This causes the MOV command corresponding to X003 to be executed, so that the estimated results of the setup pattern C can be stored in D108 to D111.

[0085] On the other hand, as shown on the right side of Fig. 19, four MOV commands are branched to three X001 to X003 corresponding to the setup patterns A to C as OMs used to set the loading conditions. Of X001 to 003, a loading condition setting signal corresponding to the setup pattern after the setup change is turned on. This causes the four MOV commands corresponding to the turned-on loading condition setting signals to be executed.

[0086] For example, if the setup pattern is A when the changeover is completed, the PLC 150 turns on X001. This causes the MOV command corresponding to X001 to be executed, so that the estimated results of the setup pattern A stored in D100 to D103 are stored in BDY100 to BDY103. Thus, the estimated results of the setup pattern A can be set as the loading conditions. Also, if the setup pattern is B when the changeover is completed, the PLC 150 turns on X002. This causes the MOV command corresponding to X002 to be executed, so that the estimated results of the setup pattern B stored in D104 to D107 are stored in BDY100 to BDY103. Thus, the estimated results of the setup pattern B can be set as the loading conditions. Also, if the setup pattern is C when the changeover is completed, the PLC 150 turns on X003. This causes the MOV command corresponding to X003 to be executed, so that the estimated results of the setup pattern C stored in D108 to D111 are stored in BDY108 to BDY111. Thus, the estimated results of the setup pattern C can be set as the loading conditions. In this way, this embodiment can quickly and appropriately switch the loading conditions according to the setup pattern at the end of the setup change.

[0087] The PLC side control process will be described with reference to FIG. 20. The PLC side control process is executed by the control unit 151 of the PLC 150. When the tool changer 70 starts changing the setup of the tool magazine 21, the control unit 151 reads out the PLC side control program from the storage unit 152 and executes this process. The control unit 151 initializes the PLC signals (S31). This turns off the loading condition reset signal (BY100), the estimated value storage signal (BX182), and the loading condition setting signals (X001 to X003). The control unit 151 determines whether or not the setup by the tool changer 70 has been completed (S32). The control unit 151 waits until the setup is completed (S32: NO).

[0088] When the tool changing device 70 completes the changeover of the tool 3, it transmits a completion signal to the PLC 150. When the completion signal is received from the tool changing device 70, the changeover is completed (S32: YES), and the control unit 151 judges whether the loading conditions of the setup pattern after the changeover have been estimated (S33). Whether the loading conditions have been estimated may be judged, for example, by referring to the storage unit 44 and judging whether the estimated result of the loading conditions of the setup pattern after the changeover is stored.

[0089] <If loading conditions are not estimated> If the loading conditions have not been estimated (S33: NO), the control unit 151 turns on the loading condition reset signal (BY100) (S34). The control unit 151 causes the numerical control device 40 to start the program operation (S35). As will be described later, the numerical control device 40 performs a tool change with a reference time constant during the program operation, and estimates the loading conditions at that time (see S60 in FIG. 21). The numerical control device 40 transmits the estimated results of the loading conditions to the PLC 150 (see S61 in FIG. 21). The PLC 150 receives the estimated results transmitted from the numerical control device 40, and stores them in BDX100 to BDX103 of the MOV command of the corresponding setup pattern. After that, when a new estimated result is received from the numerical control device 40, the control unit 151 updates the stored contents of BDX100 to BDX103. The control unit 151 judges whether the program operation has ended (S36). The control unit 151 waits until the program operation has ended (S36: NO). When the program operation is completed (S36: YES), the control unit 151 turns on the estimated value storage signal (BX182) (S37) and executes the MOV command corresponding to the setup pattern after the setup change (S38). For example, when the MOV command of the setup pattern A is executed, the control unit 151 stores the estimation results stored in BDX100 to BDX103 in D100 to D103. In this manner, the control unit 151 ends this process.

[0090] <When loading conditions are estimated> If it has been estimated (S33: YES), the control unit 151 turns on the loading condition setting signal corresponding to the setup pattern after the setup change (S41). For example, if the setup pattern after the setup change is A, the loading condition setting signal (X001) is turned on and the MOV command corresponding to the setup pattern A is executed (S42). As a result, the control unit 151 stores the estimation results stored in D100 to D103 in BDY100 to BDY103. In this way, the control unit 151 ends this process.

[0091] The NC side control process will be described with reference to Fig. 21. The NC side control process is executed by the control unit 41 of the numerical control device 40. When a control signal for executing a program operation is received from the PLC 150, the control unit 41 reads out the NC side control program from the ROM 42 and executes this process. The control unit 41 judges whether the loading condition reset signal of the PLC 150 is ON or not (S51).

[0092] <When the loading condition reset signal is on> When the loading condition reset signal (BY100) is on (S51: YES), the loading conditions of the current setup pattern have not been estimated. Therefore, the control unit 41 resets the current loading condition setting values ​​and changes the loading condition setting values ​​stored in the memory unit 44 to the reference loading condition values ​​(S57). The control unit 41 sets a reference time constant based on the reference loading condition (S58).

[0093] The control unit 41 reads out from the memory unit 44 an NC program corresponding to the control signal from the PLC 150, and executes the program operation (S59). When the control unit 41 executes a tool change during the program operation, it accelerates and decelerates the rotation operation of the tool magazine 21 with a reference time constant. The control unit 41 estimates the loading conditions (loaded tool inertia and loaded tool offset load) based on the drive data obtained during the rotation operation (S60). The control unit 41 stores the estimation results in the memory unit 44, and also displays them in the display area 513 of the loading condition setting screen 51. The control unit 41 transmits the estimation results to the PLC 150 (S61).

[0094] The control unit 41 determines whether the program operation has ended (S62). If the program operation has not ended (S62: NO), the control unit 41 returns to S59 and repeatedly estimates the loading conditions if a tool change is to be performed (S59, S60) until the program operation ends, and transmits the estimation result to the PLC 150 (S61). If the program operation has ended (S62: YES), the control unit 41 ends this process.

[0095] <When the loading condition reset signal is off and the loading condition setting signal is also off> When the loading condition reset signal is off (S51: NO), the control unit 41 judges whether the loading condition setting signal (X001 to X103) is on or not (S52). When all the loading condition setting signals are off (S52: NO), the control unit 41 calculates a time constant with the current loading condition setting value stored in the memory unit 44 (S54). The control unit 41 executes the program operation (S55). When a tool change is performed during the program operation, the control unit 41 accelerates or decelerates the turning operation of the tool magazine 21 with the calculated time constant. The control unit 41 judges whether the program operation has ended (S56). Until the program operation has ended (S56: NO), the control unit 41 returns to S55 and continues to execute the program operation. When the program operation has ended (S56: YES), the control unit 41 ends this process.

[0096] <When the loading condition reset signal is off and the loading condition setting signal is on> When the loading condition reset signal is off (S51: NO) and the loading condition setting signal is on (S52: YES), the loading conditions have already been estimated. For example, when the setup pattern after the setup change is the setup pattern A and the loading condition setting signal (X001) corresponding to the setup pattern A is on, the control unit 41 stores the estimated values ​​of the loading conditions stored in BDY100 to BDY103 corresponding to X001 of the PLC 150 in the storage unit 44 and sets them as the loading conditions (S53). The control unit 41 calculates a time constant with the loading condition setting value newly stored in the storage unit 44 (S54). The control unit 41 executes the program operation (S55). When a tool change is executed during the program operation, the control unit 41 accelerates or decelerates the turning operation of the tool magazine 21 with the calculated time constant. When the program operation is ended (S56: YES), the control unit 41 ends this process.

[0097] In this way, when the loading conditions are changed to a setup pattern for which the loading conditions have already been estimated, the previous estimated results can be read and set as the loading conditions without re-estimating. This allows the control unit 41 to rotate the tool magazine 21 with an optimized time constant even in the first program operation after the setup change.

[0098] In the above explanation, BX182 provided in PLC150 is an example of the "first specified data register" of the present invention. BDX is an example of the "first data register" of the present invention. D100 to D103 are an example of the "second data register" of the present invention. X001 is an example of the "second specified data register" of the present invention. BDY is an example of the "third data register" of the present invention. The processing of S60 in FIG. 21 is an example of the "estimation processing" of the present invention. The processing of S53 is an example of the "setting processing" of the present invention. The processing of S54 is an example of the "calculation processing" of the present invention. The processing of S55 is an example of the "turn execution processing" of the present invention.

[0099] As described above, the system 100 of the second embodiment of the present invention includes the numerical control device 40 and the PLC 150. The numerical control device 40 is the same as that of the first embodiment. The PLC 150 controls the numerical control device 40. The control unit 41 of the numerical control device 40 estimates the loading conditions around the rotation axis 23 of the tool magazine 21. The loading conditions are defined by the loaded tool inertia and the loaded tool offset load. The PLC 150 includes an OM in the memory unit 152. The OM is a data register, for example, a PLC signal or a memory area. The OM of this embodiment includes BX182, BDX, X001, BDY, D100 to D103, and the like. BX182 turns on when a specific condition is satisfied. BDX stores the estimated values ​​of the loaded tool inertia and the loaded tool offset load. When BX182 turns on, D100 to D103 store the estimated values ​​stored in BDX in correspondence with the setup pattern. X001 turns on after the setup change is performed. When X001 turns on, BDY stores the estimated values ​​stored in D100 to D103. The control unit 41 of the numerical control device 40 sets the estimated values ​​stored in BDY as the loading conditions. The control unit 41 calculates a time constant for acceleration and deceleration of the magazine motor 64 during the rotation operation of the tool magazine 21 according to the set loading conditions. The control unit 41 executes the rotation operation with the calculated time constant.

[0100] Estimated loading conditions are stored in D100-D103, which is the OM of the PLC 150, for each setup pattern. When the loading conditions are changed to an already estimated setup pattern, the estimated results stored in D100-D103 and corresponding to the setup pattern are stored in BDY of the PLC 150. The numerical control device 40 sets the estimated results stored in BDY as the loading conditions. Therefore, the system 100 can rotate the tool magazine 21 with a time constant optimal for the loading conditions even when the first NC program is operated after the setup is changed to the estimated setup pattern.

[0101] The OMs that turn on after the setup change is performed are X001 to X003, which are provided corresponding to each of the three setup patterns A to C. When BX182 is turned on, the OMs that store the estimated values ​​stored in BDX in association with the setup patterns are D100 to D111, which are associated with each of the setup patterns A to C. Then, BDY stores the estimation results stored in the corresponding areas of D100 to D111 that correspond to the OMs that are turned on among X001 to X003. Therefore, the system 100 can store the estimation results according to a plurality of setup patterns A to C, and can perform the rotation operation with the optimal time constant according to a plurality of setup patterns A to C.

[0102] BX182 is an example of a specific condition that is turned on when the NC program ends. Therefore, the system 100 can set the last estimated result in the NC program as the loading condition, thereby improving the reliability of the estimated result.

[0103] The PLC 150 further controls the tool changing device 70. The tool changing device 70 changes the setup of the tool in the tool magazine 21. When the PLC 150 receives a completion signal indicating that the setup of the tool 3 is completed from the tool changing device 70, the PLC 150 turns on the OM corresponding to the setup pattern in which the setup has been completed among X001 to X003. Therefore, the system 100 can set the estimated result corresponding to the setup pattern in the state in which the setup has been completed as the loading condition.

[0104] Next, two modifications of this embodiment will be described. <First Modification> This section explains how to set loading conditions in an NC program using G code. G code is a code that stands for programmable data input. G code is used, for example, when inputting work coordinate origin data. When setting loading conditions with G code, the command format in the NC program is, for example, as follows: "G10 L50 J_U_" "G10" is a command for inputting programmable data. "L50" is a command for inputting loading conditions. "J" is the value of the loaded tool inertia set as a loading condition. "U" is the value of the loaded tool unbalanced load set as a loading condition. For example, loaded tool inertia = 5.000 [kgm 2 ], loaded tool offset load = 100.000 [Nm], when setting the G code, the G code should be as follows. "G10 L50 J5.000 U100.000"

[0105] The loading conditions set by the G code must be estimated in advance for each setup pattern. The loading conditions may be estimated by the numerical control device 40 as described in the first and second embodiments. The user may record the estimated results displayed on the loading condition setting screen 51 of the display unit 19, for example, and set the estimated values ​​of the loaded tool inertia and the loaded tool offset load in the NC program using the G code. Alternatively, the estimated results of the loading conditions may be set by the G code in the NC program by a machine device (e.g., a numerical control device, a PLC, a PC, etc.) instead of the user.

[0106] With reference to Fig. 22, a method for setting G codes in NC programs for each setup pattern will be specifically described. Here, NC programs A3, B3, and C3 implemented in each setup pattern will be described when setup changes are repeatedly performed in the order of three setup patterns A, B, and C. NC program A3 is an NC program for setup pattern A in which the loading conditions are set in G code. NC program B3 is an NC program for setup pattern B in which the loading conditions are set in G code. NC program C3 is an NC program for setup pattern C in which the loading conditions are set in G code.

[0107] The NC program A3 will be explained. The first line "G10 L50 J2.000 U40.000" means that the loaded tool inertia is 2.000 [kgm 2], and loaded tool offset load = 40.000 [Nm] are set as the loading conditions. "G100T1" and "M30" are as described above. By executing such NC program A3, the control unit 41 can automatically and quickly set the estimated values ​​of the loading conditions of the setup pattern A as the loading conditions without re-estimating the loading conditions after the setup change to the setup pattern A.

[0108] The NC program B3 will be explained. The first line "G10 L50 J4.000 U30.000" means that the loaded tool inertia is 4.000 [kgm 2 ], and loaded tool offset load = 30.000 [Nm] are set as the loading conditions. "G100T1" and "M30" are as described above. By executing such NC program B3, the control unit 41 can automatically and quickly set the estimated values ​​of the loading conditions of the setup pattern B as the loading conditions without re-estimating the loading conditions after the setup change to the setup pattern B.

[0109] The NC program C3 will be explained. The first line "G10 L50 J6.500 U60.000" means that the tool inertia is 6.500 [kgm 2 ], and loaded tool offset load = 60.000 [Nm] are set as the loading conditions. "G100T1" and "M30" are as described above. By executing such NC program C3, the control unit 41 can automatically and quickly set the estimated values ​​of the loading conditions of the setup pattern C as the loading conditions without re-estimating the loading conditions after the setup change to the setup pattern C.

[0110] The data number of the programmable data input does not have to be the number L50, and may be, for example, L55, L60, etc., as long as it is within an area that can be set as a data number.

[0111] <Second Modification> With reference to Figs. 23 to 26, a system 200 capable of storing the estimation results and setting the loading conditions by communication will be described. As shown in Fig. 23, the system 200 includes a PC (Personal Computer) 250 and a numerical control device 40. Although not shown, the numerical control device 40 is electrically connected to a machine tool and a tool changer as in the first embodiment. The PC 250 is communicably connected to the numerical control device 40 by Ethernet or serial communication, and controls the operation of the numerical control device 40. The numerical control device 40 has the same electrical configuration as the numerical control device 40 of the first embodiment, and will be described with the same reference numerals as in the first embodiment. The PC 250 includes a control unit 251 and a storage unit 252. The control unit 41 of the numerical control device 40 controls the operations of the machine tool and the tool changer based on commands from the PC 250.

[0112] An example of a communication command will be described with reference to FIG. 24. For example, CRESTINERTIA, CRESTUNBALANCE, CWTINERTIA, CWTUNBALANCE, etc. can be used as the communication command transmitted from the PC 250 to the numerical control device 40. CRESTINERTIA is a communication command instructing storage of an estimated value of the loaded tool inertia. CRESTUNBALANCE is a communication command instructing storage of an estimated value of the loaded tool offset load. CWTINERTIA is a communication command instructing setting of the loaded tool inertia. For example, CWTINERTIA_2.000 means an instruction to set the loaded tool inertia=2.000 as the loading condition. CWTUNBALANCE is a communication command instructing setting of the loaded tool offset load. For example, CWTUNBALANCE_40.000 means an instruction to set the loaded tool offset load=40.000 as the loading condition.

[0113] A communication method when the program operation in the setup pattern A is the first time will be described with reference to FIG. 25. In this case, the numerical control device 40 estimates the loading conditions when changing tools during program operation, according to a control command from the PC 250. For example, when the program operation ends, at timing t1, the control unit 251 of the PC 250 transmits a communication command of CRESTINERTIA to the numerical control device 40. At timing t2, the control unit 41 of the numerical control device 40 receives the communication command from the control unit 251. According to the received communication command, the control unit 41 transmits an estimated value of the loaded tool inertia to the PC 250 at timing t3. At timing t4, the control unit 251 of the PC 250 stores the estimated value of the loaded tool inertia from the control unit 41 in association with the setup pattern A.

[0114] Subsequently, at timing t5, the control unit 251 of the PC 250 transmits a communication command of CRESTUNBALANCE to the numerical control device 40. At timing t6, the control unit 41 of the numerical control device 40 receives the communication command from the control unit 251. In accordance with the received communication command, the control unit 41 transmits an estimated value of the loaded tool unbalanced load to the PC 250 at timing t7. At timing t8, the control unit 251 of the PC 250 stores the estimated value of the loaded tool unbalanced load from the control unit 41 in association with the setup pattern A.

[0115] The setup patterns B and C may be carried out in the same manner as the setup pattern A. In the above embodiment, the PC 250 transmits the communication command CRESTINERTIA to the numerical control device 40, and then transmits the communication command CRESTUNBALANCE, but the transmission order may be reversed or may be simultaneous. The order in which the estimated values ​​are stored is not particularly limited.

[0116] With reference to FIG. 26, a communication method in the case where the program operation in the setup pattern A is the second or later will be described. In this case, the memory unit 252 of the PC 250 stores the estimated values ​​of the loaded tool inertia and the loaded tool offset load in the setup pattern A. After the setup is changed to the setup pattern A, the control unit 251 of the PC 250 transmits a communication command, for example, CWTINERTIA 2.000 to the numerical control device 40 at a timing t11. At a timing t12, the control unit 41 of the numerical control device 40 receives the communication command from the control unit 251. According to the received communication command, the control unit 41 sets the loaded tool inertia=2.000 as the loading condition at a timing t13. Then, at a timing t14, the control unit 251 of the PC 250 transmits a communication command, for example, CWTUNBALANCE 40.000 to the numerical control device 40. At a timing t15, the control unit 41 of the numerical control device 40 receives the communication command from the control unit 251. The control unit 41, in accordance with the received communication command, sets the tool loading offset load=40,000 as the loading condition at timing t16.

[0117] For setup patterns B and C, the loading conditions may be set in the same manner as for setup pattern A. In the above embodiment, the PC 250 sends the CWTINERTIA communication command to the numerical control device 40, and then sends the CWTUNBALANCE communication command, but the order of transmission may be reversed or may be simultaneous. There is no particular restriction on the order of setting the loading conditions. The character string of the communication command does not have to be the command character string of the second modified example as long as it satisfies the requirements for a command character string.

[0118] In this way, by executing the above communication, the system 200 can automatically and quickly set the estimated values ​​of the loading conditions of the setup pattern as the loading conditions without re-estimating the loading conditions after the setup change is performed.

[0119] The present invention is not limited to the above-described first and second embodiments, and various modifications are possible. Machine tool 1 is a vertical machine tool in which the axial direction of spindle 9 extends in the vertical direction, but it may be a horizontal machine tool in which the axial direction of the spindle extends in the front-rear direction. The method of estimating the loading conditions and the direction of calculating the time constant are not limited to the above-described embodiments, and other estimation methods and calculation methods may be used.

[0120] Although the tool changing device 70 in the first and second embodiments is a multi-joint robot arm, the device may be a device other than a robot arm as long as it is capable of changing the tool 3 in the tool magazine 21. For example, the device may be one in which the tool magazine is composed of a circular main magazine and a sub-magazine, a tool transport arm is provided in the sub-magazine, a desired tool held by the sub-magazine is loaded into a temporary storage pot provided in the main magazine by the tool transport arm, and the tool loaded into the temporary storage pot is loaded into a grip arm of the main magazine by a tool changing arm provided in the main magazine, thereby changing the tool.

[0121] In the first embodiment described above, the macro variables (#50052, #50055) which store the estimated values ​​of the loaded tool inertia and the loaded tool offset load are set immediately before M30 when the NC program ends, but they do not have to be set immediately before the end, and may be set, for example, immediately after the final tool change is completed.

[0122] In the first embodiment, the numbers of the macro variables (#30051 and above) do not have to be the numbers described in the first embodiment as long as they are numbers used for system variables (variables used for a specific purpose). For example, numbers such as #40001 and above may be used.

[0123] In the first embodiment, macro variables are used as the reset information to be set in the NC program, but any information that can be set in the NC program other than macro variables may be used, such as G code, M code, etc.

[0124] In the first embodiment, the tool changing device 70 is provided on the machine tool 1, but the machine tool 1 and the tool changing device 70 may be separate entities.

[0125] In the second embodiment, the numbers of the OM of the PLC 150 (BDX100~, BDY100, X001~, D100~, etc.) do not have to be the numbers described in the second embodiment as long as they are in an area that can be assigned.

[0126] In the PLC side control processing shown in FIG. 20 of the second embodiment, as an example of a specific condition, the estimated value memory signal (BX182) is turned on when the program operation ends (S36), but it may be turned on at a timing other than the end of the program operation, for example, when the loading conditions are estimated. [Explanation of symbols]

[0127] 1 Machine tools 3 tools 20 Tool changer 21 Tool Magazine 23 Swivel Axis 40 Numerical Control Device 41 Control section 64 Magazine Motor 70 Tool changing device 100 Systems 150 PLC 151 Control section 152 Storage section A~C Setup patterns

Claims

1. A numerical control device for a machine tool including a tool magazine capable of loading tools thereon and rotating the tool magazine by the drive of a motor to transport the tools to a predetermined position, the numerical control device outputting a command to the motor, A control unit is provided, The control unit is An estimation process for estimating a loading condition defined by an inertia around a rotation axis of the tool magazine and an offset load; a storage process of storing an estimation result of the estimation process in association with an estimation variable corresponding to a setup pattern of the tools in the tool magazine; a setting process for setting the estimation result stored in the storage process and associated with the estimation variable as the loading condition when a setting instruction variable is read during execution of the NC program; a calculation process for calculating a time constant of acceleration / deceleration of the motor during a rotation operation of the tool magazine in accordance with the loading conditions set in the setting process; a rotation execution process for executing the rotation operation of the tool magazine using the time constant calculated in the calculation process; A numerical control device comprising:

2. The storage process is a process of storing the estimation result in association with the estimation variable when a storage instruction variable is read, the storage instruction variable being an instruction to store the estimation result in association with the estimation variable during execution of the NC program. The numerical control device according to claim 1 .

3. The estimation process is a process of estimating the loading condition based on a result of executing the turning operation with a reference time constant at which the motor can operate when the setup pattern is a reference setup pattern.

3. The numerical control device according to claim 1 or 2,

4. A method for controlling a numerical control device that outputs a command to a motor for a machine tool having a tool magazine capable of loading tools thereon and rotating the tool magazine by the drive of the motor to transport the tool to a predetermined position, comprising the steps of: an estimation step of estimating a loading condition defined by an inertia around a rotation axis of the tool magazine and an offset load; a storage step of storing an estimation result of the estimation step in association with an estimation variable corresponding to a setup pattern of the tools in the tool magazine; a setting step of setting, when a setting instruction variable is read during execution of the NC program, the estimation result stored in the storage step and associated with the estimation variable as the loading condition; a calculation step of calculating a time constant of acceleration / deceleration of the motor during a turning operation of the tool magazine in accordance with the loading conditions set in the setting step; a rotating execution step of executing the rotating operation of the tool magazine with the time constant calculated in the calculation step; A control method comprising:

5. A program executable by a computer of a numerical control device that outputs a command to a motor for a machine tool having a tool magazine that can hold tools and that transports the tools to a predetermined position by being turned by the motor, The computer includes: an estimation step of estimating a loading condition defined by an inertia around a rotation axis of the tool magazine and an offset load; a storage step of storing an estimation result of the estimation step in association with an estimation variable corresponding to a setup pattern of the tools in the tool magazine; a setting step of setting, when a setting instruction variable is read during execution of the NC program, the estimation result stored in the storage step and associated with the estimation variable as the loading condition; a calculation step of calculating a time constant of acceleration / deceleration of the motor during a turning operation of the tool magazine in accordance with the loading conditions set in the setting step; a rotating execution step of executing the rotating operation of the tool magazine with the time constant calculated in the calculation step; A program characterized by executing the above.

6. A system comprising: a numerical control device that outputs a command to a motor for a machine tool having a tool magazine that can load tools and that rotates by being driven by a motor to transport the tools to a predetermined position; and a PLC that controls the numerical control device, a control unit of the numerical control device executes an estimation process to estimate a loading condition defined by an inertia around a rotation axis of the tool magazine and an offset load, The PLC comprises: a first specific data register that is turned on when a specific condition is satisfied; a first data register for storing an estimation result of the estimation process; a second data register for storing the estimation result stored in the first data register in correspondence with a setup pattern of the tools in the tool magazine when the first specific data register is turned on; a second specific data register that is turned on after the tool magazine changeover is completed; a third data register for storing the estimation result stored in the second data register when the second specific data register is turned on; Equipped with The control unit of the numerical control device further comprises: a setting process of setting the estimation result stored in the third data register as the loading condition; a calculation process for calculating a time constant of acceleration / deceleration of the motor during a rotation operation of the tool magazine in accordance with the loading conditions set in the setting process; a turning execution process for executing the turning operation with the time constant calculated in the calculation process; A system for executing the above.

7. The second specified data register includes a plurality of second specified data registers each corresponding to a plurality of the setup patterns, The second data register includes a plurality of second data registers corresponding to the plurality of second specific data registers, The third data register stores the estimation result stored in the second data register corresponding to the turned-on second specific data register among the plurality of second specific data registers. The system of claim 6 .

8. The specific condition is the end of the NC program. The system of claim 6 .

9. The PLC further controls a tool changing device that changes the tools in the tool magazine, When the PLC receives a completion signal indicating that the tool changeover is completed from the tool changing device, the PLC turns on the second specific data register corresponding to the tool changeover pattern for which the tool changeover has been completed.

9. A system according to any one of claims 6 to 8, characterized in that

10. A control method for a system including a machine tool having a tool magazine capable of loading tools and rotating by a motor to transport the tools to a predetermined position, the system including a numerical control device that outputs a command to the motor, and a PLC that controls the numerical control device, the method comprising: The numerical control device performs an estimation step of estimating a loading condition defined by an inertia around a rotation axis of the tool magazine and an offset load, The PLC comprises: a first on step of turning on a first specific data register when a specific condition is satisfied; a first storage step of storing an estimation result in the estimation step in a first data register; a second storage step of storing, when the first specific data register is turned on, the estimation result stored in the first data register in a second data register in association with a setup pattern of the tools in the tool magazine; a second ON step of turning on a second specific data register after the tool magazine changeover is completed; a third storage step of storing the estimation result stored in the second data register in a third data register when the second specified data register is turned on; Do the following: The numerical control device further comprises: a setting step of setting the estimation result stored in the third data register as the loading condition; a calculation step of calculating a time constant of acceleration / deceleration of the motor during the turning operation of the tool magazine in accordance with the loading conditions set in the setting step; a turning execution step of executing the turning operation with the time constant calculated in the calculation step; A control method comprising the steps of:

Citation Information

Patent Citations

  • Machine tool and machine tool control method

    JP6603282B2