Origin detection method for machine tools and tool magazines

By using distance sensors and control devices in the tool library to automatically detect the origin position of the rotating part, the problem of difficulty in high-precision operation in the existing technology is solved, and efficient and automated origin position detection and reset are achieved.

CN111376106BActive Publication Date: 2024-09-24FANUC LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911330505.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-12-26
Filing Date
2019-12-20
Publication Date
2024-09-24
Estimated Expiration
2039-12-20

AI Technical Summary

Technical Problem

In the existing technology, the origin position detection of the tool library requires high-precision operation, which results in a heavy burden on the operator and relies on manual measurement, which is inefficient.

Method used

An origin detection device including a rotating part, a sensor and a control part is used. The distance sensor is used to detect the distance between the measuring surfaces of the rotating part, and the origin position of the rotating part is automatically detected and reset. The rotating motor and control device are used to realize automatic operation.

Benefits of technology

It realizes high-precision automatic detection and reset of the origin position of the tool library, reduces the operator's manual operation burden, and improves detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111376106B_ABST
    Figure CN111376106B_ABST
Patent Text Reader

Abstract

The present invention relates to a machine tool, comprising: a tool magazine having a rotating part and a measured part (11b), wherein the rotating part can hold a plurality of tools and rotate around a predetermined rotation axis, and the measured part (11b) is arranged on the rotating part; a sensor (21) is arranged on the outer side of the rotating part along a radial direction orthogonal to the rotation axis and detects the measured part (11b); and a control part (22) detects the origin position of the rotating part based on the detection result of the sensor (21). The present invention also relates to an origin detection method of a tool magazine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an origin detection method for a machine tool and a tool library. Background Art

[0002] Conventionally, there is known a machine tool that includes a tool magazine storing a plurality of tools and has a function of automatically replacing a tool mounted on a spindle (for example, refer to Patent Documents 1 to 3).

[0003] Prior art literature

[0004] Patent Literature

[0005] Patent Document 1: Japanese Utility Model Application Laid-Open No. 05-49307

[0006] Patent Document 2: Japanese Utility Model Application Publication No. 63-154145, Patent Publication No.

[0007] Patent Document 3: Japanese Patent Application Publication No. 2003-334742 Summary of the invention

[0008] Problems to be solved by the invention

[0009] In a rotary tool magazine that rotates multiple tools around a rotation axis, after the motor for rotating the tool magazine is replaced or the tool magazine is repaired, in order to establish a correlation between the rotation position of the tool magazine and the rotation position of the motor, an operation of detecting the origin position of the tool magazine is required. In order to perform this operation, a reference plane is provided on the tool magazine. The operator uses a dial gauge to measure the inclination of the reference plane, and detects the rotation position of the tool magazine when the inclination of the reference plane is at a predetermined angle (for example, horizontal) as the origin position. In order to detect the origin position of the tool magazine, a high accuracy of, for example, 0.1° or 0.01° is required. Such operations requiring high precision become a burden on the operator.

[0010] Solutions for solving problems

[0011] One aspect of the present invention is a machine tool, comprising: a tool magazine having a rotating part and a measured part, wherein the rotating part is capable of holding a plurality of tools and rotating around a predetermined rotation axis, and the measured part is arranged on the rotating part; a sensor, which is arranged on the outside of the rotating part along a radial direction orthogonal to the rotation axis and detects the measured part; and a control part, which detects the origin position of the rotating part based on the detection result of the sensor. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 This is a schematic front view of a machine tool according to one embodiment of the present invention.

[0013] Figure 2 for Figure 1 Schematic side view of the machine tool.

[0014] Figure 3 for Figure 1 A schematic front view of the rotating part of the tool magazine of a machine tool.

[0015] Figure 4 for Figure 3 An enlarged view of the vicinity of the measuring surface of the rotating part.

[0016] Figure 5 for Figure 1 This is a structural diagram of the origin detection device of the machine tool.

[0017] Figure 6 It is a partial front view of the rotating plate showing a modified example of the measuring surface.

[0018] Figure 7 To express Figure 5 A diagram showing the configuration of a distance sensor in a modified example of an origin detection device.

[0019] Figure 8 It is a front view of a rotating plate showing another modified example of the measuring surface. DETAILED DESCRIPTION

[0020] Hereinafter, a machine tool 1 according to an embodiment of the present invention will be described with reference to the drawings.

