WO2024070400A1 - 数値制御装置、数値制御システム、制御方法、及びプログラム - Google Patents

数値制御装置、数値制御システム、制御方法、及びプログラム Download PDF

Info

Publication number
WO2024070400A1
WO2024070400A1 PCT/JP2023/031131 JP2023031131W WO2024070400A1 WO 2024070400 A1 WO2024070400 A1 WO 2024070400A1 JP 2023031131 W JP2023031131 W JP 2023031131W WO 2024070400 A1 WO2024070400 A1 WO 2024070400A1
Authority
WO
WIPO (PCT)
Prior art keywords
magazine
spindle
rotation
axis
tool
Prior art date
Application number
PCT/JP2023/031131
Other languages
English (en)
French (fr)
Inventor
優伍 倉橋
Original Assignee
ブラザー工業株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ブラザー工業株式会社 filed Critical ブラザー工業株式会社
Publication of WO2024070400A1 publication Critical patent/WO2024070400A1/ja

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B23MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
    • B23QDETAILS, COMPONENTS, OR ACCESSORIES FOR MACHINE TOOLS, e.g. ARRANGEMENTS FOR COPYING OR CONTROLLING; MACHINE TOOLS IN GENERAL CHARACTERISED BY THE CONSTRUCTION OF PARTICULAR DETAILS OR COMPONENTS; COMBINATIONS OR ASSOCIATIONS OF METAL-WORKING MACHINES, NOT DIRECTED TO A PARTICULAR RESULT
    • B23Q15/00Automatic control or regulation of feed movement, cutting velocity or position of tool or work
    • B23Q15/20Automatic control or regulation of feed movement, cutting velocity or position of tool or work before or after the tool acts upon the workpiece
    • B23Q15/22Control or regulation of position of tool or workpiece
    • B23Q15/26Control or regulation of position of tool or workpiece of angular position
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B23MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
    • B23QDETAILS, COMPONENTS, OR ACCESSORIES FOR MACHINE TOOLS, e.g. ARRANGEMENTS FOR COPYING OR CONTROLLING; MACHINE TOOLS IN GENERAL CHARACTERISED BY THE CONSTRUCTION OF PARTICULAR DETAILS OR COMPONENTS; COMBINATIONS OR ASSOCIATIONS OF METAL-WORKING MACHINES, NOT DIRECTED TO A PARTICULAR RESULT
    • B23Q3/00Devices holding, supporting, or positioning work or tools, of a kind normally removable from the machine
    • B23Q3/155Arrangements for automatic insertion or removal of tools, e.g. combined with manual handling
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/404Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by control arrangements for compensation, e.g. for backlash, overshoot, tool offset, tool wear, temperature, machine construction errors, load, inertia