[0021] like Figure 1 and Figure 2 As shown, the machine tool 1 according to the present embodiment includes: a rotary tool magazine 3, which stores a plurality of tools 2; and a spindle 4, which selects and holds one of the plurality of tools 2 stored in the tool magazine 3. The spindle 4 and the tool magazine 3 are supported by the upper end of a column 6, and the column 6 is fixed to a base 5 and extends vertically upward from the base 5. The workpiece W is fixed to a workbench 7, and the workbench 7 is placed on the base 5.

[0022] The machine tool 1 rotates the spindle 4 around the long axis of the spindle 4 by a spindle motor (not shown), and moves the table 7 and the spindle 4 relative to each other by a conveying motor (not shown). As a result, the workpiece W and the rotating tool 2 move relative to each other, and the workpiece W is processed by the rotating tool 2.

[0023] Furthermore, the machine tool 1 has a function of automatically exchanging the tool 2 between the tool magazine 3 and the spindle 4 .

[0024] The tool magazine 3 includes: a rotating part 8 (refer to Figure 3), which holds the plurality of tools 2 and rotates them around the rotation axis A; a fixing portion 9, which is fixed to the column 6 and supports the rotating portion 8 so that it can rotate; and a rotating motor 10, which is provided on the rotating portion 8 and rotates the rotating portion 8. The rotating motor 10 can rotate the rotating portion 8 around the rotation axis A in two directions (clockwise and counterclockwise).

[0025] like Figure 3 As shown, the rotating part 8 includes: a circular rotating plate 11; and a plurality of tool holding parts 12, which are fixed to the rotating plate 11 and respectively hold the tool 2. The rotating axis A extends in a direction intersecting the vertical direction and is consistent with the central axis of the rotating plate 11. The plurality of tool holding parts 12 are arranged in the circumferential direction around the rotating axis A. Through the rotation of the rotating part 8, the plurality of tool holding parts 12 are selectively positioned at a predetermined tool replacement position. The machine tool 1 replaces the tool 2 held by the spindle 4 by replacing the tool 2 between the tool holding part 12 at the tool replacement position and the spindle 4.

[0026] The rotating plate 11 has an annular outer peripheral surface facing outward in the radial direction. The outer peripheral surface is composed of a curved surface 11a and a flat measuring surface (measured portion) 11b, wherein the curved surface 11a has a constant curvature radius with the rotation axis A as the center of curvature, and the measuring surface 11b connects the two ends of the curved surface 11a. In the front view of the rotating plate 11 observed along the direction of the rotation axis A, the measuring surface 11b is arranged along the chord of the circle centered on the rotation axis A, and the distance from the measuring surface 11b to the rotation axis A gradually changes in the circumferential direction around the rotation axis A.

[0027] When the rotating part 8 is arranged at the origin position, the measuring surface 11b is arranged on a predetermined side along a predetermined direction. The origin position is a predetermined rotation position around the rotation axis A. When the rotating part 8 is arranged at the origin position, the rotation angle of the rotating part 8 around the rotation axis A is defined as 0°. In this embodiment, Figure 3 and Figure 4 As shown, when the rotating unit 8 is arranged at the origin position, the measuring surface 11 is arranged horizontally at the lower side.

[0028] In addition, the position and orientation of the measuring surface 11b when the rotating unit 8 is arranged at the origin position can be appropriately changed. For example, when the rotating unit 8 is arranged at the origin position, the measuring surface 11b can also be arranged horizontally on the upper side or vertically on either side in the horizontal direction.

[0029] In addition, if Figure 5As shown, the machine tool 1 has an origin detection device 20 for detecting the origin position of the rotating part 8. The origin detection device 20 includes: a single sensor 21, which is arranged outside the rotating part 8 in the radial direction and detects the measuring surface 11b; and a control unit 22, which controls the rotating part 8 and the sensor 21. The origin detection device 20 can be always set on the machine tool 1, or it can be installed on the machine tool 1 only when the rotating part 8 performs the origin detection operation.

[0030] The sensor 21 is a distance sensor that measures the distance to the measuring surface 11b. The distance sensor 21 is, for example, an optical distance sensor that emits a laser toward the measuring surface 11b and calculates the distance based on the time until the laser reflected by the measuring surface 11b returns. Other types of distance sensors 21 may also be used. The distance sensor 21 is positioned opposite to the measuring surface 11b of the rotating part 8 arranged at the origin position, and is fixed to a structure that does not move during the process of rotating the rotating part 8 by the rotating motor 10. The structure is, for example, the fixing part 9, the column 6, or the floor on which the machine tool 1 is installed.

[0031] The origin detection device 20 further includes a fixture 23, which can be mounted on or removed from the tool magazine 3, and the distance sensor 21 can be mounted at a predetermined position relative to the rotating part 8 of the tool magazine 3 in a predetermined posture by the fixture 23. The fixture 23 is mounted and removed from a structure arranged below the rotating part 8, for example.

[0032] The distance measured by the distance sensor 21 changes according to the rotational position of the rotating part 8. That is, when the curved surface 11a is opposite to the distance sensor 21, the measured distance becomes a predetermined constant value. When the measuring surface 11b is opposite to the distance sensor 21, the measured distance is larger than the predetermined constant value and changes continuously according to the rotational position of the rotating part 8. Then, when the rotational position of the rotating part 8 is at the origin position, the measured distance is the largest. Therefore, the distance sensor 21 can detect the measuring surface 11b based on the measured distance. Further, the rotational position of the rotating part 8 can be determined based on the distance to the measuring surface 11b measured by the distance sensor 21.

[0033] The control unit 22 includes a processor 22a and a storage device 22b such as a RAM and a ROM. The storage device 22b stores an origin detection program 22c. The processor 22a of the control unit 22 performs control and calculation processing on the rotating electric machine 10 and the distance sensor 21 according to the origin detection program 22c, thereby performing an origin detection operation of the rotating unit 8. The origin detection operation is performed based on the instruction of the operator after, for example, the rotating electric machine 10 is replaced or the tool magazine 3 is repaired.

[0034] The control unit 22 of the origin detection device 20 may be a control device (not shown) that controls the entire machine tool 1 , or may be a control device that is provided separately from the control device of the machine tool 1 .

[0035] Next, the origin detection operation (origin detection method) of the tool magazine 3 by the control unit 22 will be described.

[0036] The control unit 22 controls the rotating unit 8 to rotate by controlling the rotating motor 10, while causing the distance sensor 21 to perform distance measurement. The control unit 22 controls the rotation direction of the rotating unit 8 according to the change of the distance measured by the distance sensor 21 over time. Specifically, the control unit 22 maintains the rotation direction of the rotating unit 8 in the clockwise direction when the measured distance does not change over time. In addition, the control unit 22 maintains the rotation direction of the rotating unit 8 in the clockwise direction when the measured distance increases over time. On the other hand, the control unit 22 flips the rotation direction of the rotating unit 8 to the counterclockwise direction when the measured distance decreases over time. Thus, the rotation direction of the rotating unit 8 is controlled to be a direction close to the origin position along the rotation position of the rotating unit 8.

[0037] When the distance measured by the distance sensor 21 is greater than or equal to a predetermined threshold value (within a predetermined range), the control unit 22 detects the rotation position of the rotating unit 8 at that time point and uses it as the origin position. The predetermined threshold value is a value slightly smaller than the distance measured when the rotation position of the rotating unit 8 coincides with the origin position, and is set according to the required detection accuracy of the origin position.

[0038] Next, the control unit 22 stops the rotating unit 8 at the detected origin position, thereby returning the rotating unit 8 to the origin position.

[0039] When the rotating unit 8 is reset to the origin, the correspondence between the rotation angle of the rotating unit 8 and the rotation angle of the rotary motor 10 is stored in the control device of the machine tool 1. The control device controls the rotation angle of the rotating unit 8 through the rotary motor 10 based on the stored correspondence.

[0040] As described above, according to the present embodiment, the origin position of the rotating unit 8 is automatically detected based on the distance to the measuring surface 11b of the rotating unit 8 measured by the distance sensor 21, and the rotating unit 8 is automatically reset to the origin position. Therefore, there is an advantage that the complicated origin detection operation of the rotating unit 8, which has been dependent on manual operation by the operator in the past, can be automated.

[0041] In addition, since the measuring surface 11b is a flat surface, the measured distance gradually increases as the rotation position of the rotating unit 8 approaches the origin position, and the measured distance is the largest when the rotation position of the rotating unit 8 coincides with the origin position. Therefore, there is an advantage that the origin position of the rotating unit 8 can be detected with high accuracy based on the distance measured by the distance sensor 21.