Definitions

  • the present invention relates to a numerical control device, a numerical control system, a control method, and a program.
  • Machine tools equipped with turret-type magazines are known.
  • the magazine can rotate around a rotation axis, and multiple grippers are provided around its outer periphery in the circumferential direction.
  • the grippers can grip tools.
  • any of the grippers can be indexed to an index position.
  • the machine tool moves the spindle along the tool change path, and transfers the tool between the spindle and the grippers of the magazine by moving the spindle back and forth between the tool change position on the tool change path and the tool change origin.
  • the tool change position corresponds to the index position of the magazine, and is the position where the tool is transferred between the spindle and the grippers.
  • the tool change origin is a position where the magazine can rotate without interference between the tool held by the grippers and the spindle.
  • Rotational deviation is a phenomenon in which the magazine deviates in the circumferential direction from the reference position.
  • the reference position of the magazine is the rotational position of the magazine when the gripping part is indexed to the index position.
  • the position of the gripping part may deviate significantly with respect to the spindle, making it impossible to transfer the tool.
  • a position correction system is known that determines whether or not rotation correction is necessary to return the turret to the reference position depending on the rotational deviation of the turret (magazine), and if it is determined that rotation correction is necessary, requests an operation or task related to the rotation correction (see, for example, Patent Document 1).
  • the object of the present invention is to provide a numerical control device, a numerical control system, a control method, and a program that can retract the spindle to an appropriate position when performing magazine rotation correction.
  • the numerical control device of claim 1 has a plurality of gripping parts arranged in a circumferential direction, capable of gripping a tool to be attached to a spindle of a machine tool, a rotation drive part that rotates a magazine that can rotate around a rotation axis to index any one of the gripping parts, a memory part that stores the rotation position coordinates of the magazine corresponding to the index position of the gripping parts as reference coordinates indicating a reference position of the magazine, a coordinate detection part that detects the rotation position coordinates of the magazine, and a circumferential deviation of the rotation axis of the rotation position coordinates of the magazine detected by the coordinate detection part relative to the reference coordinates stored in the memory part.
  • the numerical control device is characterized by comprising a deviation determination unit that determines whether there is a rotation deviation, which is a deviation between the magazine and the spindle, a position detection unit that detects the position of the spindle, a determination unit that determines whether the position of the spindle detected by the position detection unit is located within a magazine rotation area, which is an area in which the magazine rotates, and a correction request unit that requests an operation or task to perform a rotation correction to return the magazine to the reference position after retracting the spindle from the magazine rotation area when the deviation determination unit determines that there is a rotation deviation and the determination unit determines that the position of the spindle is located within the magazine rotation area.
  • the numerical control device When returning a magazine with a rotation deviation to the reference position, if the numerical control device determines that the position of the spindle is within the magazine rotation area, the numerical control device can return the magazine to the reference position after retracting the spindle from the magazine rotation area. This allows the numerical control device to avoid interference between the magazine or a tool held by the gripper and the spindle or a tool attached to the spindle, and therefore allows the numerical control device to perform appropriate rotation correction and reduce the possibility of damage to the magazine, spindle, and tool.
  • the correction request unit of the numerical control device of claim 2 may instruct the rotation drive unit to perform the rotation correction operation when the magnitude of the rotation deviation is less than a threshold value, and may notify an operator of the rotation correction operation when the magnitude of the rotation deviation is equal to or greater than the threshold value. If the magnitude of the rotation deviation is less than the threshold value, the rotation correction is performed automatically, which saves time and effort compared to performing the rotation correction manually. On the other hand, if the magnitude of the rotation deviation is equal to or greater than the threshold value, the numerical control device notifies the operator of the rotation correction operation, allowing the operator to carefully rotate the magazine while checking the surroundings of the magazine.
  • the numerical control device of claim 3 further includes a correction determination unit that determines that the rotation correction is unnecessary when the magnitude of the rotation deviation is less than a threshold value, and that the rotation correction is necessary when the magnitude of the rotation deviation is equal to or greater than the threshold value, and the correction request unit may request an operation or task to execute the rotation correction when the correction determination unit determines that the rotation correction is necessary.
  • the correction determination unit determines that the rotation correction is necessary.
  • the correction request unit of the numerical control device of claim 4 may request an action or task to execute the rotation correction after retracting the spindle in a direction away from the magazine rotation area along a tool change path, which is a path along which the spindle moves when changing tools between the spindle and the gripper.
  • a tool change path which is a path along which the spindle moves when changing tools between the spindle and the gripper.
  • the tool change path of the numerical control device of claim 5 includes a predetermined path connecting a tool change position where the spindle performs the tool change between the magazine and the tool change position, and a tool change preparation position that is spaced from the tool change position in a direction perpendicular to the axial direction of the spindle and is the same position as the tool change position in the axial direction, and the correction request unit may, when the spindle is located on the predetermined path and within the magazine rotation area, request an operation or task to execute the rotation correction after retreating the spindle along the predetermined path to the tool change preparation position.
  • the numerical control device can safely perform the magazine rotation correction by retreating along the predetermined path to the tool change preparation position.
  • the machine tool performs the tool change of the spindle between the magazine and the magazine by reciprocating the spindle between a tool change position on the tool change path and an origin position spaced from the tool change position in the axial direction of the spindle
  • the correction request unit may, when the spindle is located between the tool change position and the origin position and within the magazine rotation area, execute the rotation correction and request an operation or task after retreating the spindle to the origin position.
  • the numerical control device can safely perform the magazine rotation correction by retreating the spindle to the origin position.
  • the deviation determination unit of the numerical control device of claim 7 may determine whether or not there is a rotation deviation when the tool change stops midway. For example, when an alarm or the like occurs and the tool change stops midway, the spindle is in a stopped state. In this case, the numerical control device determines whether there is a rotation deviation of the magazine, and if it determines that the position of the stopped spindle is within the magazine rotation area, it can return the magazine to the reference position after retracting the spindle from the magazine rotation area.
  • the deviation determination unit of the numerical control device of claim 8 may determine whether or not there is a rotation deviation when the power of the machine tool is turned off during the tool change and then turned on. When the power of the machine tool is turned off during the tool change and then turned on, the spindle is in a stopped state. In this case, the numerical control device determines the rotation deviation of the magazine, and if it determines that the position of the stopped spindle is within the magazine rotation area, it can return the magazine to the reference position after retracting the spindle from the magazine rotation area.
  • the axial direction of the spindle may be horizontal.
  • This type of numerical control device can be applied to a horizontal machine tool whose spindle extends horizontally.
  • the numerical control system of claim 10 is a numerical control system including a machine tool and a numerical control device, the numerical control device having a plurality of gripping parts arranged along a circumferential direction, capable of gripping a tool to be attached to a spindle of the machine tool, a rotation drive part which rotates a magazine which is rotatable about a rotation axis to index any one of the gripping parts, a memory part which stores the rotation position coordinates of the magazine corresponding to the index position of the gripping parts as reference coordinates indicating a reference position of the magazine, a coordinate detection part which detects the rotation position coordinates of the magazine, and a pre-processing part which stores the rotation position coordinates of the magazine detected by the coordinate detection part, the pre-processing part storing ...
  • the numerical control system is characterized by comprising a deviation determination unit that determines whether there is a rotation deviation, which is a circumferential deviation of the rotation axis relative to the reference coordinates, a position detection unit that detects the position of the spindle, a determination unit that determines whether the position of the spindle detected by the position detection unit is located within a magazine rotation area in which the magazine rotates, and a correction request unit that requests an operation or task to perform a rotation correction to return the magazine to the reference position after retracting the spindle from the magazine rotation area when the deviation determination unit determines that there is a rotation deviation and the determination unit determines that the position of the spindle is located within the magazine rotation area.
  • the numerical control device controls the operation of a machine tool, but may also control the operation of multiple machine tools.
  • the control method of claim 11 is a control method for a numerical control device that controls the operation of a machine tool, comprising a rotation drive step of rotating a magazine that rotates around a rotation axis and is provided with a plurality of gripping parts capable of gripping a tool to be attached to a spindle of the machine tool along a circumferential direction to index any one of the gripping parts, a coordinate detection step of detecting the rotation position coordinates of the magazine, and a storage step of storing the rotation position coordinates of the magazine detected in the coordinate detection step, which correspond to the index position of the gripping parts, as reference coordinates indicating the reference position of the magazine, relative to the reference coordinates stored in the storage step.
  • the method includes a deviation determination step for determining whether there is a rotation deviation, which is a deviation in the circumferential direction of the rotation axis, a position detection step for detecting the position of the spindle, a determination step for determining whether the position of the spindle detected in the position detection step is located within a magazine rotation area, which is an area in which the magazine rotates, and a correction request step for requesting an operation or task to perform a rotation correction to return the magazine to the reference position after retracting the spindle from the magazine rotation area when the deviation determination step determines that there is a rotation deviation and the determination step determines that the position of the spindle is located within the magazine rotation area.
  • the numerical control device can achieve the effect described in claim 1 by performing each step.
  • the program of claim 12 is a program for causing a numerical control device that controls the operation of a machine tool to function, the program including: a rotation drive process for rotating a magazine that rotates around a rotation axis and has a plurality of gripping parts arranged along a circumferential direction and capable of gripping a tool to be attached to a spindle of the machine tool, and for indexing any one of the gripping parts by rotating the magazine; a coordinate detection process for detecting the rotation position coordinates of the magazine; and a reference coordinate stored in a memory unit for storing the rotation position coordinates of the magazine that correspond to the index position of the gripping parts among the rotation position coordinates of the magazine detected by the coordinate detection process as reference coordinates indicating a reference position of the magazine.
  • the numerical control device is characterized in that it executes a deviation determination process that determines whether there is a rotation deviation, which is a circumferential deviation of the rotation axis relative to the magazine, a position detection process that detects the position of the spindle, a judgment process that determines whether the position of the spindle detected by the position detection process is located within a magazine rotation area, which is an area in which the magazine rotates, and a correction request process that requests an operation or task to perform a rotation correction to return the magazine to the reference position after retracting the spindle from the magazine rotation area when the deviation determination process determines that there is a rotation deviation and the judgment process determines that the position of the spindle is located within the magazine rotation area.
  • the numerical control device can achieve the effect described in claim 1 by having the computer of the numerical control device execute each process.
  • the numerical control device of claim 13 is characterized in that it comprises a control unit and a storage unit that stores a program, and the control unit executes the program to realize the control method of claim 11. This allows the numerical control device to obtain the effect of claim 11.
  • a computer-readable storage medium on which the above program is stored is also novel and useful.
  • FIG. 1 is a perspective view of a machine tool 1.
  • FIG. 2 is a perspective view of the machine tool 1 (shutter 103: closed).
  • FIG. 1 is a perspective view of a machine tool 1 (shutter: open).
  • FIG. 2 is a perspective view of the machine tool 1 (magazine cover omitted).
  • FIG. 2 is a right side view of the machine tool 1 (magazine cover omitted).
  • FIG. 2 is a diagram showing a processing area, an ATC area, and each reference point.
  • FIG. 13 is an image diagram of a magazine rotation area. 2 is a block diagram showing the electrical configuration of the machine tool 1.
  • FIG. 4 is a flowchart of an NC control process. 4 is a flowchart of a process performed when the power is turned on.
  • FIG. 13 is a flowchart of a process upon detection of an alarm.
  • 13 is a flowchart of an application control process.
  • 13 is a flowchart of an ATC recovery process.
  • 14 is a flowchart illustrating a continuation of FIG. 13 .
  • 13 is a flowchart of a YM-axis recovery process.
  • 13 is a flowchart of a YZM-axis recovery process.
  • 13 is a flowchart of an axis return destination determination process.
  • FIG. 13 is a diagram showing a restoration area W1.
  • FIG. 13 is a diagram showing a restoration area W2.
  • FIG. 13 is a diagram showing a restoration area W3.
  • FIG. 13 is a diagram showing a restoration area W6.
  • FIG. 8 shows an axis return screen 81.
  • FIG. 1 is an image diagram showing the movement path (1) from point M1 and the magazine position (2).
  • FIG. 13 shows a Y-axis restoration screen 82. This is an image diagram showing the movement path (1) from point M2 and the magazine position (2).
  • FIG. 13 is a diagram showing a YM axis recovery screen 83 (when the turning deviation is less than a threshold value).
  • FIG. 13 is a diagram showing a YM axis recovery screen 83 (when the turning deviation is equal to or greater than a threshold value).
  • FIG. 84 shows a YZ axis restoration screen.
  • FIG. 13 is a diagram showing a YZM axis restoration screen 85 (when the turning deviation is less than a threshold value).
  • FIG. 13 is a diagram showing a YZM axis restoration screen 85 (when the turning deviation is equal to or greater than a threshold value).
  • FIG. 2 is an image diagram showing the movement path (1) from the ATC origin and the magazine position (2). This is an image diagram showing the movement path (1) from point M6 and the magazine position (2).
  • FIG. 13 is a diagram showing a YZM axis restoration screen 86 (when the turning deviation is less than a threshold value).
  • FIG. 13 is a diagram showing a YZM axis restoration screen 86 (when the turning deviation is equal to or greater than a threshold value).
  • FIG. 13 is an image showing the position of point M7.
  • FIG. 8 shows a recovery impossible screen 87.
  • FIG. 13 is a diagram showing an index tool confirmation screen 88.
  • FIG. 13 shows an end screen 89.
  • 13 is a flowchart of a YM-axis recovery process (variation example).
  • FIG. 13 is a diagram showing a configuration of a numerical control system 200 (modification).
  • left/right, up/down, and front/back directions will be used as indicated by arrows in the figures.
  • the left/right, up/down, and front/back directions of the machine tool 1 are the X-axis, Y-axis, and Z-axis directions of the machine tool 1, respectively.
  • the machine tool 1 shown in Figure 1 is a horizontal machining center with a spindle 7 extending in the front/back 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.”
  • the machine tool 1 includes a base 2, a column 5, a spindle head 6, a spindle 7, a control box 8, a rotary table 9, an X-axis movement mechanism 11, a Z-axis movement mechanism 12, a Y-axis movement mechanism 13, a tool changer 30 (see Figure 4, hereafter referred to as the "ATC device 30"), a magazine cover 10, etc.
  • the base 2 is an iron base that is elongated in the Z-axis direction and has a generally rectangular shape in a plan view.
  • the X-axis movement mechanism 11 is provided at the rear of the upper surface of the base 2, and supports the carriage 15 so that it can move in the X-axis direction by the power of the X-axis motor 62 (see Figure 8).
  • the Z-axis movement mechanism 12 is provided on the upper surface of the carriage 15, and supports the column 5 so that it can move in the Z-axis direction by the power of the Z-axis motor 64 (see Figure 8).
  • the column 5 is a vertical pillar that extends in the vertical direction.
  • the Y-axis moving mechanism 13 is provided on the front surface 5B of the column 5, and supports the spindle head 6 so that it can move in the Y-axis direction along the front surface 5B of the column 5 by the power of the Y-axis motor 63 (see FIG. 8). This allows the spindle head 6 to move in three axial directions: the X-axis, the Y-axis, and the Z-axis.
  • the spindle head 6 extends in the Z-axis direction.
  • the spindle 7 is provided in the spindle head 6 and extends in the Z-axis direction coaxially with the spindle head 6.
  • the spindle head 6 has the spindle 7 in front and supports it rotatably.
  • the spindle head 6 has a spindle motor 61 (see FIG. 8).
  • the output shaft (not shown) of the spindle motor 61 is connected coaxially with the spindle 7 via a coupling (not shown).
  • a tool holder 90 that holds a tool 91 is attached to the tip of the spindle 7 (see FIG. 7).
  • the tool 91 is attached to the tip of the spindle 7
  • the meaning is the same.
  • a pair of support members 17, 18 are provided at the rear of the base 2.
  • the support members 17, 18 are spaced apart from each other in the left-right direction and extend upward from the rear of the base 2 to support the control box 8 from below.
  • the control box 8 houses a numerical control device 40 (see FIG. 8) inside.
  • the numerical control device 40 controls the operation of the machine tool 1.
  • a fixed base 16 is provided at the front side of the upper surface of the base 2.
  • the rotary table 9 is installed on the fixed base 16 and arranged in front of the spindle head 6.
  • a workpiece (not shown) is fixed to the upper surface of the rotary table 9 by a jig (not shown).
  • the rotary table 9 can be rotated and positioned 360° around a rotation axis parallel to the Y axis.
  • the machine tool 1 cuts the workpiece fixed on the rotary table 9 by contacting the tool 91 attached to the spindle 7 from three axial directions, the X axis, the Y axis, and the Z axis.
  • a pair of support pillars 21, 22 are provided on the front and left and right sides of the upper surface of the base 2.
  • Support pillar 21 extends upward from the right side of the upper surface of the base 2, with its upper portion bent approximately 90° to the left.
  • Support pillar 22 extends upward from the left side of the upper surface of the base 2, with its upper portion bent approximately 90° to the right.
  • a connecting plate 23 is fixed between the upper portions of the opposing support pillars 21 and 22.
  • the ATC device 30 is fixed to the front of the connecting plate 23 and supported above the spindle head 6.
  • the ATC device 30 includes a magazine 31, a reduction gear 32, a magazine motor 33, etc.
  • the magazine 31 includes a magazine base 37 and multiple grip arms 38.
  • the magazine base 37 is substantially disk-shaped and is supported on the front of the connecting plate 23 so as to be rotatable about a pivot shaft 37A (see FIG. 5).
  • the pivot shaft 37A is slightly inclined downward toward the front side in the Z-axis direction.
  • the reduction gear 32 and the magazine motor 33 are attached to the magazine base 37.
  • the output shaft (not shown) of the magazine motor 33 is connected to the pivot shaft 37A via the reduction gear 32.
  • the power of the magazine motor 33 is transmitted to the pivot shaft 37A of the magazine base 37 via the reduction gear 32.
  • the multiple grip arms 38 are aligned along the outer periphery of the magazine base 37 and extend radially outward in the radial direction.
  • the tip of the grip arm 38 grasps the tool holder 90 in a direction perpendicular to the tool holder 90 with the tool holder 90 laid horizontally.
  • the lowest position of the magazine 31 is the tool transfer position (an example of the "indexed position" of the present invention). When indexed to the tool transfer position, the grip arm 38 transfers the tool to and from the spindle 7.
  • the magazine cover 10 is fixed to the front of the upper part of each of the support columns 21, 22.
  • the magazine cover 10 is box-shaped and covers the periphery of the magazine 31.
  • the magazine cover 10 reduces the adhesion of chips and cutting fluid splashes to the magazine 31.
  • a rectangular opening 102 is provided in the bottom wall 101 of the magazine cover 10. The opening 102 is located directly below the tool transfer position of the magazine 31.
  • a magazine shutter 103 (hereinafter referred to as "shutter 103") is provided in the opening 102.
  • the shutter 103 opens and closes the opening 102 under the control of the CPU 41 of the control panel.
  • a cover (not shown) is attached to the machine tool 1.
  • the cover surrounds the machine tool 1 and prevents chips and coolant generated during cutting from scattering around.
  • An opening (not shown) for loading and unloading the workpiece, and a door (not shown) for opening and closing the opening are provided on the front of the cover.
  • An operation panel 25 (see Figure 8) is provided next to the opening. A user uses the operation panel 25 to input various data and perform various operations on the machine tool 1.
  • the machine tool 1 has a machining area and a tool changing area (hereinafter referred to as the "ATC area") arranged side by side in the Y-axis direction.
  • the machining area is arranged in the space on the base 2 side (lower side) of the Y-axis origin.
  • the machining area is an area where machining of a workpiece fixed to the upper surface of the rotary table 9 is performed.
  • the ATC area is a space on the opposite side (upper side) of the machining area with respect to the Y-axis origin, and is arranged at a position overlapping with the machining area in the Z-axis direction.
  • the ATC area is an area where tool changing of the spindle 7 is performed by the ATC device 30.
  • the machine tool 1 can move the spindle 7 between the machining area and the ATC area by moving the spindle head 6 up and down.
  • the machine origin and a number of reference points set in the ATC area will be described with reference to Figures 6 and 7.
  • the spindle head 6 is omitted and the spindle 7, tool holder 90, and tool 91 are simplified in order to show the direction of the spindle 7.
  • the machine origin of the machine tool 1 is the position where the machine coordinates of the X-axis and Y-axis are 0 and the machine coordinate of the Z-axis is the rear end position of the machining area, and is determined according to the structure of the machine tool 1.
  • the position of the machine origin changes depending on the structure of the machine tool 1, so the sizes of the machining area and the ATC area set based on the machine origin also change depending on the structure of the machine tool 1.
  • ATC position a tool change position
  • ATC origin an ATC origin
  • ATC preparation position are reference points to which the spindle 7 is moved and positioned when performing a tool change operation (hereafter referred to as "ATC operation").
  • the ATC position is the position where the tool is handed over to and from the grip arm 38 indexed to the tool transfer position of the magazine 31.
  • the ATC origin is a position moved in the Z-axis + direction (rearward) from the ATC position, and is the rear end position of the ATC area.
  • the ATC origin is a position where the magazine 31 can rotate without interference between the tool held by the grip arm 38 and the spindle 7.
  • the ATC preparation position is a position moved in the Y-axis - direction (downward) from the ATC position, and is the boundary position between the machining area and the ATC area.
  • the ATC preparation position is a position with the same coordinates in the Z-axis direction as the ATC position.
  • tool change paths 51, 52 are set in the ATC area.
  • the tool change paths 51, 52 form an inverted L-shaped path.
  • the tool change path 51 is a path that extends in the Y-axis + direction (upward) from the ATC preparation position to the ATC position.
  • the tool change path 52 is a path that extends in the Z-axis + direction (rearward) from the ATC position to the ATC origin.
  • the tool change paths 51, 52 are paths along which the spindle head 6 moves during ATC operation.
  • the spindle 7 is restricted in movement so that it can only move on the tool change paths 51, 52 and cannot move anywhere else.
  • a magazine rotation area is set around the ATC position.
  • the magazine rotation area is an area in which the grip arm 38 of the magazine 31 rotates around the rotation axis 37A.
  • the magazine rotation area may include the tool holder 90 and tool 91 held by the grip arm 38.
  • the coordinate position of the rear end of the magazine rotation area is located between the ATC position and the ATC origin.
  • the coordinate position of the lower end of the magazine rotation area is located between the ATC position and the ATC preparation position.
  • the spindle 7 if the Z-axis of the spindle 7 is retracted to the ATC origin on the tool change path 52, the spindle 7 will be removed from the magazine rotation area. In addition, if the Y-axis of the spindle 7 is lowered to the ATC preparation position on the tool change path 51, the spindle 7 will move out of the magazine rotation area.
  • ATC position Z-axis An example of the ATC operation of the machine tool 1 will be described with reference to FIG. 6.
  • the movement of the spindle head 6 will be described as "movement of the spindle 7."
  • the ATC position on the X-axis will be referred to as the ATC position X-axis
  • the ATC position on the Y-axis will be referred to as the ATC position Y-axis
  • the ATC position on the Z-axis will be referred to as the ATC position Z-axis.
  • the spindle 7 is located, for example, at P0 in the machining area. At this time, the shutter 103 of the magazine cover 10 is closed (see FIG. 2). A tool holder 90 that holds a tool 91 is attached to the spindle 7 (see FIG. 7). A clamping mechanism (not shown) provided in the spindle 7 fixes the tool holder 90 attached to the spindle 7.
  • the machine tool 1 performs an orienting operation of the spindle 7 while retracting the Z axis of the spindle 7 located at P0 toward the Z axis origin (see arrow A1 in FIG. 6).
  • the orienting operation is an operation to return the angle of the spindle 7 to a reference position (e.g., 0 degrees).
  • the spindle 7 reaches P1.
  • the spindle 7 reaches P2.
  • the Z axis of the spindle 7 located at P2 is advanced to the ATC position Z axis (see arrow A3 in FIG. 6).
  • the spindle 7 reaches the ATC preparation position.
  • the spindle 7 is raised from the ATC preparation position along the tool change path 51 (see arrow A4 in FIG. 6).
  • the grip arm 38 which has been indexed to the tool transfer position, is exposed facing downward through the opening 102 in the magazine cover 100.
  • the tool holder 90 attached to the spindle 7 passes through the opening 102 and is pushed into the grip arm 38 from below.
  • the spindle 7 reaches the ATC position, the tool holder 90 attached to the spindle 7 engages with and is gripped by the grip arm 38.
  • the clamping mechanism inside the spindle 7 releases the fixation of the tool holder 90.
  • the tool holder 90 can now be removed from the spindle 7.
  • the machine tool 1 moves the spindle 7 backward from the ATC position along the tool change path 52 with the grip arm 38 clamping the tool holder 90 to be attached to the spindle 7 (see arrow A5 in FIG. 6).
  • the spindle 7 reaches the ATC origin, the tool holder 90 is removed from the spindle 7.
  • the ATC device 30 rotates the magazine 31, and indexes the grip arm 38, which holds the tool holder of the next tool to be attached (hereinafter referred to as the "next tool”), to the tool transfer position (see rotating arrow A6 in FIG. 6).
  • the tool holder of the next tool is positioned in front of the spindle 7 in the Z-axis direction.
  • the machine tool 1 advances the spindle 7 from the ATC origin along the tool change path 52 (see arrow A7 in FIG. 6). This causes the tool holder of the next tool to be inserted into the spindle 7. At the same time as it reaches the ATC position, the tool holder of the next tool is attached to the spindle 7. A clamping mechanism inside the spindle 7 fixes the tool holder attached to the spindle 7.
  • the machine tool 1 lowers the spindle 7, to which the tool holder of the next tool is attached, from the ATC position along the tool exchange path 51, and positions it at the ATC preparation position (see arrow A8 in Figure 6). This completes the ATC operation of the spindle 7.
  • the machine tool 1 moves the spindle 7, to which the tool holder of the next tool is attached, from the ATC preparation position toward the next command point within the machining area.
  • the command point is the target position to which the spindle 7 is moved after the ATC operation is completed, and may be set, for example, by a control command in the NC program.
  • the Z axis of the spindle 7 located at P0 is retracted to the Z axis origin, but for example, it is also possible to set an R point (return point) where the tool 91 attached to the spindle 7 does not come into contact with the workpiece and jig on the rotary table 9, and retract to that R point.
  • the R point may be located forward of the Z axis origin.
  • the electrical configuration of the machine tool 1 will be described with reference to FIG. 8.
  • the machine tool 1 includes a numerical control device 40, a spindle motor 61, an X-axis motor 62, a Y-axis motor 63, a Z-axis motor 64, a magazine motor 33, drive circuits 71-75, encoders 61A, 62A, 63A, 64A, 33A, an operation panel 25, etc.
  • the numerical control device 40 includes a CPU 41, a ROM 42, a RAM 43, a storage device 44, a communication I/F 45, an input/output interface 46, etc.
  • the CPU 41 controls the overall operation of the machine tool 1.
  • the ROM 42 stores various programs such as an NC control program, a power-on program, an alarm detection program, and an application control program.
  • the NC control program executes the NC control process (see FIG. 9) described below.
  • the power-on program executes the power-on process (see FIG. 10) described below.
  • the alarm detection program executes the alarm detection process (see FIG. 11) described below.
  • the application control program executes the application control process (see FIG. 12) described below.
  • the RAM 43 stores various data during the execution of various processes.
  • the storage device 44 is a non-volatile memory, and stores various data such as an NC program for machining a workpiece and a stop flag described below.
  • the communication I/F 45 can be connected to a terminal (not shown) via a wired or wireless connection.
  • the input/output interface 46 connects the operation panel 25 to the drive circuits 71 to 75.
  • the storage device 44 stores a number indicating the index position of the grip arm 38 (hereinafter, the index number) and a coordinate corresponding to the index position (hereinafter, the rotation position coordinate).
  • the CPU 41 can index the grip arm 38 that grips the tool holder 90 that holds an arbitrary tool 91.
  • the spindle motor 61, X-axis motor 62, Y-axis motor 63, Z-axis motor 64, and magazine motor 33 are servo motors.
  • Drive circuit 71 controls the spindle motor 61 based on a control signal from the CPU 41.
  • Drive circuit 72 controls the X-axis motor 62 based on a control signal from the CPU 41.
  • Drive circuit 73 controls the Y-axis motor 63 based on a control signal from the CPU 41.
  • Drive circuit 74 controls the Z-axis motor 64 based on a control signal from the CPU 41.
  • Drive circuit 75 controls the magazine motor 33 based on a control signal from the CPU 41.
  • Encoder 61A detects the rotational position of the spindle motor 61 and transmits the detection signal to the drive circuit 71.
  • the drive circuit 71 performs feedback control of the spindle motor 61 based on the detection signal.
  • the CPU 41 receives the detection signal of encoder 61A from the drive circuit 71 and converts the received detection signal into the rotational coordinates of the spindle 7 to detect the rotational position of the spindle.
  • Encoder 62A detects the rotational position of the X-axis motor 62 and transmits the detection signal to the drive circuit 72.
  • the drive circuit 72 performs feedback control of the X-axis motor 62 based on the detection signal.
  • the CPU 41 receives the detection signal of encoder 62A from the drive circuit 72 and converts the received detection signal into the X-axis coordinate position of the spindle 7 to detect the X-axis position.
  • Encoder 63A detects the rotational position of the Y-axis motor 63 and transmits the detection signal to the drive circuit 73.
  • the drive circuit 73 performs feedback control of the Y-axis motor 63 based on the detection signal.
  • the CPU 41 receives a detection signal of the encoder 63A from the drive circuit 73, and converts the received detection signal into a coordinate position of the Y axis of the spindle 7 to detect the Y axis position.
  • the encoder 64A detects the rotational position of the Z axis motor 64, and transmits the detection signal to the drive circuit 74.
  • the drive circuit 74 performs feedback control of the Z axis motor 64 based on the detection signal.
  • the CPU 41 receives a detection signal of the encoder 64A from the drive circuit 74, and converts the received detection signal into a coordinate position of the Z axis of the spindle 7 to detect the Z axis position.
  • the encoder 33A detects the rotational position of the magazine motor 33, and transmits the detection signal to the drive circuit 75.
  • the drive circuit 75 performs feedback control of the magazine motor 33 based on the detection signal.
  • the CPU 41 converts the detection signal of the encoder 33A received from the drive circuit 75 into a rotational position coordinate of the magazine 31, and detects the rotational position of the magazine 31.
  • the operation panel 25 includes a display unit 26 and an operation unit 27.
  • the display unit 26 is a touch panel, and displays various information based on a control signal from the CPU 41, and also accepts various inputs and transmits them to the CPU 41.
  • the operation unit 27 includes, for example, multiple physical push keys (not shown), and accepts various operations and transmits them to the CPU 41.
  • the NC control process will be described with reference to FIG. 9.
  • the CPU 41 reads the NC control program from the ROM 42 and executes this process.
  • the CPU 41 reads the selected NC program from the storage device 44 (S1).
  • the CPU 41 accepts an operation to execute the NC program by the user using the operation unit 27, and determines whether or not to execute the read NC program (S2).
  • the CPU 41 returns to S2 and waits until an operation to execute is accepted (S2: NO). If an operation to execute is accepted (S2: YES), the CPU 41 initializes the stop flag stored in the storage device 44 to 0 and turns it off (S3), and interprets one block of the NC program from the beginning (S4).
  • the CPU 41 determines whether the interpreted block is an end command (S5). If it is not an end command (S5: NO), the CPU 41 generates a control command (internal command) based on the interpreted block (S6). The CPU 41 determines whether the generated control command is a tool change command (S7). If the generated control command is a control command for positioning or the like (S7: NO), the CPU 41 executes the generated control command (S8). After executing the control command, the CPU 41 moves to the next block and returns to S4 to repeat the above process.
  • the CPU 41 starts the ATC operation (S9).
  • the CPU 41 determines whether the power has been turned off during the ATC operation (S10). If the power has been turned off during the ATC operation (S10: YES), the CPU 41 sets the stop flag stored in the storage device 44 to 1 and turns it on (S12), and ends this process. If the power has not been turned off during the ATC operation (S10: NO), the CPU 41 determines whether the ATC operation has ended (S11). Until the ATC operation ends (S11: NO), the CPU 41 returns to S10 and continues to monitor the power supply. If the ATC operation ends (S11: YES), the CPU 41 moves to the next block and returns to S4 to repeat the above process. If the interpreted block is an end command (S5: YES), the CPU 41 ends this process.
  • the power-on process will be described with reference to FIG. 10.
  • the CPU 41 reads the power-on program from the ROM 42 and executes this process.
  • the CPU 41 determines whether the power was turned off during ATC operation the previous time the power was turned on (S21).
  • the CPU 41 refers to the stop flag stored in the storage device 44. If the stop flag is 0, the power was not turned off during ATC operation (S21: NO), so the CPU 41 switches to manual operation mode (S23) and displays a manual condition screen (not shown) on the display unit 26 of the operation panel 25 (S4).
  • S23 manual operation mode
  • various conditions can be set when moving and rotating the spindle 7 manually. For example, high-speed movement speed, high-speed rotation speed, constant-speed movement speed, low-speed rotation speed, step movement amount, step rotation amount, spindle rotation speed, etc.
  • the CPU 41 ends this process.
  • the stop flag is 1, the power is turned off during ATC operation (S21: NO). In this case, various servo motors are turned off during ATC operation, so the spindle 7 is stopped within the ATC area. If an external force is applied to the spindle 7 with the servo motors turned off, the position of the spindle 7 may shift in the X-axis, Y-axis, or Z-axis direction from the tool change paths 51, 52. The rotation position of the magazine 31 may also shift in the circumferential direction.
  • the positional relationship between the spindle 7 and the grip arm 38 is shifted, so for example, the tool holder 90 attached to the spindle 7 does not engage with the grip arm 38, and the clamp mechanism in the spindle 7 releases the fixation of the tool holder 90, which may cause the tool holder 90 and tool 91 to fall from the spindle 7.
  • the CPU 41 of this embodiment executes the ATC restoration process (see Figures 13 to 17) described below (S22) to display restoration operation guidance to the user. After the ATC restoration process is completed, the CPU 41 ends this process.
  • the alarm detection process will be described. If an alarm such as an emergency stop occurs while the machine tool 1 is running, the CPU 41 reads out an alarm detection program from the ROM 42 and executes this process. The CPU 41 displays the alarm on the display unit 26 (S31) and notifies the user that an alarm has occurred. The CPU 41 determines whether the movement of the spindle 7 has stopped during the ATC operation (S32). If the movement of the spindle 7 has not stopped during the ATC operation (S32: NO), the CPU 41 ends this process. If the movement of the spindle 7 has stopped during the ATC operation (S32: YES), the CPU 41 executes the ATC recovery process described below (S33) and ends this process.
  • S32 ATC recovery process described below
  • the application control process will be described with reference to FIG. 12.
  • the CPU 41 reads the application control program from the ROM 42 and executes this process.
  • the CPU 41 displays a menu on the display unit 26 (S35).
  • the menu includes various items such as synchronous tap return, spindle run-in, automatic door adjustment, position recovery, origin position adjustment, ATC recovery, etc.
  • the CPU 41 accepts the selection of an item from the menu (S36).
  • the CPU 41 determines whether the ATC recovery item has been selected (S37). If the ATC recovery item has been selected (S37: YES), the CPU 41 executes the ATC recovery process described below (S38) and ends this process. If an item other than ATC recovery has been selected (S37: NO), the CPU 41 executes the selected item (S39) and ends this process.
  • the grip arm 38 grips the tool holder 90 to which the tool 91 is integrally attached, but for convenience of explanation, there are some places where it is expressed as "the grip arm 38 grips the tool 91.”
  • the CPU 41 displays the axis return screen 81 on the display unit 26 (S40).
  • the axis return screen 81 has display areas 81A to 81D.
  • the recovery procedure of STEP 1 is displayed in the display area 81A.
  • STEP 1 is an axis return process.
  • the axis return is an operation of returning the spindle 7 stopped in the ATC area onto the tool exchange paths 51 and 52.
  • the display area 81B displays coordinate information such as the machine coordinate position, the ATC position, the Y-axis origin, and the ATC origin position.
  • the machine coordinate position is the current position information of the spindle 7.
  • the display area 81C displays the magazine number, the magazine shutter position, and the magazine rotation area.
  • the magazine number column displays the magazine number corresponding to the grip arm 38 currently indexed to the tool transfer position of the magazine 31.
  • the magazine shutter position column displays the open/closed state of the shutter 103.
  • the magazine rotation area column displays OFF when the spindle 7 is in the magazine rotation area, and ON when the spindle 7 is outside the magazine rotation area.
  • the display area 81D displays the manual condition.
  • the manual conditions are the same as the manual condition items displayed on the manual condition screen described above.
  • the display area 81A displays four steps required for axis return.
  • step 1 switch to manual operation mode.
  • step 2 press the recovery operation enable key 811 to enable the recovery operation.
  • the recovery operation enable key 811 is located at the bottom right of the axis return screen 81.
  • step 3 if the servo motor is off, axis return is performed when the servo motor is turned on by pressing the [Reset] key while pressing the [Release] key on the operation unit 27. At this time, the alarm is released.
  • step 4 if the servo motor is on, axis return is performed by pressing the [R] key while pressing the [Release] key on the operation unit 27. Note that this step is also performed if axis return is performed in step 3. The user simply performs the operations according to the recovery procedures displayed in the display area 81A.
  • the CPU 41 determines whether or not to execute shaft return (S41). Shaft return is not executed until the operation of step 3 or step 4 is performed (S41: NO), so the CPU 41 returns to S40 and waits. If the operation of step 3 or step 4 is performed (S41: YES), shaft return destination determination processing is executed to determine the shaft return destination of the spindle 7 (S42).
  • the CPU 41 detects the position of the spindle 7 (S81).
  • the position of the spindle 7 is, for example, the position of the tip of the spindle 7, and is the coordinate position of the X-axis, Y-axis, and Z-axis.
  • the detected position of the spindle 7 is temporarily stored in the RAM 43.
  • the CPU 41 determines whether the detected Y-axis of the spindle 7 is above the Y-axis origin (S82).
  • the CPU 41 sets the return destination of the X-axis, Y-axis, and Z-axis of the spindle 7 to the current coordinate position (S98). Note that instead of the processing of S98, for example, the coordinate position of the spindle 7 immediately before the servo is turned off may be stored, and the return destinations of the X-axis, Y-axis, and Z-axis of the spindle 7 may be set to that coordinate position.
  • Servo off means that the operation of servo motors such as the spindle motor 61, X-axis motor 62, Y-axis motor 63, Z-axis motor 64, and magazine motor 33 is turned off.
  • the CPU 41 ends this processing and proceeds to S43 in the flow of FIG. 13.
  • the spindle 7 is within the ATC area, but the spindle 7 may be deviated from the tool change paths 51, 52. Therefore, it is determined for each of the X-axis, Y-axis, and Z-axis whether the current position of the spindle 7 is within the recovery distance from the tool change paths 51, 52.
  • the CPU 41 judges whether the X-axis of the spindle 7 is within the ATC position X-axis ⁇ recovery distance (S83).
  • a recovery area W1 is provided in the ATC area.
  • the recovery area W1 is a space defined by the range of the ATC position X-axis ⁇ recovery distance.
  • the recovery distance is a very small distance, for example, about 2 mm, that does not cause damage such as collision with other members even if the spindle 7 is moved by that distance.
  • the X-axis of point K1 is located within the recovery area W1 (S83: YES).
  • the CPU 41 sets the return destination of the X-axis of the spindle 7 to the ATC position X-axis (S84).
  • the return destination of the X-axis may be temporarily stored in the RAM 43.
  • the CPU 41 sets the return destination of the X-axis to the current coordinate position (S85).
  • the CPU 41 determines whether the Y-axis of the spindle 7 is below the Y-axis origin + recovery distance (S86). As shown in FIG. 19, a recovery area W2 is further provided in the ATC area.
  • the recovery area W2 is a space defined by the range of the Y-axis origin + recovery distance. For example, when the spindle 7 is stopped at point K2, the Y-axis at point K2 is located within the recovery area W2 (S86: YES). In this case, the CPU 41 sets the return destination of the Y-axis of the spindle 7 to the Y-axis origin (S88).
  • the CPU 41 judges whether the Y axis of the spindle 7 is within the ATC position Y axis ⁇ the recovery distance (S87).
  • a recovery area W3 is further provided in the ATC area.
  • the recovery area W3 is a space defined by the range of the ATC position Y axis ⁇ the recovery distance. For example, when the spindle 7 is stopped at point K3, the Y axis of point K3 is located within the recovery area W3 (S87: YES).
  • the CPU 41 sets the return destination of the Y axis of the spindle 7 to the ATC position Y axis (S89).
  • the return destination of the Y axis may be temporarily stored in the RAM 43. Note that if the Y axis of the spindle 7 is located outside the recovery area W3 (S87: NO), the CPU 41 sets the return destination of the Y axis to the current coordinate position (S90).
  • the CPU 41 judges whether the Z axis of the spindle 7 is within the range of ATC position Z axis - recovery distance ⁇ Z axis ⁇ ATC position Z axis (S91).
  • a recovery area W4 is further provided in the ATC area.
  • the recovery area W4 is a space defined by the range of ATC position Z axis - recovery distance ⁇ Z axis ⁇ ATC position Z axis.
  • the CPU 41 sets the return destination of the Z axis of the spindle 7 to the ATC position Z axis (S94).
  • the CPU 41 judges whether the Z axis of the spindle 7 is within the range of ATC position Z axis ⁇ Z axis ⁇ ATC position Z axis + recovery distance and the magazine 31 is indexed normally (S92).
  • the CPU 41 may determine whether a rotational deviation of a threshold value or more has occurred in the magazine 31.
  • the rotational deviation is a deviation in the circumferential direction around the rotation axis 37A with respect to the reference coordinates of the magazine 31.
  • the reference coordinates of the magazine 31 are the rotational position coordinates of the magazine 31 that correspond to the indexing position of the grip arm 38, and are stored in the storage device 44.
  • the CPU 41 converts the detection signal of the encoder 33A received from the drive circuit 75 into the rotational position coordinates of the magazine 31, and compares them with the reference coordinates stored in the storage device 44, thereby determining whether a rotational deviation of a threshold value or more has occurred in the magazine 31. If the rotational deviation is less than the threshold, the CPU 41 can determine that the magazine 31 is in a state of being indexed correctly, and if the rotational deviation is greater than the threshold, can determine that the magazine 31 is in a state of being not being indexed correctly.
  • a recovery area W5 is further provided in the ATC area.
  • the recovery area W5 is a space defined by the range of ATC position Z axis ⁇ Z axis ⁇ ATC position Z axis + recovery distance.
  • the CPU 41 sets the return destination of the Z axis of the spindle 7 to the ATC position Z axis (S94).
  • the CPU 41 judges whether the Z-axis of the spindle 7 is within the range of ATC origin ⁇ Z-axis ⁇ ATC origin + recovery distance (S93). Also, if the Z-axis position is within the recovery region W5 but the magazine 31 is not correctly indexed (S92: NO), the position of the grip arm 38 is misaligned in the Y-axis direction. In this state, when the Z-axis of the spindle 7 is moved to the ATC position Z-axis, the spindle 7 may interfere with the tool holder 90 held by the grip arm 38.
  • the CPU 41 does not set the return destination of the Z-axis to the ATC position Z-axis, and judges whether the Z-axis of the spindle 7 is within the range of ATC origin ⁇ Z-axis ⁇ ATC origin + recovery distance (S93).
  • a recovery area W6 is further provided in the ATC area.
  • the recovery area W6 is a space defined by the range of ATC origin ⁇ Z axis ⁇ ATC origin + recovery distance.
  • the CPU 41 sets the return destination of the Z axis of the spindle 7 to the ATC origin (S96).
  • the return destination of the Z axis may be temporarily stored in the RAM 43.
  • the CPU 41 ends this process and proceeds to S43 in the flow of FIG. 13.
  • the CPU 41 has finished the axis return destination determination process of S42, and therefore executes axis return of the spindle 7 according to the return destinations of the X-axis, Y-axis, and Z-axis set in the above axis return destination determination process (S43).
  • the X-axis, Y-axis, and Z-axis return may be performed one axis at a time, or two or three axes may be performed simultaneously. The order in which they are performed is not specified.
  • the CPU 41 does not move the spindle 7 in the moving axis whose return destination is set to the current coordinate position. In other words, the CPU 41 restricts the movement of the spindle 7.
  • the CPU 41 determines whether or not the axis return is complete (S44). Until the axis return is complete (S44: NO), the CPU 41 returns to S43 and continues execution. When the axis return is complete (S44: YES), the CPU 41 determines whether or not the Y-axis of the spindle 7 is below the Y-axis origin (S45). When the Y-axis of the spindle 7 is below the Y-axis origin (S45: YES), the spindle 7 is already located in the machining area, so the CPU 41 does not change the position of the spindle 7 and proceeds to S54 described below.
  • the CPU 41 judges whether the position of the magazine 31 is normal or not (S47).
  • the method of judging whether the position of the magazine 31 is normal or not is the same as the method of judging whether the magazine 31 is indexed normally in the judgment process of S92 in FIG. 17.
  • the grip arm 38 indexed to the tool transfer position is positioned parallel to the Y-axis direction.
  • the tool holder 90 and tool 91 attached to the spindle 7 extend in the Z-axis direction.
  • the grip arm 38 is positioned perpendicular to the tool holder 90.
  • the position of the magazine 31 is normal (S47: YES), so the CPU 41 determines the recovery procedure for the spindle 7 to be the operation pattern of STEP 2-a described below, and displays the Y-axis recovery screen 82 corresponding to that operation pattern on the display unit 26 (S48).
  • the Y-axis recovery screen 82 is provided with display areas 82A to 82D.
  • the recovery procedure of STEP 2-a is displayed in the display area 82A.
  • STEP 2-a is an operation pattern in which the spindle 7 on the tool exchange path 51 is lowered along the tool exchange path 51 to the machining area.
  • the display areas 82B to 82D are the same as the display areas 81B to 81D of the axis return screen 81 shown in FIG. 23, and therefore a description thereof will be omitted.
  • Display area 81A informs the user that the Y-axis position is abnormal, and also warns the user that if an alarm occurs during operation, the user should press the [Reset] key on the operation unit 27 while pressing the [Release] key to release the alarm before proceeding with the procedure (notification). Below that, guidance is displayed for the four procedures required for STEP 2-a. First, in procedure 1, close the cover door of the machine tool 1. In procedure 2, if the shutter 103 is closed, press the [Release] key on the operation unit 27 while pressing the [P] key to open the shutter 103.
  • the shutter 103 does not open automatically, so open the shutter 103 manually, or change to a mode other than the maintenance mode (for example, automatic operation mode or setup mode) and then open the shutter 103.
  • a mode other than the maintenance mode for example, automatic operation mode or setup mode
  • the Next key 821 is displayed at the bottom right of the Y-axis recovery screen 82.
  • the CPU 41 executes the Y-axis recovery process in accordance with the user's operations in steps 1 to 3 (S49).
  • the Y-axis recovery process moves the spindle 7 below the Y-axis origin. This allows the CPU 41 to safely and appropriately recover the spindle 7 that has stopped in the ATC area to the machining area along the tool change path 51.
  • the CPU 41 determines whether the recovery operation is complete (S50). The recovery operation is not complete until the user presses the Next key 821 (S50: NO), so the CPU 41 returns to S50 and waits. If the Next key 821 is pressed, the recovery operation is complete (S50: YES), so the CPU 41 displays the index tool confirmation screen 88 (see FIG. 40), which will be described later, on the display unit 26 (S54).
  • the CPU 41 determines the recovery procedure for the spindle 7 to be the operation pattern of STEP 2-b described below, displays the YM-axis recovery screen 83 corresponding to that operation pattern on the display unit 26 (S51), and executes the YM-axis recovery process (S52).
  • the YM-axis recovery screen 83 has display areas 83A to 83D.
  • the display area 83A indicates that the positions of the Y-axis and magazine 31 are abnormal, that they will be restored in the following procedure, and (notice) that if an alarm occurs during operation, press the [Reset] key on the operation unit 27 while pressing the [Release] key to release the alarm before proceeding with the procedure.
  • STEP 2-b is an operation pattern in which the spindle 7 located on the tool exchange path 51 is lowered along the tool exchange path 51 to the machining area, and then the position of the magazine 31 is returned to normal.
  • the display areas 83B to 83D are the same as the display areas 81B to 81D of the axis return screen 81 shown in FIG. 23, so their explanations are omitted.
  • STEP 2-b the position of the magazine 31 is shifted, so the magazine number is not displayed in the display area 83C.
  • the YM axis recovery process will be described with reference to FIG. 15.
  • the CPU 41 displays steps 1 to 3 out of five steps in the display area 83A (S101). Steps 1 to 3 are the same as steps 1 to 3 of STEP 2-a displayed in the display area 82A of the Y axis recovery screen 82 shown in FIG. 25.
  • the user operates according to steps 1 to 3. In step 3, the user lowers the Y axis of the spindle 7 toward the Y axis origin.
  • the CPU 41 detects the position of the Y axis of the spindle 7 (S102).
  • the CPU 41 judges whether the detected Y axis is equal to or lower than the Y axis origin (S103).
  • the CPU 41 returns to S102 and waits until the Y axis is equal to or lower than the Y axis origin. If the Y axis is equal to or lower than the Y axis origin (S103: YES), the spindle 7 is out of the magazine rotation area. Therefore, even if the magazine 31 is rotated in this state, the grip arm 38 does not interfere with the spindle 7.
  • step 4 is further displayed in the display area 83A (S105).
  • the magazine 31 is automatically returned to the correct position by pressing the [Magazine forward rotation] key while pressing the [Release] key of the operation unit 27.
  • the CPU 41 judges whether the operation of step 4 has been performed (S106). Until the operation of step 4 is performed (S106: NO), the CPU 41 returns to S106 and waits.
  • step 4 If the operation of step 4 is performed (S106: YES), the CPU 41 generates an automatic correction command for the magazine 31 and outputs it to the drive circuit 75, thereby performing automatic rotation correction of the magazine 31 (S107).
  • the automatic rotation correction is a correction that rotates the magazine 31 and returns it to the reference position. As a result, the rotation deviation of the magazine 31 is automatically eliminated.
  • the CPU 41 further displays step 5 in the display area 83A (S112).
  • Step 4 in this case differs from step 4 in FIG. 27 in that the grip arm 38 to which no tool is attached is manually moved to the correct position by pressing the [Magazine forward rotation] key or the [magazine reverse rotation] key while pressing the [Release] key on the operation unit 27. The user operates according to step 4 to rotate the magazine 31 toward the reference position so that the rotation deviation is eliminated.
  • the CPU 41 detects the position of the magazine 31 (S110) and determines whether the magazine 31 has reached the reference position (S111). The CPU 41 returns to S110 and waits until the magazine 31 reaches the reference position (S111: NO). If the magazine 31 has returned to the reference position (S111: YES), the grip arm 38 to which no tool is attached has been indexed to the tool transfer position, so the CPU 41 further displays step 5 in the display area 83A (S112). Step 5 is the operation of pressing the Next key 831. The Next key 831 is displayed in the lower right of the YM axis recovery screen 83. The CPU 41 ends this process and returns to S53 in FIG. 13 to proceed with the process.
  • the CPU 41 determines whether the recovery operation is complete (S53). The recovery operation is not complete until the user presses the Next key 831 (S53: NO), so the CPU 41 returns to S53 and waits. If the Next key 831 is pressed, the recovery operation is complete (S53: YES), so the CPU 41 displays the index tool confirmation screen 88 (see FIG. 40), which will be described later, on the display unit 26 (S54).
  • the CPU 41 judges whether the position of the magazine 31 is normal (S62). For example, as shown in FIG. 29 (2), if the position of the magazine 31 is normal, the grip arm 38 indexed to the tool transfer position is positioned parallel to the Y-axis direction while gripping the tool holder 90, so that the tool holder 90 and tool 91 are positioned parallel to the Z-axis direction. Therefore, the tool holder 90 is positioned coaxially with the spindle 7 in the Z-axis direction.
  • the CPU 41 determines the recovery procedure for the spindle 7 to be the operation pattern of STEP 2-c described below, and displays the YZ-axis recovery screen 84 corresponding to that operation pattern on the display unit 26 (S63).
  • the YZ-axis recovery screen 84 has display areas 84A to 84D.
  • STEP2-c is an operation pattern in which the spindle 7 located on the tool exchange path 52 is temporarily moved back to the ATC origin along the tool exchange path 52, then moved forward to the ATC position, and then moved from the ATC position to the ATC preparation position, after which the Z-axis is returned to the ATC origin.
  • the display areas 84B to 84D are the same as the display areas 81B to 81D of the axis return screen 81 shown in FIG. 23, and therefore description thereof will be omitted.
  • Display area 84A informs the user that the Y-axis and Z-axis positions are abnormal, that they can be restored by following the procedure below, and also warns the user that if an alarm occurs during operation, the user should press the [Reset] key and the [Release] key on the operation unit 27 to reset the alarm before continuing the procedure as a notice. Below that, guidance is displayed for the five steps required for STEP 2-c. Steps 1 and 2 are the same as steps 1 and 2 of STEP 2-a displayed in the display area 82A of the Y-axis restoration screen 82 shown in FIG. 25.
  • step 3 the user presses the [+Z] key while pressing the [Release] key on the operation unit 27 to align the Z-axis of the spindle 7 with the ATC origin.
  • step 4 the user presses the [Tool change single action] key on the operation unit 27.
  • the Z-axis of the spindle 7 moves to the ATC position, and the Y-axis moves to the Y-axis origin, after which the Z-axis returns to the machine origin.
  • the Next key 841 is displayed in the lower right corner of the YZ axis recovery screen 84. The user operates following these five steps.
  • the CPU 41 executes YZ-axis recovery processing in accordance with the user's operations in steps 1 to 4 (S64).
  • the Z-axis recovery processing moves the Y-axis of the spindle 7 to the Y-axis origin, and then the Z-axis returns to the machine origin. This allows the CPU 41 to safely and appropriately recover the spindle 7 that has stopped in the ATC area to the machining area along the tool exchange paths 52, 51.
  • the CPU 41 determines whether the recovery operation is complete (S65). Since the recovery operation is not complete until the user presses the Next key 841 (S65: NO), the CPU 41 returns to S65 and waits.
  • the position of the magazine 31 may not be normal (S62: NO) and a rotational deviation may occur.
  • S62: NO the position of the magazine 31 may not be normal (S62: NO) and a rotational deviation may occur.
  • the spindle 7 is located at point M4 on the tool exchange path 52 as shown in FIG. 31 (1), if a rotational deviation occurs in the magazine 31 as shown in FIG.
  • the positions of the tool holder 90 and tool 91 held by the grip arm 38 may be shifted in the Y axis + direction relative to the spindle 7, and may also be shifted in the X axis + direction or - direction.
  • the spindle 7 is temporarily moved back to the ATC origin along the tool exchange path 52 and then moved forward toward the ATC position as in STEP 2-c, the tool holder 90 held by the grip arm 38 may interfere with the tip of the spindle 7.
  • the CPU 41 judges whether the Z axis of the spindle 7 is not at the ATC origin (S66). For example, as shown in Figure 31 (1), when the spindle 7 is located at point M4 on the tool change path 52, the Z axis is not at the ATC origin (S66: YES), so the CPU 41 determines the recovery procedure for the spindle 7 to be the operation pattern of STEP 2-d described below, displays the YZM-axis recovery screen 85 corresponding to that operation pattern on the display unit 26 (S67), and executes the YZM-axis recovery process (S68).
  • the YZM axis recovery screen 85 has display areas 85A to 85D.
  • the display area 85A indicates that the positions of the Y axis, the Z axis, and the magazine are abnormal, and that they will be restored in the following procedure.
  • the user is alerted to press the [Reset] key and the [Release] key on the operation unit 27 while pressing the [Reset] key to release the alarm before continuing the procedure. Below that, the recovery procedure of STEP 2-d is displayed.
  • STEP 2-d is an operation pattern in which the spindle 7 located on the tool exchange path 52 is temporarily retracted to the ATC origin along the tool exchange path 52, the position of the magazine 31 is returned to normal, the Z axis is advanced to the ATC position, the ATC position is moved to the ATC preparation position, and the Z axis is returned to the ATC origin.
  • the display areas 85B to 85D are the same as the display areas 81B to 81D of the axis return screen 81 shown in FIG. 23, and therefore a description thereof will be omitted.
  • the magazine number is not displayed in the display area 85C because the magazine 31 is out of position. Also, since the M4 point of the spindle 7 is within the magazine rotation area, the magazine rotation area column of the display area 81C displays "OFF.”
  • the YZM axis recovery process will be described with reference to FIG. 16.
  • the CPU 41 displays steps 1 to 3 of the six steps in the display area 85A (S121). Steps 1 to 3 are the same as steps 1 to 3 of STEP 2-c displayed in the display area 84A of the YZ axis recovery screen 84 shown in FIG. 30.
  • the user operates according to steps 1 to 3.
  • Step 3 is an operation to move the Z axis of the spindle 7 toward the ATC origin.
  • the CPU 41 detects the Z axis of the spindle 7 (S122).
  • the CPU 41 judges whether the detected Z axis is the ATC origin (S123).
  • the CPU 41 Until the Z axis reaches the ATC origin (S123: NO), the CPU 41 returns to S122 and monitors the Z axis. If the Z axis reaches the ATC origin (S123: YES), the spindle 7 has retreated rearward from the magazine rotation area, so even if the magazine 31 is rotated in this state, the grip arm 38 will not interfere with the spindle 7.
  • step 4 is further displayed in the display area 83A (S125).
  • the magazine 31 is automatically returned to the correct position by pressing the [Magazine normal rotation] key while pressing the [Release] key of the operation unit 27.
  • the CPU 41 judges whether the operation of step 4 is performed (S126). Until the operation of step 4 is performed (S126: NO), the CPU 41 returns to S126 and waits.
  • step 4 If the operation of step 4 is performed (S126: YES), the CPU 41 generates an automatic correction command for the magazine 31 and outputs it to the drive circuit 75, thereby performing automatic rotation correction of the magazine 31 (S127). As a result, the rotational deviation of the magazine 31 is automatically eliminated. If the rotational deviation is less than the threshold value (S124: YES), the CPU 41 may not execute the processes of S125 and S126, and may directly perform automatic rotation correction of the magazine 31. The CPU 41 further displays step 5 in the display area 85A (S132).
  • Step 4 is further displayed in the display area 85A as shown in FIG. 33 (S129).
  • Step 4 in this case differs from step 4 in FIG. 32 in that the grip arm 38 to which no tool is attached is manually moved to the correct position by pressing the [Magazine forward rotation] key or the [Magazine reverse rotation] key while pressing the [Release] key on the operation unit 27. The user operates according to step 4 to rotate the magazine 31 toward the reference position so that the rotation deviation is eliminated.
  • the CPU 41 detects the position of the magazine 31 (S130) and determines whether the magazine 31 has reached the reference position (S131). The CPU 41 returns to S130 and waits until the magazine 31 has reached the reference position (S131: NO). As shown in FIG. 34 (2), if the magazine 31 has returned to the reference position (S131: YES), the grip arm 38, which does not have a tool attached, has been indexed to the tool transfer position, so the CPU 41 further displays step 5 in the display area 85A (S132).
  • Step 5 is the operation of pressing the [Tool change single action] key on the operation unit 27.
  • the Z axis of the spindle 7 moves from the ATC origin to the ATC position, the Y axis moves to the Y axis origin, and then the Z axis returns to the machine origin.
  • the CPU 41 detects the position of the spindle 7 (S133).
  • the CPU 41 determines whether the detected position of the spindle 7 is in the machining area (S134). Until the spindle 7 reaches the machining area (S134: NO), the CPU 41 returns to S133 and monitors the position of the spindle 7.
  • the spindle 7 is located in the machining area (S134: YES), so the CPU 41 further displays step 6 in the display area 85A (S135).
  • Step 6 is the operation of pressing the Next key 851.
  • the Next key 851 is displayed in the lower right of the YZM axis recovery screen 85. This enables the CPU 41 to safely and appropriately recover the spindle 7, which has stopped in the ATC area, to the machining area along the tool change paths 52, 51.
  • the CPU 41 ends the YZM axis recovery process, and proceeds to S69 in FIG. 14.
  • the CPU 41 determines whether the recovery operation is complete (S69). The recovery operation is not complete until the user presses the Next key 851 (S69: NO), so the CPU 41 returns to S69 and waits. If the Next key 851 is pressed, the recovery operation is complete (S69: YES), so the process returns to FIG. 13 and the CPU 41 displays the index tool confirmation screen 88, which will be described later, on the display unit 26 (S54).
  • the Z-axis of the spindle 7 may be located at the ATC origin on the tool change path 52 (S66: NO).
  • the spindle 7 is located at point M6, which is the ATC origin on the tool change path 52.
  • the position of the magazine 31 is shifted, so that the position of the tool holder 90 gripped by the grip arm 38 is shifted in the Y-axis + direction relative to the spindle 7, and further shifted in the X-axis + direction or - direction.
  • the CPU 41 determines the recovery procedure for the spindle 7 to be the operation pattern of STEP 2-e described later, and displays the YZM-axis recovery screen 86 corresponding to the operation pattern on the display unit 26 (S70).
  • the YZM axis recovery screen 86 has display areas 86A to 86D.
  • the display area 86A indicates that the magazine position is abnormal, that the magazine position is to be restored in the following procedure, and, as a notice, that if an alarm occurs during operation, the user should press the [Reset] key and the [Release] key on the operation unit 27 while pressing the [Reset] key to cancel the alarm before continuing the procedure. Below that, the recovery procedure of STEP 2-e is displayed.
  • STEP 2-e is an operation pattern in which, with the spindle 7 positioned at the ATC origin, the position of the magazine 31 is returned to normal, the Z axis is advanced to the ATC position, the Z axis is moved from the ATC position to the ATC preparation position, and then the Z axis is returned to the ATC origin.
  • the display areas 86B to 86D are the same as the display areas 81B to 81D of the axis return screen 81 shown in FIG. 23, and therefore the explanation thereof is omitted.
  • the position of the magazine 31 is shifted, so the magazine number is not displayed in the display area 86C. Also, since point M6 of the spindle 7 is outside the magazine rotation area, the magazine rotation area column of the display area 81C displays "ON.”
  • the display area 86A displays five steps necessary for STEP2-e. Steps 1 and 2 are the same as steps 1 and 2 of STEP2-d displayed in the display area 85A of the YZM axis recovery screen 85 shown in FIG. 32.
  • step 3 displayed in the display area 83A as shown in FIG. 36 is to execute automatic rotation correction of the magazine 31 by pressing the [Magazine normal rotation] key while pressing the [Release] key of the operation unit 27.
  • step 3 displayed in the display area 83A as shown in FIG. 37 is to manually move the grip arm 38 to which no tool is attached to the correct position by pressing the [Magazine normal rotation] key or the [Magazine reverse rotation] key while pressing the [Release] key of the operation unit 27.
  • step 4 is an operation of pressing the [Tool change single action] key on the operation unit 27.
  • the [Tool change single action] key As shown in Figure 35 (1), the Z axis of the spindle 7 moves from the ATC origin to the ATC position, and the Y axis moves to the Y-axis origin, and then the Z axis returns to the machine origin.
  • press the Next key 861 as step 5.
  • the Next key 861 is displayed in the lower right of the YZM-axis recovery screen 86.
  • the CPU 41 executes YZM axis recovery processing in accordance with the user's operations in steps 1 to 4 (S71).
  • the Z axis of the spindle 7 moves from the ATC origin to the ATC position, and the Y axis moves to the Y axis origin, after which the Z axis returns to the machine origin.
  • This allows the CPU 41 to safely and appropriately recover the spindle 7 that has stopped in the ATC area to the machining area along the tool exchange paths 52, 51.
  • the CPU 41 determines whether the recovery operation is complete (S72). Since the recovery operation is not complete until the user presses the Next key 861 (S72: NO), the CPU 41 returns to S72 and waits. If the Next key 861 is pressed, the recovery operation is complete (S72: YES), so the process returns to FIG. 13 and the CPU 41 displays the index tool confirmation screen 88, which will be described later, on the display unit 26 (S54).
  • the unrecoverable screen 87 has display areas 87A to 87D.
  • the recovery procedure of STEP 2-f is displayed in display area 87A.
  • STEP 2-f is a process of restricting the movement of the spindle 7 and ending the recovery operation.
  • the display areas 87B to 87D are the same as the display areas 81B to 81D of the shaft return screen 81 shown in Fig. 23, so a description thereof will be omitted.
  • a Next key 871 and a recovery operation valid key 872 are displayed at the bottom right of the unrecoverable screen 87.
  • An End key 873 is displayed at the bottom left of the unrecoverable screen 87.
  • Display area 87A warns that ATC recovery is not possible, that recovery must be performed in ATC maintenance mode, and that only trained, experienced personnel can operate ATC maintenance mode.
  • ATC maintenance mode the operation restrictions on the spindle 7 in the ATC area are lifted, allowing recovery work to be performed by experienced personnel.
  • step 1 press the recovery operation enable key 872 to disable the recovery operation.
  • step 2 press the [Reset] key on the operation unit 27.
  • step 3 press the end key 873.
  • the CPU 41 executes the recovery invalidation process in accordance with the user's operations in steps 1 to 3 (S74).
  • the recovery invalidation process invalidates the recovery operation.
  • the CPU 41 determines whether the recovery invalidation process has ended (S75). Since the recovery invalidation process is not complete until the user presses the end key 873 (S75: NO), the CPU 41 returns to S75 and waits. If the end key 873 has been pressed, the recovery invalidation process has ended (S75: YES), and the CPU 41 ends the ATC recovery process.
  • the indexed tool confirmation screen 88 has display areas 88A to 88D.
  • the recovery procedure for STEP 3 is displayed in the display area 88A.
  • STEP 3 is a process for confirming whether the tool has been removed from the grip arm 38 indexed to the tool transfer position.
  • the display areas 87B to 87D are the same as the display areas 81B to 81D of the axis return screen 81 shown in Fig. 23, so a description thereof will be omitted.
  • a next key 881 is displayed in the lower right of the indexed tool confirmation screen 88.
  • the display area 88A displays two procedures required for STEP 3. As procedure 1, if a tool is attached to the grip arm 38 of the magazine number, remove the tool. In addition, as a (notification), a warning is displayed that the machine or tool may be damaged if the next ATC operation is performed with a tool attached. As procedure 2, after confirming that no tool is attached to the grip arm 38, press the Next key 881.
  • the CPU 41 determines whether the user's confirmation is complete (S55). Since confirmation is not complete until the user presses the Next key 881 (S55: NO), the CPU 41 returns to S54 and waits. If the Next key 881 is pressed, the user's confirmation is complete (S55: YES), and the CPU 41 displays the end screen 89 on the display unit 26 (S56).
  • the end screen 89 has display areas 89A to 89D.
  • the recovery procedure of STEP 4 is displayed.
  • STEP 4 is a process for ending the ATC recovery process.
  • the display areas 89B to 89D are the same as the display areas 81B to 81D of the axis return screen 81 shown in Fig. 23, so a description thereof will be omitted.
  • a Next key 891 and a recovery operation valid key 892 are displayed at the bottom right of the end screen 89.
  • An End key 893 is displayed at the bottom left of the end screen 89.
  • the display area 89A indicates that ATC recovery has been completed, and further (notification) that the relationship between the tool allocation on the ATC tool screen (not shown) and the tools attached to the magazine 31 may be misaligned, and guidance is displayed to alert the user to check the tool allocation on the ATC tool screen.
  • the ATC tool screen is displayed on the display unit 26 by operating the operation panel 25.
  • the ATC tool screen displays the tool allocation, which is a table showing the types of tools assigned to each grip arm of the magazine 31. Below this, three steps required to end the ATC recovery process are displayed. As step 1, press the recovery operation enable key 892 to enable the recovery operation. As step 2, press the [Reset] key on the operation unit 27. As step 3, press the end key 893 after confirming the operations of steps 1 and 2.
  • the CPU 41 determines whether or not the user's confirmation has been completed (S57). Since the confirmation is not completed until the user presses the end key 893 (S57: NO), the CPU 41 returns to S56 and waits. If the end key 893 has been pressed, the user's confirmation has been completed (S57: YES), and the CPU 41 ends the ATC recovery process.
  • the grip arm 38 is an example of the "gripping section” of the present invention.
  • the magazine motor 33 is an example of the "rotation drive section” of the present invention.
  • the storage device 44 is an example of the "storage section” of the present invention.
  • the CPU 41 that executes the process of S47 in FIG. 13 is an example of the "coordinate detection section” and the "deviation determination section” of the present invention.
  • the CPU 41 that executes the process of S102 in FIG. 15 is an example of the "position detection section” of the present invention.
  • the CPU 41 that executes the process of S103 is an example of the "determination section" of the present invention.
  • the CPU 41 that executes the processes of S101, S104, S105, S107, and S109 is an example of the "correction request section" of the present invention.
  • the CPU 41 that executes the process of S62 in FIG. 14 is an example of the "coordinate detection section” and the "deviation determination section” of the present invention.
  • the CPU 41 that executes the process of S122 in FIG. 15 is an example of the "position detection section” of the present invention.
  • the CPU 41 that executes the process of S123 is an example of the "determination section” of the present invention.
  • the CPU 41 that executes the processes of S121, S124, S125, S127, and S129 is an example of the "correction request unit” of the present invention.
  • the CPU 41 is an example of the "control unit” of the present invention.
  • the storage device 44 is an example of the "storage unit” of the present invention.
  • the numerical control device 40 of this embodiment controls the operation of the machine tool 1.
  • the machine tool 1 is equipped with a magazine 31 that can rotate around the rotation axis 37A.
  • a plurality of grip arms 38 are provided along the circumferential direction on the outer periphery of the magazine 31.
  • the grip arms 38 can hold a tool 91 to be attached to the spindle 7 of the machine tool 1.
  • the CPU 41 of the numerical control device 40 rotates the magazine 31 to index an arbitrary grip arm 38.
  • the rotation position coordinates of the magazine 31 corresponding to the index position of the grip arm 38 are stored in the storage device 44 as reference coordinates indicating the reference position of the magazine 31.
  • the CPU 41 detects the rotation position coordinates of the magazine 31 and compares them with the reference position stored in the storage device 44 to determine whether there is a rotation deviation in the magazine 31.
  • the CPU 41 detects the position of the spindle 7 and determines whether the detected position is located within the magazine rotation area. In the above embodiment, if the spindle 7 is on the tool change path 51 but not in the ATC preparation position, it is determined to be inside the magazine rotation area, and if it is in the ATC preparation position, it is determined to be outside the magazine rotation area. Also, if the spindle 7 is on the tool change path 52 but not at the ATC origin, it is determined to be inside the magazine rotation area, and if it is at the ATC origin, it is determined to be outside the rotation area.
  • the CPU 41 determines that the position of the spindle 7 is within the magazine rotation area using this determination method, if the spindle 7 is on the tool change path 51, it moves the spindle 7 to the ATC preparation position, and if the spindle 7 is on the tool change path 52, it moves the spindle 7 to the ATC origin, thereby retracting the spindle 7 from the magazine rotation area.
  • the CPU 41 requests an operation or task to execute a rotation correction to return the magazine 31 to the reference position.
  • the operation to execute the rotation correction is an operation to cause the magazine motor 33 to execute the rotation correction.
  • the task to execute the rotation correction means an operation to cause the operator to execute the rotation correction.
  • the numerical control device 40 can avoid interference between the magazine 31 or the tool 91 held by the grip arm 38 and the spindle 7 or the tool 91 attached to the spindle 7, so that the rotation correction can be performed appropriately and the possibility of damage to the magazine 31, the spindle 7, and the tool 91 can be reduced.
  • the CPU 41 When the magnitude of the rotation deviation occurring in the magazine 31 is less than a threshold value, the CPU 41 generates a rotation correction command and instructs the magazine motor 33 to perform the rotation correction operation. If the magnitude of the rotation deviation is less than the threshold value, the rotation correction is performed automatically, so the numerical control device 40 can reduce the effort required compared to when the operator performs the rotation correction manually. In addition, even if the magnitude of the rotation deviation is small, the magazine 31 is appropriately returned to the reference position, so the possibility of damage to the magazine 31, the spindle 7, and the tool 91 can be further reduced. On the other hand, when the magnitude of the rotation deviation is equal to or greater than the threshold value, the magazine 31 must be rotated a long distance, so the magazine 31 must be rotated carefully to return to the reference position. In this case, the CPU 41 notifies the operator of the rotation correction operation by displaying it on the display unit 26, so the operator can rotate the magazine 31 carefully while checking the surroundings of the magazine 31.
  • the CPU 41 retracts the spindle 7 from within the magazine rotation area, it moves the spindle 7 along the tool change paths 51, 52.
  • the tool change paths 51, 52 are paths along which the spindle is moved when changing tools. This allows the CPU 41 to reduce the possibility that the spindle 7 or the tool 91 attached to the spindle 7 will interfere with other members.
  • the tool change path 51 is a predetermined path that extends in the Y-axis direction between the ATC preparation position and the ATC position.
  • the spindle 7 may be located within the magazine rotation area.
  • the CPU 41 can retract the spindle 7 from the magazine rotation area by retracting it along the tool change path 51 to the ATC preparation position. This allows the CPU 41 to safely perform rotation correction of the magazine 31.
  • the CPU 41 moves the spindle 7 back to the ATC origin. This allows the CPU 41 to safely perform rotation correction of the magazine 31.
  • the CPU 41 determines whether the magazine 31 is misaligned, and if it determines that the position of the stopped spindle 7 is within the magazine rotation area, it can move the spindle 7 out of the magazine rotation area and then return the magazine to the reference position.
  • the CPU 41 judges whether there is a rotational deviation of the magazine 31. If it is judged that there is a rotational deviation and that the position of the stopped spindle 7 is within the magazine rotation area, the spindle 7 is moved out of the magazine rotation area and then the magazine 31 is returned to the reference position, thereby allowing rotation correction to be performed safely.
  • the machine tool 1 is a horizontal machine tool, but may be a vertical machine tool in which the axial direction of the spindle extends vertically.
  • the machine tool 1 is equipped with a mechanism for moving the tool 91 attached to the spindle 7 relative to the workpiece in three axial directions, the X-axis, Y-axis, and Z-axis, but is not limited to three axes, and may be one or two axes, or three or more axes.
  • the machine tool 1 is structured to move the column 5 in the X-axis and Z-axis directions, and the spindle head 6 (spindle 7) in the Y-axis direction along the front surface 5B of the column 5, relative to the workpiece fixed on the rotary table 9 with a jig, thereby moving the workpiece and the tool in three axial directions, the X-axis, Y-axis, and Z-axis, but other structures are also possible.
  • the column 5 may be moved in the X-axis direction
  • the spindle head 6 (spindle 7) in the Z-axis direction
  • a support table (not shown) supporting the column 5 and spindle head 6 may be moved in the Y-axis direction.
  • the axis return is performed after the axis return determination process (S40 to S43), and then the recovery screens 82 to 86 corresponding to the stop position of the spindle 7 are displayed on the display unit 26 (S45 to S72) to safely and appropriately move the position of the spindle 7 that has been axis returned to the tool change path 51, 52 to the machining area along the tool change path 51, 52, but the process from S45 onwards may be omitted and only the axis return process may be performed.
  • the Y-axis of the spindle 7 moves directly to the machining area by returning the axes in S43.
  • the CPU 41 does not need to perform the process of restoring the spindle 7 to the machining area.
  • axis return is performed for all axes, but axis return may be performed sequentially while specifying the return destination for each movement axis.
  • the CPU 41 executes automatic turning correction of the magazine 31 (S105 to S107).
  • the CPU 41 may display a guidance on the operation of pressing the Next key 831 as step 4 after step 3 in the display area 82A of the YM-axis recovery screen 83 in Fig. 27 (S105).
  • the CPU 41 notifies the operator of the turning correction work (S108, S109), so that the operator can carefully turn the magazine 31 while checking the surroundings of the magazine 31.
  • each of the axis return screen 81, recovery screens 82 to 86, non-recoverable screen 87, index tool confirmation screen 88, and end screen 89, as well as the wording displayed in each display area, can be freely changed.
  • the spindle 7 located at point M4 on the tool change path 52 is temporarily retreated along the tool change path 52 to the ATC origin, and then the magazine 31 is returned to its normal position and the [Tool change single action] key is pressed to advance the spindle 7 to the ATC position Z axis.
  • the magazine 31 may be returned to its normal position and the spindle 7 may be advanced from point M4 along the tool change path 52 as is.
  • the spindle 7 instead of pressing the [Tool change single action] key, the spindle 7 may be advanced to the ATC position axis by pressing the [Release] key and then the [-Z] key.
  • the spindle 7 In the YZM-axis recovery process in FIG. 16, if the Z-axis of the spindle 7 reaches the ATC origin (S123: YES), the spindle 7 is deemed to have retreated behind the magazine rotation area, and the CPU 41 executes rotation correction of the magazine 31 (S124 to S127, S128 to S131). However, for example, the current machine coordinates of the spindle 7 may be detected, and the coordinate information of the magazine rotation area stored in the storage device 44 may be referenced to determine whether the current Z-axis of the spindle 7 is within the magazine rotation area. Similarly, in the YM-axis recovery process in FIG.
  • the coordinate information of the magazine rotation area stored in the storage device 44 may be referenced to determine whether the current Y-axis of the spindle 7 is within the magazine rotation area.
  • This embodiment is a numerical control device 40 provided in a machine tool 1, but it may also be, for example, a numerical control system 200 as shown in FIG. 43.
  • the numerical control system 200 comprises a numerical control device 201 and machine tools 1A, 1B, and 1C.
  • the CPU of the numerical control device 201 controls and manages the operation of each of the machine tools 1A, 1B, and 1C installed in, for example, a factory.
  • the CPU of the numerical control device 201 may constitute the "detection unit,” “determination unit,” “movement control unit,” “display control unit,” etc. of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Mechanical Engineering (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Automatic Tool Replacement In Machine Tools (AREA)
  • Automatic Control Of Machine Tools (AREA)
  • Numerical Control (AREA)

Abstract

マガジンの旋回補正を実行する際に主軸を適切な位置に退避できる数値制御装置、数値制御システム、制御方法、及びプログラムを提供する。 工具交換経路52上のM4点に主軸が停止した状態で、主軸の位置を加工領域に復旧させる為、CPUはマガジンに旋回ずれがあるか判定する。旋回ずれがあると判定した場合、CPUは主軸のZ軸を検出し、その検出した位置がATC原点Z軸に有るか判断する。ATC原点Z軸になければ、主軸はマガジン旋回領域内に位置する可能性がある。この場合、CPUは主軸をATC原点Z軸まで退避させてから、マガジンを基準位置に戻す旋回補正を実行させる動作又は作業を要求する。旋回補正が行われた後、CPUは主軸を工具交換経路52,51に沿って加工領域に向けて移動させる。

Description

数値制御装置、数値制御システム、制御方法、及びプログラム
 本発明は、数値制御装置、数値制御システム、制御方法、及びプログラムに関する。
 タレット式のマガジンを備える工作機械が知られている。マガジンは旋回軸を中心に旋回可能であり、その外周部には複数の把持部が周方向に沿って設けられる。把持部は工具を把持可能である。マガジンは旋回することで任意の把持部を割出位置に割出し可能である。主軸の工具交換時、工作機械は主軸を工具交換経路に沿って移動させ、工具交換経路上における工具交換位置と工具交換原点との間を往復移動させることで、主軸とマガジンの把持部との間で工具の受け渡しを行う。工具交換位置はマガジンの割出位置に対応し且つ主軸と把持部との間で工具を受け渡しする位置である。工具交換原点は、把持部が把持している工具と主軸とが干渉せずマガジンが旋回可能な位置である。
 工具交換時においてマガジンに旋回ずれが発生する場合がある。旋回ずれとは、マガジンが基準位置から周方向にずれる現象である。マガジンの基準位置は、把持部が割出位置に割出された状態のマガジンの旋回位置である。マガジンに旋回ずれが発生すると、その旋回ずれの大きさによっては主軸に対して把持部の位置が大きくずれるので、工具の受け渡しができない。そこで、例えばタレット(マガジン)の旋回ずれに応じて、タレットを基準位置に戻す旋回補正を行う必要があるか否かを判定し、旋回補正を行う必要があると判定された場合、旋回補正に関わる動作又は作業を要求する位置補正システムが知られている(例えば特許文献1参照)。
特許第6396380号公報
 しかしながら、上記の工作機械においてマガジンの旋回補正を実施する際に、主軸の位置がマガジンに近接している場合、マガジンの旋回時において、マガジンの機構や把持部に把持されている工具と、主軸や主軸に装着された工具とが干渉する可能性がある。
 本発明の目的は、マガジンの旋回補正を実行する際に主軸を適切な位置に退避できる数値制御装置、数値制御システム、制御方法、及びプログラムを提供することである。
 請求項1の数値制御装置は、工作機械の主軸に装着させる工具を把持可能な複数の把持部が周方向に沿って設けられ、旋回軸を中心に旋回可能なマガジンを旋回駆動して任意の前記把持部を割り出させる旋回駆動部と、前記把持部の割出位置に対応する前記マガジンの旋回位置座標を、前記マガジンの基準位置を示す基準座標として記憶する記憶部と、前記マガジンの旋回位置座標を検出する座標検出部と、前記座標検出部により検出された前記マガジンの旋回位置座標の、前記記憶部に記憶された前記基準座標に対する前記旋回軸の周方向のずれである旋回ずれがあるか判定するずれ判定部と、前記主軸の位置を検出する位置検出部と、前記位置検出部が検出した前記主軸の位置が、前記マガジンが旋回する領域であるマガジン旋回領域内に位置するか判断する判断部と、前記ずれ判定部により前記旋回ずれがあると判定され、前記判断部により前記主軸の位置が前記マガジン旋回領域内に位置すると判断された場合に、前記主軸を前記マガジン旋回領域から退避させた後、前記マガジンを前記基準位置に戻す旋回補正を実行させる動作又は作業を要求する補正要求部とを備えたことを特徴とする。数値制御装置は旋回ずれを生じているマガジンを基準位置に戻す際に、主軸の位置がマガジン旋回領域内と判断した場合は、主軸をマガジン旋回領域から退避させたのちにマガジンを基準位置に戻すことができる。これにより、数値制御装置は、マガジンや把持部に把持されている工具と、主軸や主軸に装着された工具との干渉を回避できるので、旋回補正を適切に行うと共にマガジンや主軸及び工具が破損する可能性を低減できる。
 請求項2の数値制御装置の前記補正要求部は、前記旋回ずれの大きさが閾値未満である場合に、前記旋回駆動部に対して、前記旋回補正の動作を指示し、前記旋回ずれの大きさが前記閾値以上である場合に、作業者に対して、前記旋回補正の作業を報知してもよい。旋回ずれの大きさが閾値未満であれば旋回補正が自動で行われるので、旋回補正を手動で行う場合に比べて手間を省略できる。他方、旋回ずれの大きさが閾値以上である場合は、数値制御装置は作業者に対して旋回補正の作業を報知するので、作業者はマガジンの周囲を確認しながらマガジンを慎重に旋回させることができる。
 請求項3の数値制御装置は、前記旋回ずれの大きさが閾値未満である場合に前記旋回補正が不要であると判定する一方、前記旋回ずれの大きさが前記閾値以上である場合に、前記旋回補正を行う必要があると判定する補正判定部を更に備え、前記補正要求部は、前記補正判定部により前記旋回補正を行う必要があると判定された場合に、前記旋回補正を実行させる動作又は作業を要求してもよい。旋回ずれの大きさが閾値未満の場合、そのまま主軸を移動させても、工具の受け渡しに対して影響が小さいことから旋回補正は不要とする。他方、旋回ずれの大きさが閾値以上である場合は、数値制御装置は作業者に対して旋回補正の作業を報知するので、作業者はマガジンの周囲を確認しながらマガジンを慎重に旋回させることができる。
 請求項4の数値制御装置の前記補正要求部は、前記主軸を、前記把持部との間で工具交換を行うときに前記主軸を移動させる経路である工具交換経路に沿って前記マガジン旋回領域から離れる方向に退避させた後、前記旋回補正を実行させる動作又は作業を要求してもよい。数値制御装置は主軸をマガジン旋回領域内から退避させる際、工具交換経路に沿って主軸を移動させることによって、主軸や主軸に装着された工具が他部材と干渉する可能性を低減できる。
 請求項5の数値制御装置の前記工具交換経路は、前記主軸が前記マガジンとの間で前記工具交換を行う工具交換位置と、前記工具交換位置から前記主軸の軸方向に直交する方向に離間する位置であって前記軸方向において前記工具交換位置と同一位置である工具交換準備位置とを結ぶ所定経路を含み、前記補正要求部は、前記主軸が前記所定経路で且つ前記マガジン旋回領域内に位置する場合に、前記主軸を前記所定経路に沿って前記工具交換準備位置に退避させた後、前記旋回補正を実行させる動作又は作業を要求してもよい。停止状態の主軸が工具交換経路中の所定経路で且つマガジン旋回領域内に位置する場合、数値制御装置は、所定経路に沿って工具交換準備位置まで退避することで、マガジンの旋回補正を安全に行うことができる。
 請求項6の数値制御装置において、前記工作機械は、前記工具交換経路上の工具交換位置と、前記工具交換位置から前記主軸の軸方向において離間する原点位置とに前記主軸を往復移動させることによって、前記マガジンとの間で前記主軸の前記工具交換を行うものであって、前記補正要求部は、前記主軸が前記工具交換位置と前記原点位置との間で且つ前記マガジン旋回領域内に位置する場合に、前記主軸を前記原点位置に退避させた後、前記旋回補正を実行させ動作又は作業を要求してもよい。停止状態の主軸が工具交換位置と原点位置との間で且つマガジン旋回領域内に位置する場合、数値制御装置は主軸を原点位置に退避することで、マガジンの旋回補正を安全に行うことができる。
 請求項7の数値制御装置の前記ずれ判定部は、前記工具交換が途中で停止した場合に、前記旋回ずれがあるか判定してもよい。例えばアラーム等が発生し、工具交換が途中で停止した場合、主軸は停止した状態である。この場合、数値制御装置はマガジンの旋回ずれを判定し、停止した主軸の位置がマガジン旋回領域内と判断した場合は、主軸をマガジン旋回領域から退避させたのちにマガジンを基準位置に戻すことができる。
 請求項8の数値制御装置の前記ずれ判定部は、前記工具交換の途中で前記工作機械の電源がオフされた後、前記電源がオンされた場合に、前記旋回ずれがあるか判定してもよい。工具交換の途中で工作機械の電源がオフされた後、電源がオンされた場合、主軸は停止した状態である。この場合、数値制御装置はマガジンの旋回ずれを判定し、停止した主軸の位置がマガジン旋回領域内と判断した場合は、主軸をマガジン旋回領域から退避させたのちにマガジンを基準位置に戻すことができる。
 請求項9の数値制御装置において、前記主軸の軸方向は水平方向であってもよい。本態様の数値制御装置は主軸が水平方向に延びる横形の工作機械に適用できる。
 請求項10の数値制御システムは、工作機械と数値制御装置を備える数値制御システムであって、前記数値制御装置は、前記工作機械の主軸に装着させる工具を把持可能な複数の把持部が周方向に沿って設けられ、旋回軸を中心に旋回可能なマガジンを旋回駆動して任意の前記把持部を割り出させる旋回駆動部と、前記把持部の割出位置に対応する前記マガジンの旋回位置座標を、前記マガジンの基準位置を示す基準座標として記憶する記憶部と、前記マガジンの旋回位置座標を検出する座標検出部と、前記座標検出部により検出された前記マガジンの旋回位置座標の、前記記憶部に記憶された前記基準座標に対する前記旋回軸の周方向のずれである旋回ずれがあるか判定するずれ判定部と、前記主軸の位置を検出する位置検出部と、前記位置検出部が検出した前記主軸の位置が、前記マガジンが旋回する領域であるマガジン旋回領域内に位置するか判断する判断部と、前記ずれ判定部により前記旋回ずれがあると判定され、前記判断部により前記主軸の位置が前記マガジン旋回領域内に位置すると判断された場合に、前記主軸を前記マガジン旋回領域から退避させた後、前記マガジンを前記基準位置に戻す旋回補正を実行させる動作又は作業を要求する補正要求部とを備えたことを特徴とする。これにより、数値制御システムは請求項1と同様の効果を得ることができる。なお、数値制御装置は工作機械の動作を制御するものであるが、複数の工作機械の動作を制御するものであってもよい。
 請求項11の制御方法は、工作機械の動作を制御する数値制御装置の制御方法において、前記工作機械の主軸に装着させる工具を把持可能な複数の把持部が周方向に沿って設けられ、旋回軸を中心に旋回するマガジンを旋回駆動して任意の前記把持部を割り出させる旋回駆動工程と、前記マガジンの旋回位置座標を検出する座標検出工程と、前記座標検出工程で検出された前記マガジンの旋回位置座標の、前記把持部の割出位置に対応する前記マガジンの旋回位置座標を、前記マガジンの基準位置を示す基準座標として記憶する記憶部に記憶された前記基準座標に対する前記旋回軸の周方向のずれである旋回ずれがあるか判定するずれ判定工程と、前記主軸の位置を検出する位置検出工程と、前記位置検出工程で検出した前記主軸の位置が、前記マガジンが旋回する領域であるマガジン旋回領域内に位置するか判断する判断工程と、前記ずれ判定工程で前記旋回ずれがあると判定され、前記判断工程で前記主軸の位置が前記マガジン旋回領域内に位置すると判断された場合に、前記主軸を前記マガジン旋回領域から退避させた後、前記マガジンを前記基準位置に戻す旋回補正を実行させる動作又は作業を要求する補正要求工程とを備えたことを特徴とする。数値制御装置は各工程を行うことで請求項1に記載の効果を得ることができる。
 請求項12のプログラムは、工作機械の動作を制御する数値制御装置を機能させるプログラムにおいて、コンピュータに、前記工作機械の主軸に装着させる工具を把持可能な複数の把持部が周方向に沿って設けられ、旋回軸を中心に旋回するマガジンを旋回駆動して任意の前記把持部を割り出させる旋回駆動処理と、前記マガジンの旋回位置座標を検出する座標検出処理と、前記座標検出処理で検出された前記マガジンの旋回位置座標の、前記把持部の割出位置に対応する前記マガジンの旋回位置座標を、前記マガジンの基準位置を示す基準座標として記憶する記憶部に記憶された前記基準座標に対する前記旋回軸の周方向のずれである旋回ずれがあるか判定するずれ判定処理と、前記主軸の位置を検出する位置検出処理と、前記位置検出処理で検出した前記主軸の位置が、前記マガジンが旋回する領域であるマガジン旋回領域内に位置するか判断する判断処理と、前記ずれ判定処理で前記旋回ずれがあると判定され、前記判断処理で前記主軸の位置が前記マガジン旋回領域内に位置すると判断された場合に、前記主軸を前記マガジン旋回領域から退避させた後、前記マガジンを前記基準位置に戻す旋回補正を実行させる動作又は作業を要求する補正要求処理とを実行させることを特徴とする。数値制御装置のコンピュータは各処理を実行することで、数値制御装置は請求項1に記載の効果を得ることができる。
 請求項13の数値制御装置は、制御部と、プログラムを記憶する記憶部とを備え、前記制御部は、前記プログラムを実行して、請求項11に記載の制御方法を実現することを特徴とする。これにより、数値制御装置は請求項11に記載の効果を得ることができる。
 上記プログラムが記憶されたコンピュータによって読取可能な記憶媒体も新規で有用である。
工作機械1の斜視図である。 工作機械1(シャッタ103:閉)の斜視図である。 工作機械1(シャッタ:開)の斜視図である。 工作機械1(マガジンカバー省略)の斜視図である。 工作機械1(マガジンカバー省略)の右側面図である。 加工領域、ATC領域、各基準点を示す図である。 マガジン旋回領域のイメージ図である。 工作機械1の電気的構成を示すブロック図である。 NC制御処理のフローチャートである。 電源ON時処理のフローチャートである。 アラーム検出時処理のフローチャートである。 アプリ制御処理のフローチャートである。 ATC復旧処理のフローチャートである。 図13の続きを示すフローチャートである。 YM軸復旧処理のフローチャートである。 YZM軸復旧処理のフローチャートである。 軸戻し先判定処理のフローチャートである。 復旧領域W1を示す図である。 復旧領域W2を示す図である。 復旧領域W3を示す図である。 復旧領域W4,W5を示す図である。 復旧領域W6を示す図である。 軸戻し画面81を示す図である。 M1点からの移動経路(1)とマガジンの位置(2)を示すイメージ図である。 Y軸復旧画面82を示す図である。 M2点からの移動経路(1)とマガジンの位置(2)を示すイメージ図である。 YM軸復旧画面83(旋回ずれが閾値未満のとき)を示す図である。 YM軸復旧画面83(旋回ずれが閾値以上のとき)を示す図である。 M3点からの移動経路(1)とマガジンの位置(2)を示すイメージ図である。 YZ軸復旧画面84を示す図である。 M4点からの移動経路(1)とマガジンの位置(2)を示すイメージ図である。 YZM軸復旧画面85(旋回ずれが閾値未満のとき)を示す図である。 YZM軸復旧画面85(旋回ずれが閾値以上のとき)を示す図である。 ATC原点からの移動経路(1)とマガジンの位置(2)を示すイメージ図である。 M6点からの移動経路(1)とマガジンの位置(2)を示すイメージ図である。 YZM軸復旧画面86(旋回ずれが閾値未満のとき)を示す図である。 YZM軸復旧画面86(旋回ずれが閾値以上のとき)を示す図である。 M7点の位置を示すイメージ図である。 復旧不可画面87を示す図である。 割出工具確認画面88を示す図である。 終了画面89を示す図である。 YM軸復旧処理(変形例)のフローチャートである。 数値制御システム200(変形例)の構成を示す図である。
 本発明の一実施形態を説明する。以下説明は図中に矢印で示す左右、上下、前後を使用する。工作機械1の左右方向、上下方向、前後方向は夫々工作機械1のX軸方向、Y軸方向、Z軸方向である。図1に示す工作機械1は、主軸7が前後方向(Z軸方向)に延びる横形マシニングセンタである。本実施形態に記載する「ATC」とは「Automatic Tool Changer」の略称である。また、本実施形態に記載する「NC」とは「Numerical Control」の略称である。
 図1~図4を参照し、工作機械1の構造を説明する。図1,図2に示すように、工作機械1はベース2、コラム5、主軸ヘッド6、主軸7、制御箱8、回転テーブル9、X軸移動機構11、Z軸移動機構12、Y軸移動機構13、工具交換装置30(図4参照、以下「ATC装置30」と呼ぶ)、マガジンカバー10等を備える。ベース2はZ軸方向に長い平面視略矩形状の鉄製土台である。X軸移動機構11はベース2の上面後部に設け、キャリッジ15をX軸モータ62(図8参照)の動力でX軸方向に移動可能に支持する。Z軸移動機構12はキャリッジ15の上面に設け、コラム5をZ軸方向にZ軸モータ64(図8参照)の動力で移動可能に支持する。コラム5は上下方向に延びる立柱である。Y軸移動機構13はコラム5の前面5Bに設けられ、主軸ヘッド6をコラム5の前面5Bに沿ってY軸方向にY軸モータ63(図8参照)の動力で移動可能に支持する。これにより、主軸ヘッド6はX軸、Y軸、Z軸の3軸方向に移動可能である。主軸ヘッド6はZ軸方向に延びる。主軸7は主軸ヘッド6内に設けられ、主軸ヘッド6と同軸上にZ軸方向に延びる。主軸ヘッド6は主軸7を前方に備え且つ回転可能に支持する。主軸ヘッド6は主軸モータ61(図8参照)を備える。主軸モータ61の出力軸(図示略)は、カップリング(図示略)を介して主軸7と同軸上に連結される。主軸7の先端部には、工具91を保持する工具ホルダ90が装着される(図7参照)。なお、以下説明の中で、説明の便宜上、「主軸7の先端部に工具91が装着される」と表現する箇所があるが意味は同じである。
 図4に示すように、ベース2の後部には、一対の支持部材17,18が設けられる。支持部材17,18は左右方向に互いに離間し且つベース2の後部から上方に延び、制御箱8を下方から支持する。制御箱8は内部に数値制御装置40(図8参照)を収納する。数値制御装置40は工作機械1の動作を制御する。ベース2の上面の前側には固定台16が設けられる。回転テーブル9は固定台16上に設置され、主軸ヘッド6の前方に配置される。回転テーブル9の上面にはワーク(図示略)が治具(図示略)で固定される。回転テーブル9はY軸に平行な回転軸を中心に360°回転及び位置決め可能である。回転テーブル9上に固定されたワークに対し、工作機械1は主軸7に装着された工具91をX軸、Y軸、Z軸の3軸方向から接触させることでワークの切削加工を行う。
 ベース2の上面前側で且つ左右両側には、一対の支持柱21,22が設けられる。支持柱21はベース2上面の右側から上方に延び且つ上部が左方に略90°屈曲する。支持柱22はベース2上面左側から上方に延び且つ上部が右方に略90°屈曲する。支持柱21と22の互いに対向する夫々の上部の間には連結板23が固定される。
 ATC装置30は連結板23の前面に固定され、主軸ヘッド6の上方に支持される。ATC装置30は、マガジン31、減速機32、マガジンモータ33等を備える。マガジン31は、マガジンベース37と複数のグリップアーム38を備える。マガジンベース37は略円盤状であり、旋回軸37A(図5参照)を中心に連結板23の前面に旋回可能に支持される。旋回軸37Aは、Z軸方向に対して前側に向けてやや下り傾斜する。減速機32とマガジンモータ33は、マガジンベース37に取り付けられる。マガジンモータ33の出力軸(図示略)は、減速機32を介して旋回軸37Aと接続する。これにより、マガジンモータ33の動力は減速機32を介してマガジンベース37の旋回軸37Aに伝達される。複数のグリップアーム38はマガジンベース37の外周部に沿って並び、径方向外側に向けて放射状に延びる。グリップアーム38の先端部は、工具ホルダ90を水平に寝かせた姿勢で、工具ホルダ90に直交する方向から工具ホルダ90を把持する。マガジン31の最下部の位置は、工具受渡位置(本発明の「割出し位置」の一例)である。工具受渡位置に割出されたグリップアーム38は、主軸7との間で工具の受け渡しを行う。
 マガジンカバー10は、支持柱21,22の夫々の上部の前面に固定される。マガジンカバー10は箱状でありマガジン31の周囲を覆う。マガジンカバー10は切粉と切削液の飛沫がマガジン31に付着するのを低減する。マガジンカバー10の底壁101には矩形状の開口102が設けられる。開口102はマガジン31の工具受渡位置の直下に位置する。開口102にはマガジンシャッタ103(以下「シャッタ103」と呼ぶ)が設けられる。シャッタ103は制御盤のCPU41の制御により開口102を開閉する。
 上記の工作機械1にはカバー(図示略)が取り付けられる。カバーは工作機械1の周囲を取り囲み、切削加工中に生じる切粉やクーラントの飛沫が周囲に飛散するのを防止する。カバーの正面にはワークの出し入れ等を行う為の開口(図示略)と、その開口を開閉する為の扉(図示略)が設けられる。開口の隣には、操作パネル25(図8参照)が設けられる。ユーザは操作パネル25で工作機械1の各種入力と操作を行う。
 図5に示すように、工作機械1には、加工領域と工具交換領域(以下「ATC領域」と呼ぶ)がY軸方向に並んで設けられる。加工領域はY軸原点よりもベース2側(下側)の空間に設けられる。Y軸原点はY軸の機械座標が0の位置(Y=0mm)である。加工領域は回転テーブル9上面に固定されたワークの加工を行う領域である。ATC領域はY軸原点に対して加工領域とは反対側(上側)の空間であって、Z軸方向にて加工領域と重なる位置に設けられる。ATC領域はATC装置30により主軸7の工具交換を行う領域である。工作機械1は主軸ヘッド6を上下動させることで、主軸7を加工領域とATC領域の夫々に移動できる。
 図6,図7を参照し、機械原点、及びATC領域に設定される複数の基準点について説明する。なお、図7において、主軸7の向きを示す為に、主軸ヘッド6を省略して、主軸7、工具ホルダ90、工具91を簡略化して図示している。工作機械1の機械原点は、X軸とY軸の夫々の機械座標が0の位置で且つZ軸の機械座標が加工領域の後端位置であり、工作機械1の構造に応じて決まる。X軸の機械原点はX軸原点(X=0mm)、Y軸の機械原点はY軸原点(Y=0mm)、Z軸の機械原点はZ軸原点(Z=後端位置)である。なお、機械原点は工作機械1の構造によって位置が変わるので、その機械原点を基準に設定される加工領域とATC領域の大きさも工作機械1の構造によって変わる。
 ATC領域には、工具交換位置(以下「ATC位置」と呼ぶ)、ATC原点、ATC準備位置が設定される。これらATC位置、ATC原点、ATC準備位置は、工具交換動作(以下「ATC動作」と呼ぶ)を行うときに、主軸7を移動して位置決めする基準点である。ATC位置は、マガジン31の工具受渡位置に割出されたグリップアーム38との間で工具を受け渡しする位置である。ATC原点は、ATC位置からZ軸+方向(後方)に移動した位置であり、ATC領域の後端の位置である。ATC原点は、グリップアーム38が把持する工具と主軸7が干渉せずにマガジン31が旋回可能な位置である。ATC準備位置は、ATC位置からY軸-方向(下方)に移動した位置であり、加工領域とATC領域の境界の位置である。ATC準備位置は、ATC位置とZ軸方向において同一座標の位置である。
 上記3つの基準点に基づき、ATC領域には、工具交換経路51,52が設定される。工具交換経路51,52は逆L字状の経路を形成する。工具交換経路51は、ATC準備位置からATC位置までY軸+方向に(上方)に延びる経路である。工具交換経路52は、ATC位置からATC原点までZ軸+方向(後方)に延びる経路である。工具交換経路51,52は、ATC動作時に主軸ヘッド6を移動させる経路である。本実施形態では原則、ATC領域において、主軸7は工具交換経路51,52上のみ移動でき、それ以外は移動できないように動作制限がかけられている。
 図7に示すように、ATC位置の周囲には、マガジン旋回領域が設定される。マガジン旋回領域は、マガジン31のグリップアーム38が旋回軸37Aを中心に旋回する領域である。なお、マガジン旋回領域は、グリップアーム38に把持される工具ホルダ90及び工具91を含めた領域であってもよい。Z軸方向において、マガジン旋回領域の後端の座標位置は、ATC位置とATC原点の間に位置する。Y軸方向において、マガジン旋回領域の下端の座標位置は、ATC位置とATC準備位置の間に位置する。主軸7の少なくとも一部がマガジン旋回領域内に位置する場合、主軸7はグリップアーム38、工具ホルダ90、及び工具91と干渉する可能性が高い。なお、本実施形態では、工具交換経路52上において主軸7のZ軸をATC原点まで後退させれば、主軸7はマガジン旋回領域から外れるようになっている。また、工具交換経路51上において主軸7のY軸をATC準備位置まで下降させれば、主軸7はマガジン旋回領域から外れるようになっている。
 図6を参照し、工作機械1のATC動作の一例を説明する。本実施形態はATC動作中における主軸7の位置を説明する為、主軸ヘッド6の移動を「主軸7の移動」と表現して説明する。また、以下説明において、X軸におけるATC位置をATC位置X軸、Y軸におけるATC位置をATC位置Y軸、Z軸におけるATC位置をATC位置Z軸と呼ぶ。
 ワーク加工中、主軸7は例えば加工領域内のP0に位置する。このとき、マガジンカバー10のシャッタ103は閉じた状態である(図2参照)。主軸7には、工具91を保持する工具ホルダ90が装着されている(図7参照)。主軸7内に設けられたクランプ機構(図示略)は、主軸7に装着された工具ホルダ90を固定する。
 工作機械1は、P0に位置する主軸7のZ軸をZ軸原点に向けて後退しつつ(図6中の矢印A1参照)、主軸7のオリエント動作を行う。なお、オリエント動作とは、主軸7の角度を基準位置(例えば0度)に戻す動作である。主軸7はP1に到達する。次いで、マガジンカバー100のシャッタ103を開き(図3参照)、P1に位置する主軸7のX軸をATC位置X軸まで移動しつつY軸をY軸原点(Y=0mm)まで移動する(図6中の矢印A2参照)。主軸7はP2に到達する。次いで、P2に位置する主軸7のZ軸をATC位置Z軸まで前進する(図6中の矢印A3参照)。主軸7はATC準備位置に到達する。
 次いで、主軸7をATC準備位置から工具交換経路51に沿って上昇させる(図6中の矢印A4参照)。このとき、マガジンカバー100の開口102を介して、工具受渡位置に割出されたグリップアーム38が下方に向けて露出する。主軸7の上昇により、主軸7に装着された工具ホルダ90は開口102を通過し、グリップアーム38に対して下方から押し込まれる。主軸7がATC位置に到達すると、主軸7に装着された工具ホルダ90がグリップアーム38に係合して把持される。これと同時に、主軸7内のクランプ機構は工具ホルダ90の固定を解除する。これで、工具ホルダ90は主軸7から取り外し可能となる。
 工作機械1は、グリップアーム38が主軸7に装着する工具ホルダ90を挟持した状態で、主軸7をATC位置から工具交換経路52に沿って後退させる(図6中の矢印A5参照)。主軸7がATC原点に到達すると、主軸7から工具ホルダ90が抜ける。次いで、ATC装置30はマガジン31を旋回し、次に装着する工具(以下「次工具」と呼ぶ)の工具ホルダを保持するグリップアーム38を工具受渡位置に割り出す(図6中の旋回する矢印A6参照)。これにより、次工具の工具ホルダはZ軸方向において主軸7の前方に配置される。
 次いで、工作機械1は、主軸7をATC原点から工具交換経路52に沿って前進させる(図6中の矢印A7参照)。これにより、次工具の工具ホルダが主軸7に挿入される。ATC位置に到達すると同時に、次工具の工具ホルダが主軸7に装着される。主軸7内のクランプ機構は主軸7に装着された工具ホルダを固定する。
 次いで、工作機械1は、次工具の工具ホルダが装着された主軸7をATC位置から工具交換経路51に沿って下降させ、ATC準備位置に位置決めする(図6中の矢印A8参照)。これで主軸7のATC動作が完了する。工作機械1はワーク加工を引き続き行う為、次工具の工具ホルダが装着された主軸7をATC準備位置から加工領域内の次の指令点に向けて移動させる。指令点とは、ATC動作完了後に主軸7を移動させる目標位置であり、例えばNCプログラムの制御コマンドで設定してもよい。
 なお、上記の例では、P0に位置する主軸7のZ軸をZ軸原点まで後退させたが、例えば主軸7に装着された工具91が回転テーブル9上のワーク及び治具に接触しないR点(復帰点)を設定し、そのR点まで後退させてもよい。この場合、R点はZ軸原点よりも前方に位置してもよい。
 図8を参照し、工作機械1の電気的構成について説明する。工作機械1は、数値制御装置40、主軸モータ61、X軸モータ62、Y軸モータ63、Z軸モータ64、マガジンモータ33、駆動回路71~75、エンコーダ61A,62A,63A,64A,33A、操作パネル25等を備える。
 数値制御装置40はCPU41、ROM42、RAM43、記憶装置44、通信I/F45、入出力インターフェイス46等を備える。CPU41は工作機械1の動作を統括制御する。ROM42は、NC制御プログラム、電源ON時プログラム、アラーム検出時プログラム、アプリ制御プログラム等の各種プログラム等を記憶する。NC制御プログラムは、後述のNC制御処理(図9参照)を実行するものである。電源ON時プログラムは、後述の電源ON時処理(図10参照)を実行するものである。アラーム検出時プログラムは、後述のアラーム検出時処理(図11参照)を実行するものである。アプリ制御プログラムは、後述のアプリ制御処理(図12参照)を実行するものである。なお、これらプログラムは、ROM42以外の他の記憶媒体に記憶してもよく、例えば記憶装置44に記憶してもよい。RAM43は各種処理実行中の各種データを記憶する。記憶装置44は不揮発性メモリであり、例えばワークを加工する為のNCプログラム、後述の停止フラグ等の各種データを記憶する。通信I/F45は、有線又は無線で端末(図示略)と接続可能である。入出力インターフェイス46は操作パネル25と駆動回路71~75と接続する。
 記憶装置44には、グリップアーム38の割出位置を示す番号(以下、割出番号)と、割出位置に対応する座標(以下、旋回位置座標と呼ぶ)が対応付けて記憶される。この割出位置及び旋回位置座標を参照することで、CPU41は任意の工具91を保持する工具ホルダ90を把持するグリップアーム38を割り出すことができる。
 主軸モータ61、X軸モータ62、Y軸モータ63、Z軸モータ64、マガジンモータ33はサーボモータである。駆動回路71はCPU41からの制御信号に基づき主軸モータ61を制御する。駆動回路72はCPU41からの制御信号に基づきX軸モータ62を制御する。駆動回路73はCPU41からの制御信号に基づきY軸モータ63を制御する。駆動回路74はCPU41からの制御信号に基づきZ軸モータ64を制御する。駆動回路75はCPU41からの制御信号に基づきマガジンモータ33を制御する。
 エンコーダ61Aは主軸モータ61の回転位置を検出し、該検出信号を駆動回路71に送信する。駆動回路71は検出信号に基づき主軸モータ61のフィードバック制御を行う。CPU41は駆動回路71からエンコーダ61Aの検出信号を受信し、受信した検出信号を主軸7の回転座標に変換することで、主軸の回転位置を検出する。エンコーダ62AはX軸モータ62の回転位置を検出し、該検出信号を駆動回路72に送信する。駆動回路72は検出信号に基づきX軸モータ62のフィードバック制御を行う。CPU41は駆動回路72からエンコーダ62Aの検出信号を受信し、受信した検出信号を主軸7のX軸の座標位置に変換することで、X軸の位置を検出する。エンコーダ63AはY軸モータ63の回転位置を検出し、該検出信号を駆動回路73に送信する。駆動回路73は検出信号に基づきY軸モータ63のフィードバック制御を行う。CPU41は駆動回路73からエンコーダ63Aの検出信号を受信し、受信した検出信号を主軸7のY軸の座標位置に変換することで、Y軸の位置を検出する。エンコーダ64AはZ軸モータ64の回転位置を検出し、該検出信号を駆動回路74に送信する。駆動回路74は検出信号に基づきZ軸モータ64のフィードバック制御を行う。CPU41は駆動回路74からエンコーダ64Aの検出信号を受信し、受信した検出信号を主軸7のZ軸の座標位置に変換することで、Z軸の位置を検出する。エンコーダ33Aはマガジンモータ33の回転位置を検出し、該検出信号を駆動回路75に送信する。駆動回路75は検出信号に基づきマガジンモータ33のフィードバック制御を行う。CPU41は駆動回路75から受信したエンコーダ33Aの検出信号をマガジン31の旋回位置座標に変換することで、マガジン31の旋回位置を検出する。操作パネル25は表示部26と操作部27を備える。表示部26はタッチパネルであり、CPU41からの制御信号に基づき各種情報を表示すると共に各種入力を受け付けてCPU41に送信する。操作部27は例えば物理的な押下キー(図示略)を複数備え、各種操作を受け付けてCPU41に送信する。
 図9を参照し、NC制御処理について説明する。ユーザが操作パネル25によりNCプログラムを選択すると、CPU41はROM42からNC制御プログラムを読み出して本処理を実行する。CPU41は選択されたNCプログラムを記憶装置44から読み出す(S1)。CPU41は操作部27にてユーザによるNCプログラム実行の操作を受け付け、読み出したNCプログラムを実行するか否か判断する(S2)。実行の操作を受け付けるまで(S2:NO)、CPU41はS2に戻って待機する。実行の操作を受け付けた場合(S2:YES)、CPU41は記憶装置44に記憶された停止フラグを0に初期化してオフし(S3)、NCプログラムを先頭から1ブロック解釈する(S4)。
 CPU41は解釈したブロックが終了コマンドか否か判断する(S5)。終了コマンドでない場合(S5:NO)、CPU41は解釈したブロックに基づき制御指令(内部指令)を生成する(S6)。CPU41は生成した制御指令が工具交換指令か否か判断する(S7)。生成した制御指令が位置決め等の制御指令であった場合(S7:NO)、CPU41は生成した制御指令を実行する(S8)。制御指令実行後、CPU41は次ブロックに移行し、S4に戻って上記処理を繰り返す。
 生成した制御指令が工具交換指令の場合(S7:YES)、CPU41は上記のATC動作を開始する(S9)。CPU41はATC動作中に電源がオフされたか否か判断する(S10)。ATC動作中に電源がオフされた場合(S10:YES)、CPU41は記憶装置44に記憶された停止フラグを1に設定してオンし(S12)、本処理を終了する。ATC動作中に電源がオフされない場合(S10:NO)、CPU41はATC動作が終了したか否か判断する(S11)。ATC動作が終了するまで(S11:NO)、CPU41はS10に戻って電源の監視を継続する。ATC動作が終了した場合(S11:YES)、CPU41は次ブロックに移行しS4に戻って上記処理を繰り返す。解釈したブロックが終了コマンドの場合(S5:YES)、CPU41は本処理を終了する。
 図10を参照し、電源ON時処理について説明する。ユーザが操作パネル25で電源をオンすると、CPU41はROM42から電源ON時プログラムを読み出して本処理を実行する。CPU41は前回の電源オン時においてATC動作中に電源がオフされたか否か判断する(S21)。CPU41は記憶装置44に記憶された停止フラグを参照する。停止フラグが0の場合、ATC動作中に電源はオフされていないので(S21:NO)、CPU41は手動運転モードに切り替え(S23)、操作パネル25の表示部26に手動条件画面(図示略)を表示する(S4)。手動条件画面では、主軸7の移動と回転を手動操作で行うときの各種条件を設定できる。例えば、高速移動速度、高速回転速度、定速移動速度、低速回転速度、ステップ移動量、ステップ回転量、主軸回転数等である。CPU41は本処理を終了する。
 停止フラグが1の場合、ATC動作中に電源がオフされている(S21:NO)。この場合、ATC動作中に各種サーボモータがオフされているので、主軸7がATC領域内で停止した状態である。サーボモータがオフされた状態で主軸7に外力がかかった場合、主軸7の位置が工具交換経路51,52からX軸方向、Y軸方向、又はZ軸方向にずれる可能性がある。また、マガジン31の旋回位置が周方向にずれる可能性もある。このような異常が発生した状態で主軸7を動かそうとすると、主軸7とグリップアーム38との位置関係がずれているので、例えば主軸7に装着された工具ホルダ90がグリップアーム38と係合せず、主軸7内のクランプ機構が工具ホルダ90の固定を解除してしまうことで、主軸7から工具ホルダ90と工具91が落下する可能性がある。
 そのような理由から、ユーザは手動操作で主軸7の位置を工具交換経路51,52に復旧させ、マガジン31の位置を正常な位置に戻す必要があるが、熟練した技術が無ければその復旧操作は難しい。本実施形態のCPU41は後述のATC復旧処理(図13~図17参照)を実行することで(S22)、ユーザに対して復旧操作のガイダンス表示を行う。ATC復旧処理の完了後、CPU41は本処理を終了する。
 図11を参照し、アラーム検出時処理について説明する。工作機械1の起動中に、非常停止等のアラームが発生した場合、CPU41はROM42からアラーム検出時プログラムを読み出して本処理を実行する。CPU41はアラームを表示部26に表示し(S31)、ユーザにアラームが発生したことを報知する。CPU41はATC動作中に主軸7の移動が停止したか否か判断する(S32)。ATC動作中に主軸7の移動が停止していない場合(S32:NO)、CPU41は本処理を終了する。ATC動作中に主軸7の移動が停止した場合(S32:YES)、CPU41は後述のATC復旧処理を実行し(S33)、本処理を終了する。
 図12を参照し、アプリ制御処理について説明する。ユーザが操作パネル25の操作部27により復旧支援のアプリを選択すると、CPU41はROM42からアプリ制御プログラムを読み出して本処理を実行する。CPU41は表示部26にメニューを表示する(S35)。メニューには、例えば、同期タップ戻し、主軸慣らし運転、自動扉調整、位置復旧、原点位置調整、ATC復旧等の各種項目が含まれる。CPU41はメニューから項目の選択を受け付ける(S36)。CPU41はATC復旧の項目が選択されたか否か判断する(S37)。ATC復旧の項目が選択された場合(S37:YES)、CPU41は後述のATC復旧処理を実行し(S38)、本処理を終了する。ATC復旧以外の項目が選択された場合(S37:NO)、CPU41はその選択された項目を実行し(S39)、本処理を終了する。
 図13~図17を参照し、ATC復旧処理について説明する。なお、本実施形態において、グリップアーム38は工具91を一体的に取り付けた工具ホルダ90を把持するが、説明の便宜上、「グリップアーム38が工具91を把持する」と表現する箇所がある。図13に示すように、CPU41は軸戻し画面81を表示部26に表示する(S40)。
<STEP1>
図23に示すように、軸戻し画面81には、表示領域81A~81Dが設けられる。表示領域81Aには、STEP1の復旧手順が表示される。STEP1は軸戻しの工程である。軸戻しとは、ATC領域内に停止した主軸7を工具交換経路51,52上に戻す動作である。表示領域81Bには、機械座標位置、ATC位置、Y軸原点、ATC原点位置等の座標情報が表示される。機械座標位置は、主軸7の現在の位置情報である。表示領域81Cには、マガジン番号、マガジンシャッタ位置、マガジン旋回領域が表示される。マガジン番号の欄には、マガジン31の工具受渡位置に現在割出されているグリップアーム38に対応するマガジン番号が表示される。マガジンシャッタ位置の欄には、シャッタ103の開閉状態が表示される。マガジン旋回領域の欄には、主軸7の位置がマガジン旋回領域内にある場合はオフ、マガジン旋回領域外にある場合はオンが表示される。表示領域81Dには手動条件が表示される。手動条件とは、上記の手動条件画面に表示される手動条件の項目と同じである。
 表示領域81Aには、軸戻しに必要な4つの手順が表示される。先ず、手順1として、手動運転モードに切り替える。手順2として、復旧操作有効キー811を押して復旧操作を有効にする。復旧操作有効キー811は軸戻し画面81の右下に設けられる。手順3として、サーボモータがオフしている場合、操作部27の[解除]キーを押しながら[リセット]キーを押すことによりサーボモータがオンした際に軸戻しが実行される。このとき、アラームが解除される。手順4として、サーボモータがオンしている場合、操作部27の[解除]キーを押しながら[R]キーを押すことによって軸戻しが実行される。なお、手順3のステップで軸戻しを行った場合もこのステップを行う。ユーザは表示領域81Aに表示された復旧手順に沿って操作を行えばよい。
 図13に戻り、CPU41は軸戻しを実行するか否か判断する(S41)。手順3若しくは手順4の操作が行われるまでは軸戻しを実行しないので(S41:NO)、CPU41はS40に戻って待機する。手順3若しくは手順4の操作が行われた場合(S41:YES)、主軸7の軸戻し先を判定する為、軸戻し先判定処理を実行する(S42)。
 図17~図22を参照し、軸戻し先判定処理について説明する。なお、図18~図22では、後述の復旧領域W1~W6を見易くする為、ATC領域の範囲を示す枠線を省略している。図17に示すように、CPU41は主軸7の位置を検出する(S81)。主軸7の位置とは、例えば主軸7の先端の位置であって、X軸、Y軸、Z軸の座標位置である。検出した主軸7の位置はRAM43に一旦記憶する。CPU41は検出した主軸7のY軸がY軸原点よりも上か否か判断する(S82)。Y軸がY軸原点以下の場合(S82:NO)、主軸7は加工領域内にある。この場合、仮に主軸7の位置が指令位置からずれていたとしても、そのずれを補正する必要性が低いことから、CPU41は、主軸7のX軸,Y軸,Z軸の戻し先を現在の座標位置に設定する(S98)。なお、このS98の処理に代えて、例えばサーボオフする直前の主軸7の座標位置を記憶しておき、その座標位置に主軸7のX軸,Y軸,Z軸の戻し先を設定してもよい。サーボオフとは、主軸モータ61、X軸モータ62、Y軸モータ63、Z軸モータ64、マガジンモータ33等のサーボモータの動作がオフすることである。S98の座標位置の設定後、CPU41は本処理を終了し、図13のフローのS43に処理を進める。
 Y軸がY軸原点より上の場合(S82:YES)、主軸7はATC領域内にあるが、主軸7が工具交換経路51,52からずれている可能性がある。よって、主軸7の現在の位置について工具交換経路51,52から復旧距離以内にあるか否かをX軸、Y軸、Z軸の軸毎に判定する。
 CPU41は、主軸7のX軸がATC位置X軸±復旧距離内か否か判断する(S83)。図18に示すように、ATC領域には、復旧領域W1が設けられる。復旧領域W1は、ATC位置X軸±復旧距離の範囲で規定される空間である。復旧距離は、例えば主軸7をその距離だけ動かしても他の部材等に衝突する等して破損しない程度の微小の距離であり、例えば2mm程度である。例えば主軸7がK1点で停止している場合、K1点のX軸は復旧領域W1内に位置する(S83:YES)。この場合、CPU41は主軸7のX軸の戻し先をATC位置X軸に設定する(S84)。X軸の戻し先は、RAM43に一旦記憶するとよい。主軸7のX軸が復旧領域W1の外側に位置する場合(S83:NO)、CPU41はX軸の戻し先を現在の座標位置に設定する(S85)。
 次いで、CPU41は、主軸7のY軸がY軸原点+復旧距離よりも下か否か判断する(S86)。図19に示すように、ATC領域には、復旧領域W2が更に設けられる。復旧領域W2は、Y軸原点+復旧距離の範囲で規定される空間である。例えば主軸7がK2点で停止している場合、K2点のY軸は復旧領域W2内に位置する(S86:YES)。この場合、CPU41は主軸7のY軸の戻し先をY軸原点に設定する(S88)。
 他方、主軸7のY軸がY軸原点+復旧距離以上の場合(S86:NO)、CPU41は、主軸7のY軸がATC位置Y軸±復旧距離内か否か判断する(S87)。図20に示すように、ATC領域には、復旧領域W3が更に設けられる。復旧領域W3は、ATC位置Y軸±復旧距離の範囲で規定される空間である。例えば主軸7がK3点で停止している場合、K3点のY軸は復旧領域W3内に位置する(S87:YES)。この場合、CPU41は主軸7のY軸の戻し先をATC位置Y軸に設定する(S89)。Y軸の戻し先は、RAM43に一旦記憶するとよい。なお、主軸7のY軸が復旧領域W3の外側に位置する場合(S87:NO)、CPU41はY軸の戻し先を現在の座標位置に設定する(S90)。
 次いで、CPU41は、主軸7のZ軸が、ATC位置Z軸―復旧距離≦Z軸<ATC位置Z軸の範囲内か否か判断する(S91)。図21に示すように、ATC領域には、復旧領域W4が更に設けられる。復旧領域W4は、ATC位置Z軸―復旧距離≦Z軸<ATC位置Z軸の範囲で規定される空間である。例えば主軸7がK4点で停止している場合、K4点のZ軸は復旧領域W4内に位置する(S91:YES)。この場合、CPU41は主軸7のZ軸の戻し先をATC位置Z軸に設定する(S94)。他方、主軸7のZ軸が復旧領域W4の外側である場合(S91:NO)、CPU41は、主軸7のZ軸が、ATC位置Z軸<Z軸≦ATC位置Z軸+復旧距離の範囲内で且つマガジン31が正常に割出されているか否か判断する(S92)。
 ここで、S92のマガジン31が正常に割出されているかの判断について、CPU41はマガジン31に閾値以上の旋回ずれが生じているかで判断するとよい。旋回ずれとは、マガジン31の基準座標に対する旋回軸37Aを中心とする周方向のずれである。マガジン31の基準座標とは、グリップアーム38の割出位置に対応するマガジン31の旋回位置座標であり、記憶装置44に記憶されている。CPU41は駆動回路75から受信したエンコーダ33Aの検出信号をマガジン31の旋回位置座標に変換し、記憶装置44に記憶された基準座標と比較することで、マガジン31に閾値以上の旋回ずれが生じているか否か判断できる。CPU41は、旋回ずれが閾値未満であればマガジン31は正常に割出された状態と判断でき、旋回ずれが閾値以上であればマガジン31は正常に割りされていない状態と判断できる。
 図21に示すように、ATC領域には、復旧領域W5が更に設けられる。復旧領域W5は、ATC位置Z軸<Z軸≦ATC位置Z軸+復旧距離の範囲で規定される空間である。例えば主軸7がK5点で停止している場合、K5点のZ軸は復旧領域W5内に位置する。これに加えて、マガジン31が正常に割出されている場合(S92:YES)、CPU41は主軸7のZ軸の戻し先をATC位置Z軸に設定する(S94)。
 また、主軸7のZ軸の位置が復旧領域W5の外側である場合(S92:NO)、CPU41は、主軸7のZ軸が、ATC原点<Z軸≦ATC原点+復旧距離の範囲内か否か判断する(S93)。また、Z軸の位置が復旧領域W5内であってもマガジン31が正常に割出された状態でない場合(S92:NO)、グリップアーム38の位置がY軸方向においてずれている。この状態で、主軸7のZ軸をATC位置Z軸に動かした際、主軸7がグリップアーム38が把持する工具ホルダ90と干渉する可能性がある。よって、CPU41はこの場合もZ軸の戻し先をATC位置Z軸に設定せずに、主軸7のZ軸が、ATC原点<Z軸≦ATC原点+復旧距離の範囲内か否か判断する(S93)。
 図22に示すように、ATC領域には、復旧領域W6が更に設けられる。復旧領域W6は、ATC原点<Z軸≦ATC原点+復旧距離の範囲で規定される空間である。例えば主軸7がK6点で停止している場合、K6点のZ軸は復旧領域W6内に位置する(S93:YES)。この場合、CPU41は主軸7のZ軸の戻し先をATC原点に設定する(S96)。Z軸の戻し先は、RAM43に一旦記憶するとよい。Z軸の戻し先を設定した場合(S94、S95、S96)、CPU41は本処理を終了し、図13のフローのS43に処理を進める。なお、主軸7のZ軸が復旧領域W6の外側である場合(S93:NO)、復旧領域W4~6の何れの範囲内にも無いので、CPU41はZ軸の戻し先を現在の座標位置に設定して(S97)本処理を終了し、図13のフローのS43に処理を進める。
 図13のフローに戻り、CPU41はS42の軸戻し先判定処理を終了したので、上記の軸戻し先判定処理で設定したX軸、Y軸、Z軸の夫々の戻し先に従い、主軸7の軸戻しを実行する(S43)。なお、X軸、Y軸、Z軸の軸戻しについて、1軸ずつ順番に実施してもよいし、2軸又は3軸同時に実施してもよい。実施する順番についても規定しない。また、図17の軸戻し先判定処理のS85、S90、S97の各処理で移動軸の戻し先を現在の座標位置に設定した場合、図13のS43の軸戻しの処理では、CPU41は現在の座標位置に戻し先を設定した移動軸において主軸7を移動しない。つまり、CPU41は、主軸7の移動を制限する。
 CPU41は軸戻しが完了したか否か判断する(S44)。軸戻しが完了するまでは(S44:NO)、CPU41はS43に戻って引き続き実行する。軸戻しが完了した場合(S44:YES)、CPU41は、主軸7のY軸がY軸原点以下か否か判断する(S45)。主軸7のY軸がY軸原点以下の場合(S45:YES)、主軸7は既に加工領域に位置するので、CPU41は主軸7の位置を変更せずに、処理を後述のS54に進める。Y軸がY軸原点より上の場合(S45:NO)、主軸7はATC領域内の工具交換経路51,52上に位置する。よって、CPU41は、工具交換経路51,52上の主軸7の位置に応じて主軸7を加工領域に向けて安全に移動させる必要がある。
 そこで、CPU41は、主軸7の位置について、Z=ATC位置Z軸で且つY<ATC位置Y軸且つX=ATC位置X軸の条件を満たすか否か判断する(S46)。例えば図24(1)に示すように、主軸7はM1点に位置する。M1点は工具交換経路51上であるので、主軸7は工具交換経路51において上昇又は下降途中で停止したことが推測される。M1点は、Z=ATC位置Z軸で且つY<ATC位置Y軸且つX=ATC位置X軸の条件を満たすので(S46:YES)、CPU41はマガジン31の位置が正常か否か判断する(S47)。なお、マガジン31の位置が正常か否かの判断方法は、図17のS92の判断処理において、マガジン31が正常に割出されているか否かの判断方法と同じである。
 例えば図24(2)に示すように、マガジン31の位置が正常の場合、工具受渡位置に割出されたグリップアーム38はY軸方向に平行な向きで配置される。主軸7に装着された工具ホルダ90及び工具91はZ軸方向に延びる。この状態では、工具ホルダ90に対してグリップアーム38が直交する位置関係に配置される。この場合、マガジン31の位置は正常なので(S47:YES)、CPU41は主軸7の復旧手順を後述のSTEP2―aの動作パターンに決定し、その動作パターンに対応するY軸復旧画面82を表示部26に表示する(S48)。
<STEP2-a>
 図25に示すように、Y軸復旧画面82には、表示領域82A~82Dが設けられる。表示領域82Aには、STEP2―aの復旧手順が表示される。STEP2―aは、工具交換経路51上の主軸7を工具交換経路51に沿って加工領域まで下降させる動作パターンである。なお、表示領域82B~82Dは、図23に示す軸戻し画面81の表示領域81B~81Dと同じなので説明を省略する。
 表示領域81Aには、Y軸の位置が異常であること、また(通告)として、操作中にアラームが発生した場合は、操作部27の[解除]キーを押しながら[リセット]キーを押し、アラームを解除してから手順を進めることについて注意喚起される。そして、その下側に、STEP2―aに必要な4つの手順がガイダンス表示される。先ず、手順1として、工作機械1のカバーの扉を閉める。手順2として、シャッタ103が閉じていれば操作部27の[解除]キーを押しながら[P]キーを押してシャッタ103を開ける。保守モードの場合はシャッタ103が自動で開かないので、手でシャッタ103を開くか、保守モード以外のモード(例えば自動運転モード又は段取りモード)に変更してからシャッタ103を開ける。手順3として、操作部27の[解除]キーを押しながら[-Y]キーを押して、Y軸をY軸原点より下に移動させる。手順4として、手順1~3の復旧操作が完了したら次へキー821を押す。次へキー821は、Y軸復旧画面82の右下に表示される。
 図13に戻り、CPU41はユーザによる手順1~3の操作に従い、Y軸復旧処理を実行する(S49)。Y軸復旧処理により、主軸7はY軸原点より下に移動する。これにより、CPU41は、ATC領域内で停止した主軸7を工具交換経路51に沿って加工領域まで安全且つ適切に復旧させることができる。CPU41は復旧操作が完了したか否か判断する(S50)。ユーザが次へキー821を押すまでは復旧操作が完了していないので(S50:NO)、CPU41はS50に戻って待機する。次へキー821が押された場合、復旧操作が完了したので(S50:YES)、CPU41は後述の割出工具確認画面88(図40参照)を表示部26に表示する(S54)。
 また、主軸7の位置について、Z=ATC位置Z軸で且つY<ATC位置Y軸且つX=ATC位置X軸の条件を満たしていても(S46:YES)、マガジン31の位置が正常でない場合(S47:NO)、旋回ずれが生じている。例えば図26(1)に示すように、主軸7が工具交換経路51上のM2点に位置する場合、主軸7はATC位置よりも下側にある。しかしながら、図26(2)に示すように、マガジン31の位置がずれていると、工具受渡位置に割出されたグリップアーム38はY軸に対して周方向にずれてしまう。この状態で、仮にグリップアーム38を正常な位置に戻してしまうと、グリップアーム38が主軸7に装着された工具ホルダ90にと干渉する可能性がある。このような場合、グリップアーム38に対して、主軸7をY軸方向においてマガジン31から離れる方向に移動してから、マガジン31を正常な位置に戻すのがよい。そこで、CPU41は、主軸7の復旧手順を後述のSTEP2―bの動作パターンに決定し、その動作パターンに対応するYM軸復旧画面83を表示部26に表示し(S51)、YM軸復旧処理を実行する(S52)。
<STEP2-b>
 図27に示すように、YM軸復旧画面83には、表示領域83A~83Dが設けられる。表示領域83Aには、Y軸とマガジン31の位置が異常であること、下記の手順で復旧すること、また(通告)として、操作中にアラームが発生した場合は、操作部27の[解除]キーを押しながら[リセット]キーを押し、アラームを解除してから手順を進めることについて注意喚起される。そして、その下側に、STEP2―bの復旧手順がガイダンス表示される。STEP2―bは、工具交換経路51上に位置する主軸7を工具交換経路51に沿って加工領域まで下降させた後、マガジン31の位置を正常に戻す動作パターンである。なお、表示領域83B~83Dは、図23に示す軸戻し画面81の表示領域81B~81Dと同じなので説明を省略する。STEP2―bでは、マガジン31の位置がずれているので、表示領域83Cにはマガジン番号が表示されていない。
 図15を参照し、YM軸復旧処理について説明する。図27に示すように、CPU41は表示領域83Aに、5つの手順のうち手順1~3を表示する(S101)。手順1~3は、図25に示すY軸復旧画面82の表示領域82Aに表示されたSTEP2―aの手順
1~3と同じ内容である。ユーザは手順1~3に従って操作する。手順3において、ユーザは主軸7のY軸をY軸原点に向けて下降させる。CPU41は主軸7のY軸の位置を検出する(S102)。CPU41は検出したY軸がY軸原点以下か否か判断する(S103)。Y軸がY軸原点以下になるまでCPU41はS102に戻って待機する。Y軸がY軸原点以下になった場合(S103:YES)、主軸7はマガジン旋回領域から外れている。よって、この状態で、マガジン31を旋回してもグリップアーム38が主軸7と干渉しない。
 そこで、CPU41はマガジン31に生じている旋回ずれが閾値未満か否か判断する(S104)。旋回ずれが閾値未満の場合(S104:YES)、図27に示すように、表示領域83Aに手順4を更に表示する(S105)。手順4として、操作部27の[解除]キーを押しながら[マガジン正転]キーを押すことで、マガジン31が自動で正しい位置に戻る。CPU41は手順4の操作がなされたか否か判断する(S106)。手順4の操作がなされるまでは(S106:NO)、CPU41はS106に戻って待機する。手順4の操作がなされた場合(S106:YES)、CPU41はマガジン31の自動補正指令を生成して駆動回路75に出力することにより、マガジン31の自動旋回補正を行う(S107)。自動旋回補正とは、マガジン31を旋回して基準位置に戻す補正である。これにより、マガジン31の旋回ずれが自動的に解消される。CPU41は表示領域83Aに手順5を更に表示する(S112)。
 他方、旋回ずれが閾値以上の場合(S104:NO)、ずれ量が大きいので補正が必要であるアラームを報知し(S108)、図28に示すように、表示領域83Aに手順4を更に表示する(S109)。この場合の手順4は、図27の手順4とは異なり、操作部27の[解除]キーを押しながら[マガジン正転]キー若しくは[マガジン逆転]キーを押すことによって、工具が取り付けられていないグリップアーム38を正しい位置に手動で移動させる。ユーザは手順4に従って操作し、旋回ずれが解消するように、マガジン31を基準位置に向けて旋回させる。
 CPU41はマガジン31の位置を検出し(S110)、マガジン31の位置が基準位置になったか否か判断する(S111)。マガジン31の位置が基準位置になるまで(S111:NO)、CPU41はS110に戻って待機する。マガジン31の位置が基準位置に戻った場合(S111:YES)、工具が取り付けられていないグリップアーム38は工具受渡位置に割出されたので、CPU41は表示領域83Aに手順5を更に表示する(S112)。手順5は、次へキー831を押す操作である。次へキー831は、YM軸復旧画面83の右下に表示される。CPU41は本処理を終了し、図13のS53に戻って処理を進める。
 図13に示すように、CPU41は復旧操作が完了したか否か判断する(S53)。ユーザが次へキー831を押すまでは復旧操作が完了していないので(S53:NO)、CPU41はS53に戻って待機する。次へキー831が押された場合、復旧操作が完了したので(S53:YES)、CPU41は後述の割出工具確認画面88(図40参照)を表示部26に表示する(S54)。
 また、S46の判断処理において、主軸7の位置について、Z=ATC位置Z軸で且つY<ATC位置Y軸且つX=ATC位置X軸の条件を満たさない場合(S46:NO)、図14に示すように、CPU41は、主軸7の位置について、ATC位置Z軸≦Z≦AT
C原点Z軸且つY=ATC位置Y軸且つX=ATC位置X軸の条件を満たすか否か判断するS(S61)。ATC位置Z軸≦Z≦ATC原点且つY=ATC位置Y軸且つX=ATC位置X軸の条件を満たす場合(S61:YES)、例えば図29(1)に示すように、主軸7はM3点に位置する。M3点は工具交換経路52上であることから、主軸7は工具交換経路52上を前進又は後退の途中で停止したと推測される。
 次いで、CPU41はマガジン31の位置が正常か否か判断する(S62)。例えば図29(2)に示すように、マガジン31の位置が正常の場合、工具受渡位置に割出されたグリップアーム38は工具ホルダ90を把持した状態で、Y軸方向に平行な向きで配置されるので、工具ホルダ90及び工具91はZ軸方向に平行に配置される。よって、主軸7に対して工具ホルダ90はZ軸方向において同軸上に配置される。このように、マガジン31の位置が正常の場合(S62:YES)、CPU41は主軸7の復旧手順を後述のSTEP2―cの動作パターンに決定し、その動作パターンに対応するYZ軸復旧画面84を表示部26に表示する(S63)。
 <STEP2-c>
 図30に示すように、YZ軸復旧画面84には、表示領域84A~84Dが設けられる。STEP2―cは、工具交換経路52上に位置する主軸7を工具交換経路52に沿ってATC原点に一旦後退させてからATC位置に前進させ、そのATC位置からATC準備位置まで移動させた後、Z軸をATC原点に復帰させる動作パターンである。なお、表示領域84B~84Dは、図23に示す軸戻し画面81の表示領域81B~81Dと同じなので説明を省略する。
 表示領域84Aには、Y軸とZ軸の位置が異常であること、下記の手順で復旧すること、また(通告)として、操作中にアラームが発生した場合は、操作部27の[解除]キーを押しながら[リセット]キーを押し、アラームを解除してから手順を続けることについて注意喚起される。そして、その下側に、STEP2―cに必要な5つの手順がガイダンス表示される。手順1、2は、図25に示すY軸復旧画面82の表示領域82Aに表示されたSTEP2―aの手順1、2と同じ内容である。手順3として、操作部27の[解除]キーを押しながら[+Z]キーを押して、主軸7のZ軸をATC原点に合わせる。手順4として、操作部27の[工具交換単動]キーを押す。[工具交換単動]キーを押すことで、主軸7のZ軸がATC位置に移動し、Y軸がY軸原点に移動した後、Z軸が機械原点に復帰する。手順1~4の復旧操作が完了したら、手順5として、次へキー841を押す。次へキー841は、YZ軸復旧画面84の右下に表示される。ユーザはこれら5つの手順に沿って操作する。
 図14に戻り、CPU41はユーザによる手順1~4の操作に従い、YZ軸復旧処理を実行する(S64)。Z軸復旧処理により、主軸7のY軸がY軸原点に移動した後、Z軸が機械原点に復帰する。これにより、CPU41は、ATC領域内で停止した主軸7を工具交換経路52、51に沿って加工領域まで安全且つ適切に復旧させることができる。CPU41は復旧操作が完了したか否か判断する(S65)。ユーザが次へキー841を押すまでは復旧操作が完了していないので(S65:NO)、CPU41はS65に戻って待機する。次へキー841が押された場合、復旧操作が完了したので(S65:YES)、図13に戻り、CPU41は後述の割出工具確認画面88(図40参照)を表示部26に表示する(S54)。
 また、S61の判断処理において、主軸7の位置が、ATC位置Z軸≦Z≦ATC原点且つY=ATC位置Y軸且つX=ATC位置X軸の条件を満たしていても(S61:YES)、マガジン31の位置が正常でなく(S62:NO)、旋回ずれが生じている場合がある。例えば図31(1)に示すように、主軸7が工具交換経路52上のM4点に位置していても、図31(2)に示すように、マガジン31に旋回ずれが生じていると、主軸7に対して、グリップアーム38に把持された工具ホルダ90及び工具91の位置がY軸+方向にずれ、さらにはX軸+方向又は―方向にもずれる場合がある。この状態で仮にSTEP2-cと同様に、主軸7を工具交換経路52に沿ってATC原点に一旦後退させてからATC位置に向けて前進させた場合、主軸7の先端に対して、グリップアーム38に把持された工具ホルダ90が干渉する可能性がある。
 そこで、図14に示すように、CPU41は主軸7のZ軸がATC原点で無いか否か判断する(S66)。例えば図31(1)に示すように、主軸7が工具交換経路52上のM4点に位置する場合、Z軸はATC原点で無いので(S66:YES)、CPU41は主軸7の復旧手順を後述のSTEP2―dの動作パターンに決定し、その動作パターンに対応するYZM軸復旧画面85を表示部26に表示し(S67)、YZM軸復旧処理を実行する(S68)。
 <STEP2-d>
 図32に示すように、YZM軸復旧画面85には、表示領域85A~85Dが設けられる。表示領域85Aには、Y軸とZ軸とマガジンの位置が異常であること、下記の手順で復旧すること、また(通告)として、操作中にアラームが発生した場合は、操作部27の[解除]キーを押しながら[リセット]キーを押し、アラームを解除してから手順を続けることについて注意喚起される。そして、その下側に、STEP2―dの復旧手順が表示される。STEP2―dは、工具交換経路52上に位置する主軸7を工具交換経路52に沿ってATC原点に一旦後退させた後、マガジン31の位置を正常に戻してからZ軸をATC位置に前進させ、そのATC位置からATC準備位置まで移動させた後、Z軸をATC原点に復帰させる動作パターンである。なお、表示領域85B~85Dは、図23に示す軸戻し画面81の表示領域81B~81Dと同じなので説明を省略する。なお、STEP2―dでは、マガジン31の位置がずれているので、表示領域85Cにはマガジン番号が表示されていない。また、主軸7のM4点はマガジン旋回領域内にあるので、表示領域81Cのマガジン旋回領域の欄にはオフと表示されている。
 図16を参照し、YZM軸復旧処理について説明する。CPU41は表示領域85Aに、6つの手順のうち手順1~3を表示する(S121)。手順1~3は、図30に示すYZ軸復旧画面84の表示領域84Aに表示されたSTEP2―cの手順1~3と同じ内容である。ユーザは手順1~3に従って操作する。手順3は、主軸7のZ軸をATC原点に向けて移動させる操作である。CPU41は主軸7のZ軸を検出する(S122)。CPU41は検出したZ軸がATC原点か否か判断する(S123)。Z軸がATC原点になるまで(S123:NO)、CPU41はS122に戻ってZ軸を監視する。Z軸がATC原点に到達した場合(S123:YES)、主軸7はマガジン旋回領域よりも後方に退避したので、この状態で、マガジン31を旋回してもグリップアーム38は主軸7と干渉しない。
 次いで、CPU41はマガジン31に生じている旋回ずれが閾値未満か否か判断する(S124)。旋回ずれが閾値未満の場合(S124:YES)、図32に示すように、表示領域83Aに手順4を更に表示する(S125)。手順4として、操作部27の[解除]キーを押しながら[マガジン正転]キーを押すことで、マガジン31が自動で正しい位置に戻る。CPU41は手順4の操作がなされたか否か判断する(S126)。手順4の操作がなされるまでは(S126:NO)、CPU41はS126に戻って待機する。手順4の操作がなされた場合(S126:YES)、CPU41はマガジン31の自動補正指令を生成して駆動回路75に出力することにより、マガジン31の自動旋回補正を行う(S127)。これにより、マガジン31の旋回ずれが自動的に解消される。なお、旋回ずれが閾値未満の場合(S124:YES)、CPU41は例えばS125,S126の各処理を実行せずに、そのままマガジン31の自動旋回補正を行ってもよい。CPU41は表示領域85Aに手順5を更に表示する(S132)。
 
 他方、旋回ずれが閾値以上の場合(S124:NO)、ずれ量が大きいので補正が必要であるアラームを報知し(S128)、図33に示すように、表示領域85Aに手順4を更に表示する(S129)。この場合の手順4は、図32の手順4とは異なり、操作部27の[解除]キーを押しながら[マガジン正転]キー若しくは[マガジン逆転]キーを押すことによって、工具が取り付けられていないグリップアーム38を正しい位置に手動で移動させる。ユーザは手順4に従って操作し、旋回ずれが解消するように、マガジン31を基準位置に向けて旋回させる。
 CPU41はマガジン31の位置を検出し(S130)、マガジン31の位置が基準位置になったか否か判断する(S131)。マガジン31の位置が基準位置になるまで(S131:NO)、CPU41はS130に戻って待機する。図34(2)に示すように、マガジン31の位置が基準位置に戻った場合(S131:YES)、工具が取り付けられていないグリップアーム38は工具受渡位置に割出されたので、CPU41は表示領域85Aに手順5を更に表示する(S132)。
 手順5は、操作部27の[工具交換単動]キーを押す操作である。[工具交換単動]キーを押すことで、図34(1)に示すように、主軸7のZ軸がATC原点からATC位置に移動し、Y軸がY軸原点に移動した後、Z軸が機械原点に復帰する。CPU41は主軸7の位置を検出する(S133)。CPU41は検出した主軸7の位置が加工領域か否か判断する(S134)。主軸7が加工領域に到達するまで(S134:NO)、CPU41はS133に戻って主軸7の位置を監視する。
 工具交換単動が完了すると主軸7は加工領域に位置するので(S134:YES)、CPU41は表示領域85Aに手順6を更に表示する(S135)。手順6は、次へキー851を押す操作である。次へキー851は、YZM軸復旧画面85の右下に表示される。これにより、CPU41は、ATC領域内で停止した主軸7を工具交換経路52,51に沿って加工領域まで安全且つ適切に復旧させることができる。CPU41はYZM軸復旧処理を終了し、図14のS69に処理を進める。
 図14に示すように、CPU41は復旧操作が完了したか否か判断する(S69)。ユーザが次へキー851を押すまでは復旧操作が完了していないので(S69:NO)、CPU41はS69に戻って待機する。次へキー851が押された場合、復旧操作が完了したので(S69:YES)、図13に戻り、CPU41は後述の割出工具確認画面88を表示部26に表示する(S54)。
 また、図14に示すように、マガジン31の位置が正常でない状態で(S62:NO)、主軸7のZ軸が工具交換経路52上のATC原点に位置する場合がある(S66:NO)。例えば図35(1)に示すように、主軸7は工具交換経路52上のATC原点であるM6点に位置する。この状態で、図35(2)に示すように、マガジン31の位置がずれていることから、主軸7に対して、グリップアーム38に把持された工具ホルダ90の位置がY軸+方向にずれ、さらにはX軸+方向又は―方向にもずれている。この場合(S62:NO、S66:NO)、CPU41は主軸7の復旧手順を後述のSTEP2―eの動
作パターンに決定し、その動作パターンに対応するYZM軸復旧画面86を表示部26に表示する(S70)。
 <STEP2-e>
 図36に示すように、YZM軸復旧画面86には、表示領域86A~86Dが設けられる。表示領域86Aには、マガジンの位置が異常であること、下記の手順で復旧すること、また(通告)として、操作中にアラームが発生した場合は、操作部27の[解除]キーを押しながら[リセット]キーを押し、アラームを解除してから手順を続けることについて注意喚起される。そして、その下側に、STEP2―eの復旧手順が表示される。STEP2―eは、主軸7がATC原点に位置する状態で、マガジン31の位置を正常に戻してからZ軸をATC位置に前進させ、そのATC位置からATC準備位置まで移動させた後、Z軸をATC原点に復帰させる動作パターンである。なお、表示領域86B~86Dは、図23に示す軸戻し画面81の表示領域81B~81Dと同じなので説明を省略する。なお、STEP2―eでは、マガジン31の位置がずれているので、表示領域86Cにはマガジン番号が表示されていない。また、主軸7のM6点はマガジン旋回領域外にあるので、表示領域81Cのマガジン旋回領域の欄にはオンと表示されている。
 表示領域86Aには、STEP2―eに必要な5つの手順が表示される。手順1、2は、図32に示すYZM軸復旧画面85の表示領域85Aに表示されたSTEP2―dの手
順1、2と同じ内容である。なお、詳述しないが、STEP2―eにおいても、STEP2―cと同様に、マガジン31に生じている旋回ずれが閾値未満の場合、図36に示すように、表示領域83Aに表示される手順3は、操作部27の[解除]キーを押しながら[マガジン正転]キーを押すことで、マガジン31の自動旋回補正を実行する内容となる。他方、マガジン31に生じている旋回ずれが閾値以上の場合、図37に示すように、表示領域83Aに表示される手順3は、操作部27の[解除]キーを押しながら[マガジン正転]キー若しくは[マガジン逆転]キーを押すことによって、工具が取り付けられていないグリップアーム38を正しい位置に手動で移動させる内容となる。
 何れの手順3を行うことにより、主軸7に対して、グリップアーム38に把持された工具ホルダ90の位置がZ軸方向において対向する。図36又は図37に示すように、手順4は、操作部27の[工具交換単動]キーを押す操作である。[工具交換単動]キーを押すことで、図35(1)に示すように、主軸7のZ軸がATC原点からATC位置に移動し、Y軸がY軸原点に移動した後、Z軸が機械原点に復帰する。手順1~4の復旧操作が完了したら、手順5として、次へキー861を押す。次へキー861は、YZM軸復旧画面86の右下に表示される。
 図14に戻り、CPU41はユーザによる手順1~4の操作に従い、YZM軸復旧処理を実行する(S71)。YZM軸復旧処理により、主軸7のZ軸がATC原点からATC位置に移動し、Y軸がY軸原点に移動した後、Z軸が機械原点に復帰する。これにより、CPU41は、ATC領域内で停止した主軸7を工具交換経路52、51に沿って加工領域まで安全且つ適切に復旧させることができる。CPU41は復旧操作が完了したか否か判断する(S72)。ユーザが次へキー861を押すまでは復旧操作が完了していないので(S72:NO)、CPU41はS72に戻って待機する。次へキー861が押された場合、復旧操作が完了したので(S72:YES)、図13に戻り、CPU41は後述の割出工具確認画面88を表示部26に表示する(S54)。
 また、S61の判断処理において、主軸7の位置が、ATC位置Z軸≦Z≦ATC原点且つY=ATC位置Y軸且つX=ATC位置X軸の条件を満たさない場合がある(S61:NO)。例えば図38に示すように、主軸7がM7点に位置する場合を想定する。M7点はATC領域内であるが、工具交換経路51,52上には位置していない。つまり主軸7は、軸戻しで工具交換経路51,52上に復帰できず、加工領域に向けて復旧するのは困難な状況であり、ユーザによる復旧操作は不可能である。この場合、CPU41は復旧不可画面87を表示部26に表示する(S73)。
 <STEP2-f>
 図39に示すように、復旧不可画面87には、表示領域87A~87Dが設けられる。表示領域87Aには、STEP2―fの復旧手順が表示される。STEP2―fは、主軸7の移動を制限し、復旧操作を終了させる工程である。なお、表示領域87B~87Dは、図23に示す軸戻し画面81の表示領域81B~81Dと同じなので説明を省略する。次へキー871、及び復旧操作有効キー872は、復旧不可画面87の右下に表示される。終了キー873は、復旧不可画面87の左下に表示される。
 表示領域87Aには、ATC復旧ができないこと、ATCメンテナンスモードで復旧すること、ATCメンテナンスモードではメンテナンス教育を受けた熟練者のみが操作有効であること、について注意喚起される。なお、ATCメンテナンスモードでは、ATC領域における主軸7の動作制限が解除されるので、熟練者の操作による復旧作業が可能となる。注意喚起の下には、復旧操作を終了させる為に必要な3つの手順が表示される。手順1として、復旧操作有効キー872を押して、復旧操作を無効にする。手順2として操作部27の[リセット]キーを押す。手順3として、終了キー873を押す。
 図14に戻り、CPU41はユーザによる手順1~3の操作に従い、復旧無効処理を実行する(S74)。復旧無効処理により、復旧操作が無効となる。CPU41は復旧無効処理が終了したか否か判断する(S75)。ユーザが終了キー873を押すまでは復旧無効処理が完了していないので(S75:NO)、CPU41はS75に戻って待機する。終了キー873が押された場合、復旧無効処理が終了したので(S75:YES)、CPU41はATC復旧処理を終了する。
 また、主軸7の復旧操作が完了した場合(図13のS50:YES,S53:YES,図14のS65:YES,S69:YES,S72:YES)、主軸7は加工領域に位置する。この状態で、マガジン31の工具受渡位置に割出したグリップアーム38に工具が取り付けられていると、次回ATC動作を実施した場合、主軸7が工具ホルダ90及び工具91に衝突する可能性があるので、グリップアームから工具を取り外す必要がある。そこで、図13に示すように、CPU41は割出工具確認画面88を表示部26に表示する(S54)。
 <STEP3>
 図40に示すように、割出工具確認画面88には、表示領域88A~88Dが設けられる。表示領域88Aには、STEP3の復旧手順が表示される。STEP3は、工具受渡位置に割出したグリップアーム38から工具が取り外されているか確認する工程である。なお、表示領域87B~87Dは、図23に示す軸戻し画面81の表示領域81B~81Dと同じなので説明を省略する。次へキー881は、割出工具確認画面88の右下に表示される。
 表示領域88Aには、STEP3に必要な2つの手順が表示される。手順1として、マガジン番号のグリップアーム38に工具が取り付けられている場合は工具を取り外す。さらに(通告)として、工具が取り付けられている状態で次回ATC動作を実施した場合、機械や工具が破損することについて注意喚起される。手順2として、グリップアーム38に工具が取り付けられていないことを確認したら次へキー881を押す。
 図13に戻り、CPU41はユーザによる確認が完了したか否か判断する(S55)。ユーザが次へキー881を押すまでは確認が完了していないので(S55:NO)、CPU41はS54に戻って待機する。次へキー881が押された場合、ユーザによる確認が完了したので(S55:YES)、CPU41は終了画面89を表示部26に表示する(S56)
 <STEP4>
 図41に示すように、終了画面89には、表示領域89A~89Dが設けられる。STEP4の復旧手順が表示される。STEP4は、ATC復旧処理を終了させる工程である。なお、表示領域89B~89Dは、図23に示す軸戻し画面81の表示領域81B~81Dと同じなので説明を省略する。次へキー891と復旧操作有効キー892は、終了画面89の右下に表示される。終了キー893は、終了画面89の左下に表示される。
 表示領域89Aには、ATC復旧が完了したこと、さらに(通告)として、ATC工具画面(図示略)の工具割り当てとマガジン31に取り付けている工具の関係がずれている可能性があるので、ATC工具画面の工具割り当てを確認するようにガイダンスでユーザに注意喚起される。ATC工具画面は、操作パネル25の操作で表示部26に表示される。ATC工具画面には、マガジン31の各グリップアームに割り当てられた工具の種類を示す表である工具割り当てが表示される。さらにその下に、ATC復旧処理を終了させるために必要な3つの手順が表示される。手順1として、復旧操作有効キー892を押して、復旧操作を有効にする。手順2として、操作部27の[リセット]キーを押す。手順3として、手順1と2の操作を確認したら終了キー893を押す。
 図13に戻り、CPU41はユーザによる確認が完了したか否か判断する(S57)。ユーザが終了キー893を押すまでは確認が完了していないので(S57:NO)、CPU41はS56に戻って待機する。終了キー893が押された場合、ユーザによる確認が完了したので(S57:YES)、CPU41はATC復旧処理を終了する。
 上記説明において、グリップアーム38は本発明の「把持部」の一例である。マガジンモータ33は本発明の「旋回駆動部」の一例である。記憶装置44は本発明の「記憶部」の一例である。図13のS47の処理を実行するCPU41は本発明の「座標検出部」とずれ判定部」の一例である。図15のS102の処理を実行するCPU41は本発明の「位置検出部」の一例である。S103の処理を実行するCPU41は本発明の「判断部」の一例である。S101、S104、S105、S107、S109の処理を実行するCPU41は本発明の「補正要求部」の一例である。また、図14のS62の処理を実行するCPU41は本発明の「座標検出部」とずれ判定部」の一例である。図15のS122の処理を実行するCPU41は本発明の「位置検出部」の一例である。S123の処理を実行するCPU41は本発明の「判断部」の一例である。S121、S124、S125、S127、S129の処理を実行するCPU41は本発明の「補正要求部」の一例である。CPU41は本発明の「制御部」の一例である。記憶装置44は本発明の「記憶部」の一例である。
 以上説明したように、本実施形態の数値制御装置40は工作機械1の動作を制御する。工作機械1は旋回軸37Aを中心に旋回可能なマガジン31を備える。マガジン31の外周部には複数のグリップアーム38が周方向に沿って設けられる。グリップアーム38は工作機械1の主軸7に装着させる工具91を把持可能である。数値制御装置40のCPU41はマガジン31を旋回駆動して任意のグリップアーム38を割り出させる。記憶装置44には、グリップアーム38の割出位置に対応するマガジン31の旋回位置座標が、マガジン31の基準位置を示す基準座標として記憶される。主軸7が停止した状態で、主軸7の位置を復旧させる為、CPU41はマガジン31の旋回位置座標を検出し、記憶装置44に記憶された基準位置と比較してマガジン31に旋回ずれがあるか判定する。
 旋回ずれがあると判定した場合、CPU41は主軸7の位置を検出し、その検出した位置がマガジン旋回領域内に位置するか判断する。上記実施形態では、主軸7が工具交換経路51上であってATC準備位置に無ければマガジン旋回領域内と判断し、ATC準備位置にあればマガジン旋回領域外と判断する。また、主軸7が工具交換経路52上であってATC原点に無ければマガジン旋回領域内と判断し、ATC原点にあれば旋回領域外と判断する。
 このような判断方法で、主軸7の位置がマガジン旋回領域内に位置すると判断した場合、CPU41は主軸7が工具交換経路51上にあれば主軸7をATC準備位置まで移動させ、工具交換経路52上にあれば主軸7をATC原点まで移動させることで、主軸7をマガジン旋回領域から退避させる。その後、CPU41はマガジン31を基準位置に戻す旋回補正を実行させる動作又は作業を要求する。なお、旋回補正を実行させる動作とは、マガジンモータ33に旋回補正を実行させる動作である。旋回補正を実行させる作業とは、作業者に旋回補正を実行させる作業を意味する。これにより、数値制御装置40は、旋回補正を行う際に、マガジン31やグリップアーム38に把持されている工具91と、主軸7や主軸7に装着された工具91との干渉を回避できるので、旋回補正を適切に行うと共にマガジン31や主軸7及び工具91の破損する可能性を低減できる。
 CPU41は、マガジン31に生じている旋回ずれの大きさが閾値未満の場合に旋回補正指令を生成し、マガジンモータ33に対して旋回補正の動作を指示する。旋回ずれの大きさが閾値未満であれば旋回補正を自動で行うので、数値制御装置40は旋回補正を作業者が手動で行う場合に比べて手間を省略できる。また、旋回ずれの大きさが微小であってもマガジン31を適切に基準位置に戻すので、マガジン31や主軸7及び工具91が破損する可能性をより低減できる。他方、旋回ずれの大きさが閾値以上である場合はマガジン31を旋回する距離が長いことから、マガジン31を慎重に旋回して基準位置に戻す必要がある。この場合、CPU41は作業者に対して旋回補正の作業を表示部26に表示して報知するので、作業者はマガジン31の周囲を確認しながらマガジン31を慎重に旋回させることができる。
 CPU41は主軸7をマガジン旋回領域内から退避させる際、工具交換経路51,52に沿って主軸7を移動させる。工具交換経路51,52は工具交換時に主軸を移動させる経路である。これにより、CPU41は主軸7や主軸7に装着された工具91が他部材と干渉する可能性を低減できる。
 逆L字状の工具交換経路51,52のうち工具交換経路51はATC準備位置とATC位置の間をY軸方向に延びる所定経路である。停止状態の主軸7が工具交換経路51上で且つATC準備位置に無い場合、主軸7はマガジン旋回領域内に位置する可能性がある。この場合、CPU41は、主軸7を工具交換経路51に沿ってATC準備位置まで退避することでマガジン旋回領域から退避できる。これにより、CPU41はマガジン31の旋回補正を安全に行うことができる。
 停止状態の主軸7がATC位置とATC原点との間で且つマガジン旋回領域内に位置する場合、CPU41は主軸7をATC原点に退避する。これにより、CPU41はマガジン31の旋回補正を安全に行うことができる。
 例えばアラーム等が発生し、工具交換が途中で停止した場合、主軸7は停止した状態である。この場合、CPU41はマガジン31の旋回ずれを判定し、停止した主軸7の位置がマガジン旋回領域内と判断した場合は、主軸7をマガジン旋回領域から退避させたのちにマガジンを基準位置に戻すことができる。
 工具交換の途中で工作機械1の電源がオフされた後、電源がオンされた場合、主軸7は停止した状態である。この場合、CPU41はマガジン31の旋回ずれを判定する。旋回ずれがあると判定し、且つ停止した主軸7の位置がマガジン旋回領域内と判断した場合は、主軸7をマガジン旋回領域から退避させたのちにマガジン31を基準位置に戻すことで、旋回補正を安全に行うことができる。
 本発明は上記実施形態に限らず各種変形が可能である。工作機械1は横形の工作機械であるが、主軸の軸方向が上下方向に延びる縦形の工作機械であってもよい。工作機械1はワークに対して主軸7に装着された工具91をX軸、Y軸、Z軸の3軸方向に相対的に移動させる機構を備えるが、3軸に限定せず、1軸又は2軸でもよく、3軸以上であってもよい。また、工作機械1は、回転テーブル9上に治具で固定されたワークに対し、コラム5をX軸方向とZ軸方向、主軸ヘッド6(主軸7)をコラム5の前面5Bに沿ってY軸方向に移動することで、ワークと工具を相対的にX軸、Y軸、Z軸の3軸方向に移動する構造であるが、これ以外の構造でもよい。例えば、コラム5をX軸方向、主軸ヘッド6(主軸7)をZ軸方向に移動し、コラム5と主軸ヘッド6を支持する支持台(図示略)をY軸方向に移動させてもよい。
 上記実施形態のATC復旧処理(図13参照)では、軸戻し先判定処理を実行してから軸戻しを実行し(S40~S43)、その後、工具交換経路51,52上に軸戻しされた主軸7の位置を工具交換経路51,52に沿って加工領域まで安全且つ適切に移動させる為、主軸7の停止位置に対応した復旧画面82~86を表示部26に表示するが(S45~S72)、S45以降の処理を省略し、軸戻しまでの処理としてもよい。
 例えば、ATC領域で停止した主軸7の位置がW2領域の範囲内であるが、X軸が復旧領域W1の範囲内にない場合、若しくはZ軸が復旧領域W4~W6の何れの範囲内にも無い場合、S43の軸戻しをすることで、主軸7のY軸は加工領域に直接的に移動する。この場合、CPU41は主軸7を加工領域に復旧させる処理は不要である。
 上記実施形態では、軸戻し先判定処理において、X軸、Y軸、Z軸の全ての移動軸において戻し先を指定した後で全軸について軸戻しを実行するが、各移動軸で戻し先を指定しながら軸戻しを順次実行してもよい。
 図15のYM軸復旧処理のS104の処理において、旋回ずれが閾値値未満の場合は(S104:YES)、CPU41はマガジン31の自動旋回補正を実行するが(S105~S107)、例えば図42に示す変形例のように、旋回ずれが閾値値未満の場合は(S104:YES)、そのまま主軸7を移動させても工具の受け渡しに対して影響が小さいので、マガジン31の旋回ずれを補正しないようにしてもよい。この場合、CPU41は、図27のYM軸復旧画面83の表示領域82Aにおいて、手順3の後に手順4として、次へキー831を押す操作についてガイダンス表示するようにしてもよい(S105)。他方、旋回ずれの大きさが閾値以上である場合は(S104:NO)、CPU41は作業者に対して旋回補正の作業を報知するので(S108,S109)、作業者はマガジン31の周囲を確認しながらマガジン31を慎重に旋回させることができる。
 
 軸戻し画面81、復旧画面82~86、復旧不可画面87、割出工具確認画面88、終了画面89の夫々のレイアウト、各表示領域に表示される文言の表現等は自由に変更可能である。
 図15のYM軸復旧処理において、マガジン31の旋回ずれが閾値未満の場合は(S104:YES)、マガジン31の自動旋回補正を実行するが(S107)、例えば旋回ずれの大小に関わらず、ユーザの操作パネル25の操作により一律で、マガジン31を旋回して基準位置に戻すようにしてもよい(S108~S111)。図16のYZM軸復旧処理、図14のYZM復旧処理(S71)においても同様である。
 上記実施形態の図31(1)に示すSTEP2―dの工程では、工具交換経路52上のM4点に位置する主軸7を工具交換経路52に沿ってATC原点に一旦後退させた後、マガジン31の位置を正常に戻して、[工具交換単動]キーを押すことによって、主軸7をATC位置Z軸に前進させているが、例えばM4点がマガジン旋回領域よりも後方であれば、マガジン31の位置を正常に戻してから主軸7をM4点から工具交換経路52に沿ってそのまま前進させてもよい。この場合、[工具交換単動]キーを押すのではなく、[解除]キーを押しながら[-Z]キーを押して主軸7をATC位置軸に前進させればよい。
 図16のYZM軸復旧処理の中で、主軸7のZ軸がATC原点に到達した場合(S123:YES)、主軸7はマガジン旋回領域よりも後方に退避したと見做して、CPU41はマガジン31の旋回補正を実行するが(S124~S127、S128~S131)、例えば主軸7の現在の機械座標を検出して、記憶装置44に記憶されたマガジン旋回領域の座標情報を参照して、現在の主軸7のZ軸がマガジン旋回領域内か否かを判断するようにしてもよい。また、図15のYM軸復旧処理の中で、主軸7のY軸をY軸原点に向けて下降する場合(S101~S103)においても同様に、記憶装置44に記憶されたマガジン旋回領域の座標情報を参照して、現在の主軸7のY軸がマガジン旋回領域内か否かを判断するようにしてもよい。
 本実施形態は工作機械1に設けられた数値制御装置40であるが、例えば図43に示す数値制御システム200であってもよい。数値制御システム200は、数値制御装置201と工作機械1A,1B,1Cを備える。数値制御装置201のCPUは、例えば工場等に設置された工作機械1A,1B,1Cの夫々の動作を制御して管理する。このような数値制御システム200の場合、数値制御装置201のCPUが本発明の「検出部」、「判断部」、「移動制御部」、「表示制御部」等を構成してもよい。
  1   工作機械
  7   主軸
 26   表示部
 30   ATC装置
 31   マガジン
 37A  旋回軸
 38   グリップアーム
 40   数値制御装置
 41   CPU
 51,52   工具交換経路
 90   工具ホルダ
 91   工具
200   数値制御システム
201   数値制御装置

Claims (13)

  1.  工作機械の主軸に装着させる工具を把持可能な複数の把持部が周方向に沿って設けられ、旋回軸を中心に旋回可能なマガジンを旋回駆動して任意の前記把持部を割り出させる旋回駆動部と、
     前記把持部の割出位置に対応する前記マガジンの旋回位置座標を、前記マガジンの基準位置を示す基準座標として記憶する記憶部と、
     前記マガジンの旋回位置座標を検出する座標検出部と、
     前記座標検出部により検出された前記マガジンの旋回位置座標の、前記記憶部に記憶された前記基準座標に対する前記旋回軸の周方向のずれである旋回ずれがあるか判定するずれ判定部と、
     前記主軸の位置を検出する位置検出部と、
     前記位置検出部が検出した前記主軸の位置が、前記マガジンが旋回する領域であるマガジン旋回領域内に位置するか判断する判断部と、
     前記ずれ判定部により前記旋回ずれがあると判定され、前記判断部により前記主軸の位置が前記マガジン旋回領域内に位置すると判断された場合に、前記主軸を前記マガジン旋回領域から退避させた後、前記マガジンを前記基準位置に戻す旋回補正を実行させる動作又は作業を要求する補正要求部と
    を備えたことを特徴とする数値制御装置。
  2.  前記補正要求部は、前記旋回ずれの大きさが閾値未満である場合に、前記旋回駆動部に対して、前記旋回補正の動作を指示し、前記旋回ずれの大きさが前記閾値以上である場合に、作業者に対して、前記旋回補正の作業を報知すること
    を特徴とする請求項1に記載の数値制御装置。
  3.  前記旋回ずれの大きさが閾値未満である場合に、前記旋回補正が不要であると判定する一方、前記旋回ずれの大きさが前記閾値以上である場合に、前記旋回補正を行う必要があると判定する補正判定部を更に備え、
     前記補正要求部は、前記補正判定部により前記旋回補正を行う必要があると判定された場合に、前記旋回補正を実行させる動作又は作業を要求すること
    を特徴とする請求項1に記載の数値制御装置。
  4.  前記補正要求部は、前記主軸を、前記把持部との間で工具交換を行うときに前記主軸を移動させる経路である工具交換経路に沿って前記マガジン旋回領域から離れる方向に退避させた後、前記旋回補正を実行させる動作又は作業を要求すること
    を特徴とする請求項1に記載の数値制御装置。
  5.  前記工具交換経路は、前記主軸が前記マガジンとの間で前記工具交換を行う工具交換位置と、前記工具交換位置から前記主軸の軸方向に直交する方向に離間する位置であって前記軸方向において前記工具交換位置と同一位置である工具交換準備位置とを結ぶ所定経路を含み、
     前記補正要求部は、前記主軸が前記所定経路で且つ前記マガジン旋回領域内に位置する場合に、前記主軸を前記所定経路に沿って前記工具交換準備位置に退避させた後、前記旋回補正を実行させる動作又は作業を要求すること
    を特徴とする請求項4に記載の数値制御装置。
  6.  前記工作機械は、前記工具交換経路上の工具交換位置と、前記工具交換位置から前記主軸の軸方向において離間する原点位置とに前記主軸を往復移動させることによって、前記マガジンとの間で前記主軸の前記工具交換を行うものであって、
     前記補正要求部は、前記主軸が前記工具交換位置と前記原点位置との間で且つ前記マガジン旋回領域内に位置する場合に、前記主軸を前記原点位置に退避させた後、前記旋回補正を実行させ動作又は作業を要求すること
    を特徴とする請求項4に記載の数値制御装置。
  7.  前記ずれ判定部は、前記工具交換が途中で停止した場合に、前記旋回ずれがあるか判定すること
    を特徴とする請求項4に記載の数値制御装置。
  8.  前記ずれ判定部は、前記工具交換の途中で前記工作機械の電源がオフされた後、前記電源がオンされた場合に、前記旋回ずれがあるか判定すること
    を特徴とする請求項4に記載の数値制御装置。
  9.  前記主軸の軸方向は水平方向であること
    を特徴とする請求項1から3の何れか一に記載の数値制御装置。
  10.  工作機械と数値制御装置を備える数値制御システムであって、
     前記数値制御装置は、
     前記工作機械の主軸に装着させる工具を把持可能な複数の把持部が周方向に沿って設けられ、旋回軸を中心に旋回可能なマガジンを旋回駆動して任意の前記把持部を割り出させる旋回駆動部と、
     前記把持部の割出位置に対応する前記マガジンの旋回位置座標を、前記マガジンの基準位置を示す基準座標として記憶する記憶部と、
     前記マガジンの旋回位置座標を検出する座標検出部と、
     前記座標検出部により検出された前記マガジンの旋回位置座標の、前記記憶部に記憶された前記基準座標に対する前記旋回軸の周方向のずれである旋回ずれがあるか判定するずれ判定部と、
     前記主軸の位置を検出する位置検出部と、
     前記位置検出部が検出した前記主軸の位置が、前記マガジンが旋回する領域であるマガジン旋回領域内に位置するか判断する判断部と、
     前記ずれ判定部により前記旋回ずれがあると判定され、前記判断部により前記主軸の位置が前記マガジン旋回領域内に位置すると判断された場合に、前記主軸を前記マガジン旋回領域から退避させた後、前記マガジンを前記基準位置に戻す旋回補正を実行させる動作又は作業を要求する補正要求部と
    を備えたことを特徴とする数値制御システム。
  11.  工作機械の動作を制御する数値制御装置の制御方法において、
     前記工作機械の主軸に装着させる工具を把持可能な複数の把持部が周方向に沿って設けられ、旋回軸を中心に旋回するマガジンを旋回駆動して任意の前記把持部を割り出させる旋回駆動工程と、
     前記マガジンの旋回位置座標を検出する座標検出工程と、
     前記座標検出工程で検出された前記マガジンの旋回位置座標の、前記把持部の割出位置に対応する前記マガジンの旋回位置座標を、前記マガジンの基準位置を示す基準座標として記憶する記憶部に記憶された前記基準座標に対する前記旋回軸の周方向のずれである旋回ずれがあるか判定するずれ判定工程と、
     前記主軸の位置を検出する位置検出工程と、
     前記位置検出工程で検出した前記主軸の位置が、前記マガジンが旋回する領域であるマガジン旋回領域内に位置するか判断する判断工程と、
     前記ずれ判定工程で前記旋回ずれがあると判定され、前記判断工程で前記主軸の位置が前記マガジン旋回領域内に位置すると判断された場合に、前記主軸を前記マガジン旋回領域から退避させた後、前記マガジンを前記基準位置に戻す旋回補正を実行させる動作又は作業を要求する補正要求工程と
    を備えたことを特徴とする制御方法。
  12.  工作機械の動作を制御する数値制御装置を機能させるプログラムにおいて、
     コンピュータに、
     前記工作機械の主軸に装着させる工具を把持可能な複数の把持部が周方向に沿って設けられ、旋回軸を中心に旋回するマガジンを旋回駆動して任意の前記把持部を割り出させる旋回駆動処理と、
     前記マガジンの旋回位置座標を検出する座標検出処理と、
     前記座標検出処理で検出された前記マガジンの旋回位置座標の、前記把持部の割出位置に対応する前記マガジンの旋回位置座標を、前記マガジンの基準位置を示す基準座標として記憶する記憶部に記憶された前記基準座標に対する前記旋回軸の周方向のずれである旋回ずれがあるか判定するずれ判定処理と、
     前記主軸の位置を検出する位置検出処理と、
     前記位置検出処理で検出した前記主軸の位置が、前記マガジンが旋回する領域であるマガジン旋回領域内に位置するか判断する判断処理と、
     前記ずれ判定処理で前記旋回ずれがあると判定され、前記判断処理で前記主軸の位置が前記マガジン旋回領域内に位置すると判断された場合に、前記主軸を前記マガジン旋回領域から退避させた後、前記マガジンを前記基準位置に戻す旋回補正を実行させる動作又は作業を要求する補正要求処理と
    を実行させることを特徴とするプログラム。
  13.  制御部と、
     プログラムを記憶する記憶部と
    を備え、
     前記制御部は、前記プログラムを実行して、請求項11の制御方法を実現することを特徴とする数値制御装置。
PCT/JP2023/031131 2022-09-29 2023-08-29 数値制御装置、数値制御システム、制御方法、及びプログラム WO2024070400A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2022-156001 2022-09-29
JP2022156001A JP2024049652A (ja) 2022-09-29 2022-09-29 数値制御装置、数値制御システム、制御方法、及びプログラム

Publications (1)

Publication Number Publication Date
WO2024070400A1 true WO2024070400A1 (ja) 2024-04-04

Family

ID=90477098

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2023/031131 WO2024070400A1 (ja) 2022-09-29 2023-08-29 数値制御装置、数値制御システム、制御方法、及びプログラム

Country Status (2)

Country Link
JP (1) JP2024049652A (ja)
WO (1) WO2024070400A1 (ja)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06740A (ja) * 1992-06-18 1994-01-11 Brother Ind Ltd 工作機械の自動工具交換装置
JP2011173197A (ja) * 2010-02-24 2011-09-08 Brother Industries Ltd 数値制御式工作機械
JP2018039068A (ja) * 2016-09-06 2018-03-15 ファナック株式会社 工具交換装置の位置補正システム及び位置補正方法
JP2020069553A (ja) * 2018-10-30 2020-05-07 ファナック株式会社 工具交換装置及び工作機械

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06740A (ja) * 1992-06-18 1994-01-11 Brother Ind Ltd 工作機械の自動工具交換装置
JP2011173197A (ja) * 2010-02-24 2011-09-08 Brother Industries Ltd 数値制御式工作機械
JP2018039068A (ja) * 2016-09-06 2018-03-15 ファナック株式会社 工具交換装置の位置補正システム及び位置補正方法
JP2020069553A (ja) * 2018-10-30 2020-05-07 ファナック株式会社 工具交換装置及び工作機械

Also Published As

Publication number Publication date
JP2024049652A (ja) 2024-04-10

Similar Documents

Publication Publication Date Title
US5974643A (en) Programmable vision-guided robotic turret-mounted tools
JP6229396B2 (ja) 数値制御装置
US11433497B2 (en) Tool magazine of machine tool
JP6322896B2 (ja) 工作機械
JP6212905B2 (ja) 工作機械
EP3919225A1 (en) Automatic tool changer and control method therefor, and machine tool including same
US5097587A (en) Numerically controlled machine tool with automatic tool exchange device and indexing device
US20230103884A1 (en) Machine tool
JPH0392235A (ja) 工作機械
WO2024070400A1 (ja) 数値制御装置、数値制御システム、制御方法、及びプログラム
US11383341B2 (en) Machining device
JP2024049649A (ja) 数値制御装置、数値制御システム、制御方法、及びプログラム
JP2009056501A (ja) 工具ホルダ交換型パンチプレス
JP7019085B1 (ja) 工作機械
JP5870796B2 (ja) 工作機械
JP2829212B2 (ja) 自動工具交換制御方法及び装置
US10977958B2 (en) Guidance display method
JPH06126474A (ja) レーザ複合加工機における制御装置
JP2576423B2 (ja) 数値制御工作機械
US20230201965A1 (en) Machine tool
JPH08174363A (ja) 工作機械
JP6970844B1 (ja) 工作機械
JP5281325B2 (ja) 加工機の制御装置及び加工機の制御方法
JPH0739069B2 (ja) 数値制御工作機械
KR20180046026A (ko) 공작기계의 자동공구교환장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23871641

Country of ref document: EP

Kind code of ref document: A1