[0042] In addition, during the rotation of the rotating part 8, the distance measured by the distance sensor 21 gradually changes, and according to the change of the distance to the measuring surface 11b over time, it can be known whether the rotating part 8 rotates in a direction close to the origin position or in a direction away from the origin position. Therefore, the control unit 22 can control the rotation direction of the rotating part 8 and make it rotate in a direction close to the origin position according to the change of the distance measured over time during the rotation of the rotating part 8, so that the rotation position of the rotating part 8 can reach the origin position quickly and reliably.

[0043] In the above embodiment, the measuring surface 11b may also have a shape such that when the rotating unit 8 is arranged at the origin position, the distance measured by the distance sensor 21 is the smallest. Figure 6 As shown, the measuring surface 11b may be V-shaped protruding outward in the radial direction.

[0044] In this case, the distance measured by the distance sensor 21 gradually decreases as the rotation position of the rotating unit 8 approaches the origin position, and becomes the minimum when the rotation position of the rotating unit 8 coincides with the origin position. Therefore, the control unit 22 maintains the rotation direction of the rotating unit 8 when the measured distance decreases over time, and reverses the rotation direction of the rotating unit 8 when the measured distance increases over time. In addition, when the distance measured by the distance sensor 21 is less than a predetermined threshold value (within a predetermined range), the control unit 22 detects the rotation position of the rotating unit 8 at that time point and uses it as the origin position.

[0045] In the above embodiment, the origin detection device 20 has only one distance sensor 21, but instead, Figure 7 As shown, it can also be arranged around the rotating plate 11. Figure 7 , a case where two distance sensors 21A and 21B are provided is shown as an example. The two distance sensors 21A and 21B are arranged in a direction parallel to a radial direction orthogonal to the rotation axis A and are spaced apart from each other. The origin detection device 20 may include three or more distance sensors 21 .

[0046] The two distance sensors 21A and 21B are arranged horizontally in a direction parallel to the measurement plane 11b when the rotating unit 8 is arranged at the origin. Therefore, when the rotating unit 8 is arranged at the origin, the distances measured by the two distance sensors 21A and 21B are equal.

[0047] The control unit 22 detects the rotation position of the rotating unit 8 when the distances measured by the two distance sensors 21A and 21B are equal to or larger than a predetermined threshold value, and uses the detected rotation position as the origin position.

[0048] As described above, by using the distances measured by the two distance sensors 21A and 21B, the origin position of the rotating unit 8 can be detected with high accuracy.

[0049] When the difference in distances measured by the two distance sensors 21A and 21B is less than a predetermined value, the control unit 22 preferably detects the rotation position of the rotating unit 8 when the difference in distances is zero (i.e., the distances measured by the two distance sensors 21A and 21B are equal to each other) and uses it as the origin position.

[0050] Even in this case, the origin position of the rotating unit 8 can be detected with high accuracy.

[0051] Alternatively, the control unit 22 may detect the rotation position of the rotating unit 8 when the distances measured by the two distance sensors 21A and 21B are respectively greater than or equal to a predetermined threshold and the difference between the distances measured by the two distance sensors 21A and 21B is less than or equal to a predetermined value, and use it as the origin position.

[0052] As described above, by detecting the rotation position of the rotating unit 8 when the distances measured by the two distance sensors 21A and 21B satisfy the two conditions and setting the detection result as the origin position, the origin position can be detected with higher accuracy.

[0053] exist Figure 7 In a modified example, the control unit 22 may detect the origin position of the rotating unit 8 based on the distance measured by the two distance sensors 21A and 21B.

[0054] The control unit 22 calculates the inclination angle of the measuring surface 11b relative to the horizontal direction based on the difference in distances measured by the distance sensors 21A and 21B and the distance in the horizontal direction between the distance sensors 21A and 21B. The distance between the distance sensors 21A and 21B is a known value and is pre-stored in the storage device 22b of the control unit 22. The inclination angle of the measuring surface 11b changes according to the offset angle between the rotation position of the rotating unit 8 and the origin position. Therefore, the control unit 22 can detect the origin position of the rotating unit 8 based on the calculated inclination angle. The control unit 22 calculates the offset angle of the rotating unit 8 relative to the origin position, and rotates the rotating unit 8 in a direction close to the origin position by an amount corresponding to the calculated offset angle, thereby resetting the rotating unit 8 to the origin position.

[0055] As described above, the origin position of the rotating unit 8 can be detected and the rotating unit 8 can be reset to the origin position using only two distances measured at one rotational position. Therefore, compared with the case where the distances are measured at many rotational positions while the rotating unit 8 is rotated, the origin position of the rotating unit 8 can be detected and reset to the origin position more quickly with simpler processing.

[0056] When the origin detection device 20 has two distance sensors 21A and 21B, as shown in FIG. Figure 8 As shown, measuring surfaces 11 c and 11 d are provided at two locations in the circumferential direction of the rotating portion 8 .

[0057] Each measuring surface 11c, 11d is the same as the measuring surface 11b, and is a flat surface arranged in the horizontal direction when the rotating unit 8 is arranged at the origin position. The two distance sensors 21A, 21B are positioned relative to the rotating unit 8 in such a manner that when the rotating unit 8 is arranged at the origin position, the distance sensor 21A on one side faces the measuring surface 11c on one side, and the distance sensor 21B on the other side faces the measuring surface 11d on the other side.

[0058] When the rotating unit 8 is arranged at the origin position, the vertical heights of the two measuring surfaces 11 c and 11 d may be the same as or different from each other.

[0059] When the heights of the two measuring surfaces 11c and 11d in the vertical direction are the same, the control unit 22 detects the rotation position of the rotating unit 8 and uses it as the origin position when the distances measured by the two distance sensors 21A and 21B are respectively above a predetermined threshold value or / and when the difference between the distances measured by the two distance sensors 21 is below a predetermined value.

[0060] On the other hand, when the heights of the two measuring surfaces 11c and 11d in the vertical direction are different from each other, the control unit 22 can detect the rotation position of the rotating unit 8 and use it as the origin position when the distances measured by the two distance sensors 21A and 21B are respectively greater than predetermined thresholds. The predetermined threshold for the distance measured by the distance sensor 21A on one side and the predetermined threshold for the distance measured by the distance sensor 21B on the other side are different values.

[0061] In the above embodiment, the measuring surface 11b is provided on the rotating plate 11, but it may be provided on other members constituting the rotating portion 8 instead. For example, the measuring surface 11b may be provided on any one of the tool holding portions 12, or may be provided on any member fixed to the rotating plate 11. In addition, the position of the distance sensor 21 may be changed according to the position of the measuring surface 11b.

[0062] In the above embodiment, the measured portion is the measuring surface 11 b provided on the rotating portion 8 , and the sensor is the distance sensor 21 that measures the distance to the measuring surface 11 b . However, the specific configurations of the measured portion and the sensor are not limited thereto.

[0063] For example, the measured part may be a mark provided on the rotating part 8, and the sensor may be a proximity sensor for detecting the mark. The mark is fixed to the rotating part 8 at a position radially separated from the rotating axis A. Therefore, the position of the mark in the circumferential direction around the rotating axis A changes according to the rotation position of the rotating part 8. The proximity sensor is configured to detect the mark closest to the proximity sensor when the rotating part 8 is configured at a predetermined rotation position (for example, the origin position). The relationship between the predetermined rotation position and the origin position is known. The control unit 22 can detect the origin position based on the rotation position of the rotating part 8 when the mark is detected by the proximity sensor.

[0064] Description of Reference Numerals

[0065] 1: Machine tools

[0066] 2: Tools

[0067] 3: Tool Library

[0068] 8: Rotating part

[0069] 9: Fixed part

[0070] 11b, 11c, 11d: Measuring surface (measured part)

[0071] 12: Tool holding part

[0072] 21: Distance sensor (sensor)

[0073] 22: Control Department

[0074] 23: Fixture

[0075] A: Rotation axis

Claims

1. A machine tool, characterized in that: include: A tool magazine having a rotating part and a measured part, wherein the rotating part can hold a plurality of tools and has a rotating plate that rotates around a predetermined rotation axis, and the measured part is arranged on the rotating part; a sensor disposed outside the rotating portion in a radial direction orthogonal to the rotating axis and detecting the measured portion; and a control unit that detects an origin position of the rotating unit based on a detection result of the sensor; The measured portion is a measuring surface facing outward in the radial direction relative to the rotation axis, the measuring surface has a shape in which the distance to the predetermined rotation axis gradually changes along the circumferential direction around the predetermined rotation axis, and constitutes a part of the annular outer peripheral surface of the rotating plate; The sensor is a distance sensor for measuring the distance to the measuring surface; The control unit causes the distance sensor to measure the distance to the measurement surface while rotating the rotating unit, and detects the rotation position of the rotating unit around the rotation axis when the measured distance is within a predetermined range as the origin position; The control unit controls the rotation direction of the rotating unit according to the change of the measured distance over time; The measuring surface has a shape in which the distance measured by the distance sensor is minimized when the rotating unit is arranged at the origin position. The control unit is configured as follows: maintaining the rotational direction of the rotating portion while the measured distance decreases over time, The rotation direction of the rotating part is reversed when the measured distance increases over time.

2. The machine tool according to claim 1, characterized in that: comprising a fixture, the fixture being installable to or removable from the tool magazine, The sensor is installed at a predetermined position relative to the tool magazine in a predetermined posture by the fixture.

3. A machine tool, characterized in that: include: A tool magazine having a rotating part and a measured part, wherein the rotating part can hold a plurality of tools and has a rotating plate that rotates around a predetermined rotation axis, and the measured part is arranged on the rotating part; a sensor disposed outside the rotating portion in a radial direction orthogonal to the rotating axis and detecting the measured portion; and a control unit that detects an origin position of the rotating unit based on a detection result of the sensor; The measured portion is a measuring surface facing outward in the radial direction relative to the rotation axis, the measuring surface has a shape in which the distance to the predetermined rotation axis gradually changes along the circumferential direction around the predetermined rotation axis, and constitutes a part of the annular outer peripheral surface of the rotating plate; The sensor is a distance sensor for measuring the distance to the measuring surface; The control unit causes the distance sensor to measure the distance to the measurement surface while rotating the rotating unit, and detects the rotation position of the rotating unit around the rotation axis when the measured distance is within a predetermined range as the origin position; The control unit controls the rotation direction of the rotating unit according to the change of the measured distance over time; The measuring surface has a shape in which the distance measured by the distance sensor is maximized when the rotating unit is arranged at the origin position. The control unit is configured as follows: maintaining the rotational direction of the rotating portion while the measured distance increases over time, The rotation direction of the rotating part is reversed when the measured distance decreases over time.

4. The machine tool according to claim 3, characterized in that: comprising a fixture, the fixture being installable to or removable from the tool magazine, The sensor is installed at a predetermined position relative to the tool magazine in a predetermined posture by the fixture.

5. A machine tool, characterized in that: include: A tool magazine having a rotating part and a measured part, wherein the rotating part can hold a plurality of tools and has a rotating plate that rotates around a predetermined rotation axis, and the measured part is arranged on the rotating part; a sensor disposed outside the rotating portion in a radial direction orthogonal to the rotating axis and detecting the measured portion; and a control unit that detects an origin position of the rotating unit based on a detection result of the sensor; The measured portion is a measuring surface facing outward in the radial direction relative to the rotation axis, the measuring surface has a shape in which the distance to the predetermined rotation axis gradually changes along the circumferential direction around the predetermined rotation axis, and constitutes a part of the annular outer peripheral surface of the rotating plate; The sensor is a distance sensor for measuring the distance to the measuring surface; The control unit causes the distance sensor to measure the distance to the measurement surface while rotating the rotating unit, and detects the rotation position of the rotating unit around the rotation axis when the measured distance is within a predetermined range as the origin position; comprising two distance sensors, the two distance sensors being arranged in a direction parallel to the radial direction and spaced apart from each other, The control unit detects, as the origin position, a rotation position of the rotating unit at which the distances measured by the two distance sensors are respectively within the predetermined range.

6. The machine tool according to claim 5, characterized in that: The measuring surface is a flat surface arranged along a chord of a circle centered on the predetermined rotation axis. The two distance sensors are arranged so as to be aligned along a direction parallel to the measurement plane when the rotating unit is arranged at the origin position. The control unit is configured as follows: The offset angle of the rotating part relative to the origin position is calculated based on the distance to the measurement surface measured by the two distance sensors, and the rotating part is rotated by an amount corresponding to the calculated offset angle.

7. The machine tool according to claim 5, characterized in that: The measuring surface is a flat surface arranged along a chord of a circle centered on the predetermined rotation axis. The two distance sensors are arranged so as to be aligned along a direction parallel to the measurement plane when the rotating unit is arranged at the origin position. The control section detects a position at which distances measured by the two distance sensors are equal to each other as the origin position.

8. The machine tool according to any one of claims 5 to 7, characterized in that comprising a fixture, the fixture being installable to or removable from the tool magazine, The sensor is installed at a predetermined position relative to the tool magazine in a predetermined posture by the fixture.

9. A method for detecting the origin of a tool magazine, used for detecting the origin position of a rotary tool magazine of a machine tool, characterized in that: The tool magazine includes a rotating part and a measured part, wherein the rotating part can hold a plurality of tools and has a rotating plate that rotates around a predetermined rotation axis, and the measured part is arranged on the rotating part. In the origin detection method of the tool library: The measured portion is a measuring surface facing radially outward of the rotating axis relative to the rotating axis, the measuring surface has a shape in which the distance to the predetermined rotating axis gradually changes along the circumferential direction around the predetermined rotating axis, and constitutes a part of the annular outer peripheral surface of the rotating plate; Detecting the measured part by a distance sensor, and detecting the origin position of the rotating part based on the detection result of the distance sensor, wherein the distance sensor is arranged outside the rotating part along a radial direction orthogonal to the rotating axis and measures the distance to the measuring surface; wherein, while the rotating unit is rotated, the distance sensor is caused to measure the distance to the measuring surface, and the rotation position of the rotating unit around the rotation axis where the measured distance is within a predetermined range is detected as the origin position; controlling the rotation direction of the rotating part according to the change of the measured distance over time; The measuring surface has a shape in which the distance measured by the distance sensor is minimized when the rotating unit is arranged at the origin position. maintaining the rotational direction of the rotating portion while the measured distance decreases over time, The rotation direction of the rotating part is reversed when the measured distance increases over time.

10. A method for detecting the origin of a tool magazine, used for detecting the origin position of a rotary tool magazine of a machine tool, characterized in that: The tool magazine includes a rotating part and a measured part, wherein the rotating part can hold a plurality of tools and has a rotating plate that rotates around a predetermined rotation axis, and the measured part is arranged on the rotating part. In the origin detection method of the tool library: The measured portion is a measuring surface facing radially outward of the rotating axis relative to the rotating axis, the measuring surface has a shape in which the distance to the predetermined rotating axis gradually changes along the circumferential direction around the predetermined rotating axis, and constitutes a part of the annular outer peripheral surface of the rotating plate; Detecting the measured part by a distance sensor, and detecting the origin position of the rotating part based on the detection result of the distance sensor, wherein the distance sensor is arranged outside the rotating part along a radial direction orthogonal to the rotating axis and measures the distance to the measuring surface; wherein, while the rotating unit is rotated, the distance sensor is caused to measure the distance to the measuring surface, and the rotation position of the rotating unit around the rotation axis where the measured distance is within a predetermined range is detected as the origin position; controlling the rotation direction of the rotating part according to the change of the measured distance over time; The measuring surface has a shape in which the distance measured by the distance sensor is maximized when the rotating unit is arranged at the origin position. maintaining the rotational direction of the rotating portion while the measured distance increases over time, The rotation direction of the rotating part is reversed when the measured distance decreases over time.

11. A method for detecting the origin of a tool magazine, used for detecting the origin position of a rotary tool magazine of a machine tool, characterized in that: The tool magazine includes a rotating part and a measured part, wherein the rotating part can hold a plurality of tools and has a rotating plate that rotates around a predetermined rotation axis, and the measured part is arranged on the rotating part. In the origin detection method of the tool library: The measured portion is a measuring surface facing radially outward of the rotating axis relative to the rotating axis, the measuring surface has a shape in which the distance to the predetermined rotating axis gradually changes along the circumferential direction around the predetermined rotating axis, and constitutes a part of the annular outer peripheral surface of the rotating plate; Detecting the measured part by a distance sensor, and detecting the origin position of the rotating part based on the detection result of the distance sensor, wherein the distance sensor is arranged outside the rotating part along a radial direction orthogonal to the rotating axis and measures the distance to the measuring surface; wherein, while the rotating unit is rotated, the distance sensor is caused to measure the distance to the measuring surface, and the rotation position of the rotating unit around the rotation axis where the measured distance is within a predetermined range is detected as the origin position; comprising two distance sensors, the two distance sensors being arranged in a direction parallel to the radial direction and spaced apart from each other, The rotation position of the rotating part at which the distances measured by the two distance sensors are respectively within the predetermined range is detected as the origin position.