Machine tool, method for determining workpiece diameter, and workpiece diameter determination program

The machine tool addresses the inefficiency in re-evaluating defective workpieces by using multiple detection processes to ensure accurate diameter determination, preventing misjudgment and maintaining production efficiency.

WO2026126682A1PCT designated stage Publication Date: 2026-06-18CITIZEN MASCH CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
CITIZEN MASCH CO LTD
Filing Date
2025-10-29
Publication Date
2026-06-18

AI Technical Summary

Technical Problem

Existing techniques for re-evaluating machined workpieces to prevent misjudgment of good products as defective increase the average cycle time as the number of defective workpieces increases, potentially reducing production line capacity.

Method used

A machine tool with a spindle, tool, and position sensor system that performs multiple detection processes to ensure the workpiece diameter is within a predetermined range, including re-execution of detection if necessary, and outputs an alarm when deviations are detected, thereby preventing misjudgment and maintaining production efficiency.

🎯Benefits of technology

The system effectively suppresses the increase in average cycle time due to defective workpieces, reducing misjudgment and environmental burden while maintaining production capacity by accurately determining workpiece diameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2025037986_18062026_PF_FP_ABST
    Figure JP2025037986_18062026_PF_FP_ABST
Patent Text Reader

Abstract

The purpose of the present invention is to provide a machine tool capable of suppressing an increase in average cycle time even when the number of workpieces determined as defective increases. A machine tool 1 includes: a spindle for gripping an unmachined workpiece or a machined workpiece; a tool rest for holding a tool for machining the unmachined workpiece or the machined workpiece gripped by the spindle, and a position sensor for detecting coordinates of an outer peripheral surface of the machined workpiece gripped by the spindle; and a control device for controlling the spindle and the tool rest. The control device executes an outer periphery detection process for detecting, by the position sensor, coordinates of at least three points on the outer peripheral surface of the machined workpiece machined so as to have a cross-sectional shape in which at least a part of an outer edge is arc-shaped, a separation distance calculation process for calculating separation distances which are distances between the coordinates of at least three points detected in the outer periphery detection process and predetermined center coordinates, a determination process for determining whether variation in the calculated separation distances is within a predetermined range, and an alarm output process for outputting an alarm signal indicating that the machined workpiece does not have a desired diameter when it is determined that the variation is within the predetermined range in the determination process.
Need to check novelty before this filing date? Find Prior Art

Description

Machine tool, workpiece diameter determination method, and workpiece diameter determination program 【0001】 The present disclosure relates to a machine tool, a workpiece diameter determination method, and a workpiece diameter determination program. 【0002】 When machining an unprocessed workpiece having a circular outer periphery, various techniques are known for preventing misjudgment as defective products due to chips adhering to the outer periphery and dust such as abrasive grains of the grinding wheel. For example, Patent Document 1 describes a technique for re-determining whether a machined workpiece determined to be defective is defective or not after machining the unprocessed workpiece. In the technique described in Patent Document 1, by re-determining only the machined workpieces determined to be defective, it is possible to reduce the risk of misjudging good products as defective products without reducing the production capacity of the production line. 【0003】 Japanese Patent No. 4715363 【0004】 However, since the technique described in Patent Document 1 re-determines all of the machined workpieces determined to be defective, as the number of machined workpieces determined to be defective increases, the average cycle time increases, which may reduce the production capacity of the production line. 【0005】 The present disclosure addresses such problems and aims to provide a machine tool capable of suppressing an increase in the average cycle time even when the number of machined workpieces determined to be defective increases. 【0006】The machine tool according to the present invention comprises a spindle for gripping an unprocessed or processed workpiece, a tool for processing the unprocessed or processed workpiece gripped by the spindle, a tool post for holding a position sensor for detecting the coordinates of the outer circumferential surface of the processed workpiece gripped by the spindle, and a control device for controlling the spindle and the tool post. The control device performs the following: an outer circumferential detection process in which the position sensor detects the coordinates of at least three points on the outer circumferential surface of a processed workpiece that has a cross-sectional shape in which at least a part of the outer edge is arc-shaped; a separation distance calculation process in which the distance between the coordinates of the at least three points detected in the outer circumferential detection process and a predetermined center coordinate is calculated; a determination process in which the variation in the calculated separation distance is within a predetermined range; and an alarm output process in which, when the determination process determines that the variation is within a predetermined range, an alarm signal is output indicating that the processed workpiece does not have a desired diameter. 【0007】 Furthermore, in the machine tool according to this disclosure, it is preferable that the control device re-executes the outer circumference detection process when it is determined in the determination process that the variation is not within a predetermined range. 【0008】 Furthermore, in the machine tool according to this disclosure, it is preferable that when the control device executes the outer circumference detection process again, it detects at least three coordinates that are different from the coordinates of at least three points detected in the outer circumference detection process using a position sensor. 【0009】 Furthermore, in the machine tool according to this disclosure, it is preferable that the control device further performs a workpiece rotation process to rotate the machined workpiece before performing the outer circumference detection process again. 【0010】 Furthermore, in the machine tool according to this disclosure, it is preferable that the control device further performs a cleaning process to clean the machined workpiece before performing the outer circumference detection process again. 【0011】Furthermore, in the machine tool according to the present disclosure, it is preferable that the control device further executes an execution count determination process to determine whether the number of times the outer circumference detection process has been executed again has reached a predetermined upper limit, before executing the outer circumference detection process again, and when the execution count determination process determines that the number of times the outer circumference detection process has been executed again has reached a predetermined upper limit, it executes an alarm output process. 【0012】 Furthermore, in the machine tool according to the present disclosure, the control device further performs a work diameter calculation process that calculates the diameter of the machined workpiece from the separation distance, and a first determination process that determines whether the diameter of the machined workpiece calculated by the work diameter calculation process is within the target range. Preferably, in the first determination process, the control device performs the determination process when it is determined that the separation distance calculated by the calculation process is not within the target range. 【0013】 The work diameter determination method according to this disclosure is for a machine tool having a spindle for gripping an unprocessed workpiece or a processed workpiece, a tool for processing the unprocessed workpiece or processed workpiece gripped by the spindle, a tool post for holding a position sensor for detecting the coordinates of the outer circumferential surface of the processed workpiece gripped by the spindle, and a control device for controlling the spindle and the tool post, and includes: an outer circumferential detection process for detecting the coordinates of at least three points on the outer circumferential surface of a processed workpiece processed to have a cross-sectional shape in which at least a part of the outer edge is arc-shaped using the position sensor; a separation distance calculation process for calculating a separation distance which is the distance between the coordinates of the at least three points detected in the outer circumferential detection process and a predetermined center coordinate; a determination process for determining whether the variation in the calculated separation distance is within a predetermined range; and an alarm output process for outputting an alarm signal indicating that the processed workpiece does not have a desired diameter when the determination process determines that the variation is within a predetermined range. 【0014】The work diameter determination program according to this disclosure is for a machine tool having a spindle for gripping an unprocessed or processed workpiece, a tool for processing the unprocessed or processed workpiece gripped by the spindle, a tool post for holding a position sensor for detecting the coordinates of the outer circumferential surface of the processed workpiece gripped by the spindle, and a control device for controlling the spindle and the tool post. The program causes the control device to execute the following: an outer circumferential detection process for detecting the coordinates of at least three points on the outer circumferential surface of a processed workpiece that has been processed to have a cross-sectional shape in which at least a part of the outer edge is arc-shaped using the position sensor; a separation distance calculation process for calculating a separation distance which is the distance between the coordinates of the at least three points detected in the outer circumferential detection process and a predetermined center coordinate; a determination process for determining whether the variation in the calculated separation distance is within a predetermined range; and an alarm output process for outputting an alarm signal indicating that the processed workpiece does not have a desired diameter when the determination process determines that the variation is within a predetermined range. 【0015】 The machine tool relating to this disclosure can suppress an increase in the average cycle time even when the number of processed workpieces determined to be defective increases. 【0016】 This is a perspective view of a machine tool according to an embodiment. (a) is a diagram (1) showing a movement path corresponding to movement path information, (b) is a diagram (2) showing a movement path corresponding to movement path information, and (c) is a diagram (3) showing a movement path corresponding to movement path information. This is a flowchart of a workpiece machining process performed by the machine tool shown in Figure 1. (a) is a diagram showing the state in which the touch probe is sequentially brought into contact with the outer circumferential surface of a machined workpiece that does not have a desired diameter, (b) is a diagram showing the state in which the touch probe is sequentially brought into contact with a machined workpiece with debris attached to its outer circumferential surface, and (c) is a diagram showing the state in which the touch probe is sequentially brought into contact with the outer circumferential surface of a machined workpiece with debris attached to its outer circumferential surface. This is a flowchart of a workpiece machining process according to a first modified example. This is a flowchart of a workpiece machining process according to a second modified example. This is a flowchart of a workpiece machining process according to a third modified example. 【0017】The machine tool, workpiece diameter determination method, workpiece diameter determination program, and machine tool relating to this disclosure will be described below with reference to the drawings. However, it should be noted that the technical scope of this disclosure is not limited to those embodiments, but extends to the disclosure as described in the claims and its equivalents. 【0018】 (Configuration and Function of the Machine Tool According to the Embodiment) Figure 1 is a perspective view of the machine tool according to the embodiment. 【0019】 The machine tool 1 comprises a bed 10, a front spindle 11, a rear spindle 12, a guide bushing device 13, a tool post 14, and a numerical control (NC) device 20. The machine tool 1 processes workpieces W, which are gripped by the front spindle 11 and the rear spindle 12 respectively, using a tool 40 held in the tool post 14. The bed 10 is equipped with the front spindle 11, the rear spindle 12, the guide bushing device 13, and the tool post 14. The front spindle 11 is also simply referred to as the front spindle. Workpieces W can be unprocessed workpieces before processing by the machine tool 1, partially processed workpieces, fully processed workpieces, and finished products that have been parted off. In this embodiment, partially processed workpieces and fully processed workpieces W are subject to determination as defective products, while unprocessed workpieces and finished products are excluded from the determination. Therefore, workpiece W includes, for example, partially processed workpiece W and fully processed workpiece W. Hereafter, partially processed workpiece W and fully processed workpiece W will be referred to as processed workpiece W. Also, unprocessed workpiece and processed workpiece W (partially processed workpiece and fully processed workpiece) are in the state before parting off from the cylindrical workpiece material. When a fully processed workpiece is parted off from the workpiece material by parting off, it becomes a finished product. 【0020】The front spindle 11 is a hollow member capable of gripping a cylindrical unprocessed or processed workpiece W supplied from a material feeder (not shown), and is movable in the Z1 direction by being mounted on a moving mechanism that moves along rails 15. The rear spindle 12 is a hollow member capable of gripping an unprocessed or processed workpiece W, similar to the front spindle 11, and is movable in the Z2 and X2 directions by being mounted on a moving mechanism that moves along rails 16 and 17. The guide bush device 13 supports the vicinity of the tip of the unprocessed or processed workpiece W gripped by the front spindle 11. 【0021】 The tool post 14 is movable in the X1 and Y1 directions by being mounted on a moving mechanism that holds multiple tools 40 and a touch probe 41 and moves along rails 18 and 19. The multiple tools 40 held by the tool post 14 include milling cutters, drills, taps, reamers, and cutting tools. The multiple tools 40 may be fixed tools or rotary tools. 【0022】 Multiple touch probes 41, held on the tool post 14, are also simply called probes and are contact-type position sensors that output a position signal indicating the contact location by contacting a target object such as a machined workpiece W. The touch probes 41 are used in a centering process to detect the center coordinates of the machined workpiece W, and in an outer circumference detection process to detect the coordinates of the outer circumference surface of the machined workpiece W. 【0023】The NC device 20, also called a control device, has a processing unit 20a which is a Central Processing Unit (CPU) and a storage unit 20b which includes volatile memory and non-volatile memory. The NC device 20 is electrically connected to control mechanisms such as a moving mechanism and a rotating mechanism that control the operation of the front spindle 11, the rear spindle 12, and the tool post 14, and controls the rotation and movement of the front spindle 11 and the rear spindle 12, as well as the movement of the tool post 14. Based on the workpiece machining program stored in the storage unit 20b, the NC device 20 controls the rotation and movement of the front spindle 11 and the rear spindle 12, as well as the movement of the tool post 14, to perform workpiece machining processing to machine an unmachined workpiece or to further machine a machined workpiece W. The workpiece machining program stored in the storage unit 20b includes a machining program that causes the processing unit 20a to execute machining processing to machine an unmachined workpiece or a machined workpiece W, and a detection program that causes the processing unit 20a to execute detection processing to detect the coordinates of the machined workpiece W. The NC device 20 further includes a work diameter determination program that causes the processing unit 20a to execute a work diameter determination process to determine the diameter of the processed workpiece W. The processing program, detection program, and work diameter determination program included in the work processing program may be a single program, or at least some of the processes may be superimposed. The NC device 20 uses various information stored in the storage unit 20b to execute a work processing process to process an unprocessed workpiece or a processed workpiece W. For example, the storage unit 20b stores target value information that indicates a target value for the diameter of a processed workpiece W having a processed circular cross-sectional shape. The storage unit 20b also stores a group of movement paths information that indicates multiple movement paths of the tool post 14 when it executes a process to bring the touch probe 41 held in the tool post 14 into contact with the processed workpiece W held in the front spindle 11 when detecting the coordinates of the outer circumferential surface of the processed workpiece W. The group of movement paths information includes multiple movement path information that indicates each of the multiple movement paths. 【0024】Figure 2(a) is a diagram (1) showing a movement path corresponding to the movement path information, Figure 2(b) is a diagram (2) showing a movement path corresponding to the movement path information, and Figure 2(c) is a diagram (3) showing a movement path corresponding to the movement path information. In Figures 2(a) to 2(c), the touch probe 41 is arranged such that the rod-shaped support portion 43 supporting the detection unit 42 extends in the vertical direction (X1 direction) perpendicular to the stretching direction of the processed workpiece W. However, the touch probe 41 may also be arranged such that the rod-shaped support portion 43 supporting the detection unit 42 extends parallel to the stretching direction of the processed workpiece W. 【0025】 Each of the multiple movement paths corresponding to the multiple movement path information indicates the path taken when the tool post 14 is moved to bring the touch probe 41 into contact with four points on the outer surface of the machined workpiece W. In the example of the movement path shown in Figure 2(a), the tool post 14 is moved so that the touch probe 41 is sequentially brought into contact with each of the first contact point P1 to the fourth contact point P4, which are positioned at a 36° shift relative to the center coordinate O of the front spindle 11 when viewed from one end of the machined workpiece W in the extension direction. In the example of the movement path shown in Figure 2(a), each of the first contact point P1 to the fourth contact point P4 is positioned at a 36° shift, but the shift angle between the first contact point P1 to the fourth contact point P4 may be an angle other than 36°, such as 10°. Also, the shift angles between the first contact point P1 to the fourth contact point P4 may be non-uniform. In the movement paths shown in Figures 2(b) and (c), the first contact point P1' to the fourth contact point P4' and the first contact point P1'' to the fourth contact point P4'' are positioned shifted by 36° with respect to the central coordinate O of the front principal axis 11. However, the respective shift angles may be angles other than 36°, such as 10°, and may be non-uniform. 【0026】 In the examples of movement paths shown in Figures 2(a) to 2(c), the paths are shown when the touch probe 41 is brought into contact with four points on the outer surface of the machined workpiece W. However, in each movement path, the touch probe 41 may be brought into contact with three or five or more points on the outer surface of the machined workpiece W. 【0027】In a single movement path, it is preferable that the maximum angle formed by two of the multiple contact points with respect to the central coordinate O is 180° or less. Furthermore, it is even more preferable that the maximum angle formed by two contact points with respect to the central coordinate O is 180° or less in all movement paths. 【0028】 Furthermore, it is preferable that the multiple contact points along a single movement path are shifted at a predetermined angle with respect to the central coordinate O of the front spindle 11 when viewed from one end of the machined workpiece W in the stretching direction, and that the contact points do not overlap when viewed from one end of the machined workpiece W in the stretching direction. 【0029】 In the example of the movement path shown in Figure 2(a), first, the tool post 14 moves the touch probe 41 parallel to the radial direction of the machined workpiece W to bring the touch probe 41 into contact with the first contact point P1. Next, after bringing the touch probe 41 into contact with the first contact point P1, the tool post 14 moves it parallel to the radial direction of the machined workpiece W to move the touch probe 41 away from the first contact point P1. Then, the tool post 14 moves the touch probe 41 parallel to the circumferential direction of the machined workpiece W, and then moves it parallel to the radial direction of the machined workpiece W so as not to touch the machined workpiece W to bring the touch probe 41 into contact with the second contact point P2. Thereafter, the tool post 14 moves the touch probe 41 similarly along the radial and circumferential directions of the machined workpiece W, bringing the touch probe 41 into contact with and away from the third contact point P3 and the fourth contact point P4 from a direction parallel to the radial direction of the machined workpiece W. In the movement paths shown in Figures 2(b) and (c), the tool post 14 similarly moves the touch probe 41 from the first contact point P1' to the fourth contact point P4' and from the first contact point P1'' to the fourth contact point P4'', making contact and then isolating it. Furthermore, when moving from the fourth contact point P4 to the first contact point P1', from the fourth contact point P4' to the first contact point P1'', and from the fourth contact point P4'' to the first contact point P1, the tool post 14 moves the touch probe 41 so that it does not come into contact with the machined workpiece W. 【0030】The first contact point P1' to the fourth contact point P4' included in the movement path shown in Figure 2(b) are positioned with an 18° shift relative to the first contact point P1 to the fourth contact point P4 included in the movement path shown in Figure 2(a). The first contact point P1'' to the fourth contact point P4'' included in the movement path shown in Figure 2(c) are positioned with a further 18° shift relative to the first contact point P1' to the fourth contact point P4' included in the movement path shown in Figure 2(b). Note that between the movement paths shown in Figures 2(a) to 2(c), the first to fourth contact points are set to shift sequentially by 18° each time, but the shift angle between the first to fourth contact points between the movement paths may be an angle other than 18°, such as 10°. Also, the shift angle between the first to fourth contact points between the movement paths may be non-uniform. 【0031】 (Workpiece machining process performed by a machine tool according to the embodiment) Figure 3 is a flowchart of the workpiece machining process performed by the machine tool 1. The workpiece machining process shown in Figure 3 is performed mainly by the NC device 20 in cooperation with each element of the machine tool 1, based on a workpiece machining program stored in advance in the memory unit 20b of the NC device 20. The workpiece machining process shown in Figure 2 includes the process performed in the workpiece diameter determination method according to the embodiment. 【0032】First, the NC device 20 performs a centering process to extract the center coordinates of the front spindle 11 (S101). First, the master sample is gripped by the front spindle 11. Next, the NC device 20 moves the tool post 14 to bring the touch probe 41 into contact with at least three points on the outer surface of the master sample gripped by the front spindle 11, and detects the coordinates of at least three points on the outer surface of the master sample on the X1 and Y1 coordinates. From the detected coordinates of at least three points on the outer surface of the master sample, the NC device 20 calculates the center coordinates of the master sample on the X1 and Y1 coordinates, and stores the center coordinate information indicating the calculated center coordinates in the storage unit 20b as front spindle center coordinate information indicating the center coordinates of the front spindle 11. Then, the master sample gripped by the front spindle 11 is released from the front spindle 11. Note that the centering process shown in S101 may be performed using a machined workpiece W instead of a master sample. Furthermore, if the center coordinates of the front spindle 11 are known in advance, the center coordinate information indicating the known center coordinates may be stored in the storage unit 20b as front spindle center coordinate information indicating the center coordinates of the front spindle 11, without using a master sample or a machined workpiece W. The center coordinates indicated by the front spindle center coordinate information are an example of predetermined center coordinates. 【0033】 Next, the NC device 20 performs a machining process to machine an unmachined or machined workpiece W (S102). First, the NC device 20 supplies an unmachined or machined workpiece W to the front spindle 11 from a material feeder (not shown). Next, the NC device 20 causes the front spindle 11 to grip the unmachined or machined workpiece W supplied to the front spindle 11. Next, the NC device 20 moves the tool post 14 and uses one or more tools 40 held in the tool post 14 to cut the unmachined or machined workpiece W gripped by the front spindle 11, performing a predetermined machining process to machine the unmachined or machined workpiece W to have a circular cross-sectional shape. 【0034】Next, the NC device 20 performs a process to acquire movement path information indicating multiple movement paths of the tool post 14 when it performs the process of bringing the touch probe 41 held on the tool post 14 into contact with the outer surface of the machined workpiece W when detecting the coordinates of the outer surface of the workpiece W (S103). The NC device 20 acquires one of the multiple movement path information included in the movement path group information stored in the storage unit 20b from the storage unit 20b. For example, the NC device 20 acquires movement path information indicating the movement path shown in Figure 2(a). 【0035】 Next, the NC device 20 performs an outer perimeter detection process in which the touch probe 41 detects the coordinates of at least three points, for example, four points, on the outer perimeter surface of the machined workpiece W, which has been processed to have a circular cross-sectional shape (S104). Here, the touch probe 41 does not always come into contact with the outer perimeter surface of the machined workpiece W, and may come into contact with debris or other foreign matter attached to the outer perimeter surface. 【0036】 Based on the movement path information acquired in the movement path information acquisition process shown in S103, the NC device 20 moves the tool post 14 to bring the touch probe 41 into contact with four points on the outer surface of the machined workpiece W, and detects the X1 and Y1 coordinates of the four points on the outer surface of the machined workpiece W. The NC device 20 stores the first coordinate information indicating the coordinates of the four points on the outer surface of the machined workpiece W that were detected in the storage unit 20b. 【0037】 Incidentally, the NC device 20 performs an outer perimeter detection process in which the coordinates of at least three points on the outer perimeter surface of the processed workpiece W are detected by the touch probe 41. When performing an outer perimeter detection process with three or four points, the detection time can be shortened compared to when performing an outer perimeter detection process with five or more points. On the other hand, when the NC device 20 performs an outer perimeter detection process in which the coordinates of four or five or more points are detected by the touch probe 41, the detection accuracy of good products can be further improved compared to when performing an outer perimeter detection process with three points. In order to shorten the detection time and improve the detection accuracy of good products, it is preferable for the NC device 20 to perform an outer perimeter detection process with four points. 【0038】Next, the NC device 20 performs a work diameter calculation process to calculate the diameter of the machined workpiece W (S105). The NC device 20 obtains first coordinate information from the storage unit 20b, which indicates the coordinates of four points on the outer surface of the machined workpiece W detected in the outer circumference detection process shown in S104. It selects any three points from the four points corresponding to the first coordinate information, calculates the center coordinates for work diameter calculation, which are the center coordinates of a circle passing through the coordinates of the three selected points, and calculates the radius for work diameter calculation, which is the radius of a circle passing through the coordinates of the three selected points, from the distance between the coordinates of the three selected points and the calculated center coordinates for work diameter calculation. It is possible to select any three points from four possible combinations, and a maximum of four different work diameter calculation radii can be calculated. The number of work diameter calculation radii to be calculated can be arbitrarily selected from one to four. 【0039】 If the NC device 20 has calculated two or more work diameter calculation radii, it calculates the average value of at least two of the calculated work diameter calculation radii as the diameter of the machined workpiece W. The NC device 20 stores the work diameter information indicating the calculated diameter of the machined workpiece W in the storage unit 20b. If there is only one work diameter calculation radius, the NC device 20 may use that radius as the diameter of the machined workpiece W without calculating an average value. 【0040】 Next, the NC device 20 performs a first determination process to determine whether the diameter of the machined workpiece W is within the target range (S106). The NC device 20 calculates the absolute difference between the diameter of the machined workpiece W calculated in the workpiece diameter calculation process shown in S107 and the target value corresponding to the target value information stored in the storage unit 20b. Next, the NC device 20 determines whether the calculated absolute value is less than or equal to a predetermined first determination threshold. If the calculated absolute value is not less than or equal to the first determination threshold, the NC device 20 determines that the diameter of the machined workpiece W is not within the target range (S106-NO). If the calculated absolute value is less than or equal to the first determination threshold, the NC device 20 determines that the diameter of the machined workpiece W is within the target range (S106-YES). 【0041】When the NC device 20 determines that the diameter of the machined workpiece W is not within the target range (S106 - NO), it executes a separation distance calculation process (S109) to calculate the separation distance, which is the distance between the coordinates of four points on the outer peripheral surface of the machined workpiece W and the center coordinates of the main spindle 11. The NC device 20 acquires, from the storage unit 20b, the first coordinate information stored in the outer periphery detection process shown in S104 and the main spindle center coordinate information stored in the centering process shown in S101. 【0042】 The NC device 20 calculates the separation distance, which is the distance between the coordinates of the four points corresponding to the acquired first coordinate information and the center coordinates of the main spindle 11 corresponding to the main spindle center coordinate information. The NC device 20 stores, in the storage unit 20b, the separation distance information indicating the calculated separation distances of the four points. 【0043】 Next, the NC device 20 executes a separation distance variation calculation process (S110) to calculate the variation in the separation distances of the four points. The NC device 20 calculates the difference between the maximum value and the minimum value among the separation distances of the four points. The difference between the maximum value and the minimum value among the separation distances of the four points is an example of the variation in the separation distance. 【0044】 Next, the NC device 20 executes a second determination process (S111) to determine whether the variation in the diameter, which is the variation in the separation distances of the four points on the outer peripheral surface of the detected machined workpiece W calculated by the separation distance variation calculation process shown in S110, is within a predetermined range. The NC device 20 calculates the difference between the maximum value and the minimum value among the separation distances of the four points and determines whether the difference is within an acceptable predetermined range. 【0045】 When the difference between the maximum value and the minimum value among the calculated separation distances of the four points on the outer peripheral surface of the detected machined workpiece W is within the predetermined range, the NC device 20 determines that the variation in the diameter of the calculated machined workpiece W is within the predetermined range (S111 - YES). When the difference between the maximum value and the minimum value among the separation distances of the four points is outside the predetermined range, the NC device 20 determines that the variation in the diameter of the calculated machined workpiece W is not within the predetermined range (S111 - NO). Note that the second determination process is also simply referred to as the determination process. 【0046】When the NC device 20 determines that the variation in the diameter of the machined workpiece W calculated is within a predetermined range (S111 - YES), it executes an alarm output process of outputting an alarm signal indicating that the machined workpiece W may not have a desired diameter (S112). When an alarm signal is output by the NC device 20 (S112), the workpiece machining process ends. 【0047】 When the NC device 20 determines that the variation in the diameter of the machined workpiece W calculated is not within a predetermined range (S111 - NO), it executes a movement path information re-acquisition process of acquiring movement path information different from the movement path information acquired in the process shown in S103 (S113). The NC device 20 refers to the movement path group information stored in the storage unit 20b and acquires movement path information different from the movement path information acquired in the process shown in S103 among the movement path information included in the movement path group information. For example, the NC device 20 acquires movement path information indicating the movement path shown in FIG. 2(b). 【0048】 Next, the NC device 20 executes an outer periphery detection process of detecting the coordinates of at least four points on the outer peripheral surface of the machined workpiece W by the touch probe 41 (S104). Based on the movement path information acquired in the movement path information re-acquisition process shown in S113, the NC device 20 moves the tool rest 14 to bring the touch probe 41 into contact with four points on the outer peripheral surface of the machined workpiece W, and re-detects the coordinates on the X1 coordinates and Y1 coordinates of the four points on the outer peripheral surface of the machined workpiece W. The NC device 20 stores the second coordinate information indicating the coordinates on the X1 coordinates and Y1 coordinates of the four points on the re-detected outer peripheral surface of the machined workpiece W in the storage unit 20b. 【0049】Thereafter, the outer circumference detection process shown in S104, the first determination process shown in S106, the second determination process shown in S111, and the movement path reacquisition process shown in S113 are repeated until the NC device 20 determines that the diameter of the machined workpiece W is within the target range (S106-YES). While the outer circumference detection process, the first determination process, the second determination process, and the movement path reacquisition process are repeated, the NC device 20, in the outer circumference re-detection process, brings the touch probe 41 into contact with four points on the outer circumference surface of the machined workpiece W corresponding to the different movement path information acquired in the process shown in S113, and re-detects the X1 and Y1 coordinates of the four points on the outer circumference surface of the machined workpiece W. 【0050】 When the NC device 20 determines that the diameter of the machined workpiece W is within the target range (S106-YES), it performs a parting-off process to cut off the machined workpiece W from the work material in the machining process shown in S102 (S107). The NC device 20 controls the front spindle 11 and the tool post 14 to perform the parting-off process, thereby cutting off the fully machined workpiece W from the work material and producing a finished product. 【0051】 Next, the NC device 20 performs a termination determination process to determine whether or not to terminate the workpiece processing (S108). The NC device 20 determines whether or not the number of finished products has reached the target number. If the number of finished products has reached the target number, the NC device 20 determines to terminate the workpiece processing (S108-YES). If the number of finished products has not reached the target number, the NC device 20 determines not to terminate the workpiece processing (S108-NO). 【0052】 If the NC device 20 determines that the workpiece machining process should not be terminated (S108-NO), the process returns to the machining process shown in S102. Thereafter, the machining process shown in S102 to the termination determination process shown in S108 are repeated until the NC device 20 determines that the workpiece machining process should be terminated (S108-YES). When the NC device 20 determines that the workpiece machining process should be terminated (S108-YES), the workpiece machining process is terminated. 【0053】(Effects of the machine tool according to the embodiment) The machine tool 1 determines that the machined workpiece W may not have the desired diameter only when the variation in the separation distance between the detection position of the outer diameter of the machined workpiece W and the center coordinate of the front spindle 11, as viewed from one end of the machined workpiece W in the stretching direction, is within a predetermined range. This suppresses the occurrence of misjudgments caused by the adhesion of dust to the detection position and the influence of the directional characteristics of the touch probe 41. Furthermore, when the variation in the separation distance between the detection position of the outer diameter of the machined workpiece W and the center coordinate of the front spindle 11 is outside the predetermined range, the machine tool 1 causes the touch probe 41 to detect the coordinates of different contact points on the outer circumferential surface of the machined workpiece W, thereby further suppressing the occurrence of misjudgments caused by the influence of the directional characteristics of the touch probe 41. 【0054】 Figure 4(a) shows the state in which the touch probe 41 is sequentially brought into contact with the outer circumferential surface of a machined workpiece W1 that does not have the desired diameter. Figure 4(b) shows the state in which the touch probe 41 is sequentially brought into contact with a machined workpiece W0 that has debris attached to its outer circumferential surface, and Figure 4(c) shows the state in which the touch probe 41 is sequentially brought into contact with the outer circumferential surface of a machined workpiece W0 that has debris attached to its outer circumferential surface. 【0055】 When the centers of machined workpieces W0 and W1, as viewed from one end in the extension direction of the machined workpieces W0 and W1, are approximately aligned with the center of the front spindle 11, as shown in Figure 4(a), if the touch probe 41 is sequentially brought into contact with the outer circumferential surface of machined workpiece W1, which does not have the desired diameter, the distance between the contact point of the touch probe 41 and the center of the front spindle 11 becomes the radius R1 of machined workpiece W1, since machined workpiece W1 has a circular cross-sectional shape. In the example shown in Figure 4(a), the distance between the contact point of the touch probe 41 and the center of the front spindle 11 is always the radius R1 of machined workpiece W1, and the variation in the distance between the contact point of the touch probe 41 and the center of the front spindle 11 is approximately zero. The radius R1 of machined workpiece W1 is longer than the radius R0 of the desired machined workpiece W0, and machined workpiece W1 does not have a diameter within the target range. 【0056】On the other hand, as shown in Figure 4(b), when the touch probe 41 is sequentially brought into contact with a machined workpiece W0 on which debris D is attached to its outer surface, the position where the touch probe 41 contacts the debris D rather than the outer surface of the machined workpiece W0 will be offset from the outer surface of the machined workpiece W0 according to the size of the debris D. The distance R0' between the position where the touch probe 41 contacts the debris D and the center of the front spindle 11 will be longer than the radius R0 of the machined workpiece W0 by the length LD of the debris D. In the example shown in Figure 4(b), the distance R0' between the position where the touch probe 41 contacts the debris D and the center of the front spindle 11 is longer than the radius R0 of the machined workpiece W0 by the length LD of the debris D, so the variation in the distance between the position where the touch probe 41 contacts and the center of the front spindle 11 becomes large. 【0057】 As shown in Figure 4(c), the machine tool 1 can detect the coordinates of the outer surface of the machined workpiece W0 without contacting the dust D by bringing the touch probe 41 into contact with a position different from the position shown in Figure 4(b). By detecting the coordinates of the outer surface of the machined workpiece W0 without contacting the dust D, the machine tool 1 determines that the distance between the contact point of the touch probe 41 and the center of the front spindle 11 becomes the radius R0 of the machined workpiece W0. Because the machine tool 1 detects the coordinates of the outer surface of the machined workpiece W0 without contacting the dust D, the variation in the distance between the contact point of the touch probe 41 and the center of the machined workpiece W0 is small, thus suppressing the occurrence of misjudgments caused by the adhesion of dust D. By suppressing the occurrence of misjudgments caused by the adhesion of dust D, the machine tool 1 prevents good products from being discarded as defective, reducing the environmental burden, reducing material waste, and lowering manufacturing costs. 【0058】Furthermore, after the first determination process is performed to determine whether the diameter of the machined workpiece W is within the target range, the machine tool 1 performs a second determination process to determine whether the variation in diameter, which is the variation in the separation distance between the outer circumferential surface of the machined workpiece W and the center of the front spindle 11, is within a predetermined range. In the second determination process, the machine tool 1 determines that the variation in diameter of the machined workpiece W is within the predetermined range and excludes machined workpieces W that may not have the desired diameter. Then, by performing an outer circumferential re-detection process, the machine tool 1 can prevent the coordinates of the outer circumferential surface of machined workpieces W that may not have the desired diameter from being detected multiple times. By preventing the coordinates of the outer circumferential surface of machined workpieces W that may not have the desired diameter from being detected multiple times, the machine tool 1 can prevent the occurrence of unnecessary detection processes and reduce the cycle time for manufacturing the machined workpieces W. 【0059】 (Modified examples of the machine tool according to the embodiment) The machine tool 1 processes an unprocessed workpiece or a processed workpiece W so that it has a circular cross-sectional shape. However, the machine tool according to the embodiment may process an unprocessed workpiece or a processed workpiece W having a cross-sectional shape in which at least a part of the outer edge is arc-shaped, such as a semicircular or fan-shaped shape. The machine tool according to the embodiment detects the coordinates of four points on the arc-shaped outer edge of the processed workpiece W using the touch probe 41 and executes a first determination process and a second determination process. 【0060】 Machine tool 1 performs both the first and second determination processes, but the machine tool according to this embodiment only needs to perform at least the second determination process. 【0061】 In machine tool 1, if the NC device 20 determines that the variation in the diameter of the machined workpiece W calculated in the second determination process shown in S111 is not within a predetermined range, it executes a movement path information reacquisition process to acquire movement path information different from the movement path information acquired in the process shown in S103. However, in the machine tool according to this embodiment, if the NC device 20 determines that the variation in the diameter of the machined workpiece W calculated in the second determination process shown in S111 is not within a predetermined range, instead of executing the movement path information reacquisition process, it may execute a workpiece rotation process to rotate the machined workpiece W. 【0062】 Figure 5 is a flowchart of the workpiece machining process according to the first modified example. The workpiece machining process shown in Figure 5 is mainly executed by the NC device 20 in cooperation with each element of the machine tool 1, based on a workpiece machining program that is stored in advance in the memory unit 20b of the NC device 20. 【0063】 The centering process shown in S201 to the alarm output process shown in S212 is the same as the centering process shown in S101 to the alarm output process shown in S112, so a detailed explanation is omitted here. When the NC device 20 determines that the variation in the diameter of the calculated machined workpiece W is not within a predetermined range (S211-NO), it executes a workpiece rotation process to rotate the machined workpiece W (S213). The NC device 20 controls the front spindle 11 to rotate the machined workpiece W held by the front spindle 11. Next, the process returns to the outer circumference detection process shown in S204. The NC device 20 executes the outer circumference detection process again, in which the coordinates of at least four points on the outer circumference surface of the machined workpiece W are detected by the touch probe 41 (S204). Thereafter, the outer circumference detection process shown in S204, the first determination process shown in S206, the second determination process shown in S211, and the workpiece rotation process shown in S213 are repeated until the NC device 20 determines that the diameter of the processed workpiece W is within the target range in the first determination process shown in S206 (S206-YES). 【0064】 In the workpiece machining process according to the first modified example, when the NC device 20 determines that the variation in the diameter of the calculated machined workpiece W is not within a predetermined range, it performs a workpiece rotation process to rotate the machined workpiece W, thereby bringing the touch probe 41 into contact with the outer circumferential surface of the machined workpiece W that is free of debris. In the workpiece machining process according to the first modified example, by performing a workpiece rotation process to rotate the machined workpiece W, the touch probe 41 is brought into contact with the outer circumferential surface of the machined workpiece W that is free of debris, thereby suppressing the occurrence of misjudgments caused by the influence of debris attached to the machined workpiece W. The angle at which the machined workpiece W is rotated in the workpiece rotation process may be less than 360 degrees, or it may be rotated multiple times at 360 degrees followed by a rotation of less than 360 degrees. Rotating multiple times at 360 degrees allows the centrifugal force to remove debris attached to the outer circumferential surface of the machined workpiece W. 【0065】 Furthermore, in the machine tool according to this embodiment, if the NC device 20 determines that the variation in the diameter of the machined workpiece W calculated in the second determination process shown in S211 is not within a predetermined range, it may perform a cleaning process to clean the machined workpiece W instead of performing a reacquisition process of the movement path information. 【0066】 Figure 6 is a flowchart of the workpiece machining process according to the second modified example. The workpiece machining process shown in Figure 6 is mainly executed by the NC device 20 in cooperation with each element of the machine tool 1, based on a workpiece machining program that is stored in advance in the memory unit 20b of the NC device 20. 【0067】 The centering process shown in S301 to the alarm output process shown in S312 is the same as the centering process shown in S101 to the alarm output process shown in S112, so a detailed explanation is omitted here. When the NC device 20 determines that the variation in the diameter of the calculated machined workpiece W is not within a predetermined range (S311-NO), it performs a cleaning process to clean the machined workpiece W (S313). The NC device 20 controls an air blow device (not shown) to blow air onto the surface of the machined workpiece W. Next, the process returns to the outer circumference detection process shown in S304. The NC device 20 performs the outer circumference detection process again, in which the coordinates of at least four points on the outer surface of the machined workpiece W are detected by the touch probe 41 (S304). Thereafter, the outer circumference detection process shown in S304, the first determination process shown in S306, the second determination process shown in S311, and the cleaning process shown in S313 are repeated until the NC device 20 determines that the diameter of the processed workpiece W is within the target range in the first determination process shown in S306 (S306-YES). 【0068】 In the workpiece processing process according to the second modified example, the NC device 20 can remove debris attached to the processed workpiece W by performing a cleaning process to clean the processed workpiece W when it determines that the variation in the calculated diameter of the processed workpiece W is not within a predetermined range. 【0069】Furthermore, in the machine tool 1, the NC device 20 repeats the outer circumference detection process and the movement path information reacquisition process until it determines that the diameter of the machined workpiece W is within the target range (S306-YES) after determining that the variation in the calculated diameter of the machined workpiece W is outside a predetermined range (S311-NO). However, in the machine tool according to this embodiment, the NC device 20 may count the number of times the outer circumference detection process has been executed before executing the movement path information reacquisition process, and may terminate the workpiece machining process after the outer circumference detection process and movement path information reacquisition process have been repeated up to a predetermined upper limit. 【0070】 Figure 7 is a flowchart of the workpiece machining process according to the third modified example. The workpiece machining process shown in Figure 7 is mainly executed by the NC device 20 in cooperation with each element of the machine tool 1, based on a workpiece machining program that is stored in advance in the memory unit 20b of the NC device 20. 【0071】 The centering process shown in S401 to the alarm output process shown in S412 are the same as the centering process shown in S101 to the alarm output process shown in S112, so a detailed explanation is omitted here. When the NC device 20 determines that the variation in the diameter of the calculated processed workpiece W is not within a predetermined range (S411-NO), it executes an execution count determination process to determine whether the process shown in S414 has been executed up to a predetermined upper limit (S413). The NC device 20 counts the number of times the outer circumference detection process shown in S404 has been executed and determines whether the counted number has reached the upper limit stored in the storage unit 20b. When the counted number reaches the upper limit, the NC device 20 determines that the process has been executed up to a predetermined upper limit (S413-YES). When the counted number has not reached the upper limit, the NC device 20 determines that the process has not been executed up to a predetermined upper limit (S413-NO). 【0072】 When the NC device 20 determines that it has performed the process up to a predetermined maximum number of times (S413-YES), it performs an alarm output process (S412) that outputs an alarm signal indicating that the processed workpiece W does not have the desired diameter. When the NC device 20 outputs an alarm signal (S412), the workpiece processing process is terminated. 【0073】If the NC device 20 determines that the process has not been executed for a predetermined maximum number of times (S413-NO), it executes a movement path information reacquisition process to acquire movement path information different from the movement path information acquired in the process shown in S403, similar to the process shown in S113 (S414). Next, the process returns to S404, and the NC device 20 executes an outer circumference detection process to detect the coordinates of at least four points on the outer circumference surface of the machined workpiece W using the touch probe 41 (S404). Thereafter, the outer circumference detection process shown in S404, the first determination process shown in S406, the second determination process shown in S411, the workpiece rotation process shown in S413, and the movement path information reacquisition process shown in S414 are repeated until it is determined that the diameter of the machined workpiece W is the target value (S406-YES), or it is determined that the outer circumference re-detection process has been executed for the maximum number of times (S413-YES). 【0074】 In the workpiece machining process according to the third modified example, the NC device 20 can terminate the workpiece machining process when it determines that it has performed the outer circumference re-detection process up to a predetermined upper limit number of times, thereby terminating the workpiece machining process if the machined workpiece W has a cross-sectional shape that is not circular. 【0075】 Furthermore, while the machine tool 1 detects the coordinates of four points on the outer surface of the processed workpiece W during the outer surface detection process, the machine tool according to this embodiment may detect the coordinates of three points or five or more points on the outer surface of the processed workpiece W. 【0076】 In the outer circumference detection process, the NC device 20 may, when detecting the coordinates of three points on the outer circumference of the machined workpiece W, store the coordinate information indicating the coordinates of the three detected points as first coordinate information in the storage unit 20b. In the workpiece diameter calculation process, the center coordinate of the circle passing through the coordinates of the three points may be calculated as the center coordinate for workpiece diameter calculation, and the distance between the coordinates of the three points and the center coordinate for workpiece diameter calculation may be calculated as the diameter of the machined workpiece W. 【0077】 In the outer circumference detection process, when the NC device 20 detects the coordinates of three points on the outer surface of the machined workpiece W, the separation distance calculation process may calculate three different distances between each of the three coordinates and the center coordinate of the front spindle 11 as the separation distance. 【0078】In the outer circumference detection process, the NC device 20 may, when detecting the coordinates of five or more n points on the outer circumference surface of the machined workpiece W, store the coordinate information indicating the coordinates of the n points on the outer circumference surface of the machined workpiece W detected in the storage unit 20b as first coordinate information. In the workpiece diameter calculation process, the center coordinates of a circle passing through any three of the n points may be calculated as the center coordinates for workpiece diameter calculation, and the distance between the coordinates of the three points and the center coordinates for workpiece diameter calculation may be calculated as the radius for workpiece diameter calculation. n There are 3 possible combinations to choose from, up to n C3 can calculate the radius for calculating the workpiece diameter. The number of workpiece diameter radii to be calculated is one or more. n A choice is made from C3 or fewer options. 【0079】 In the outer circumference detection process, when the NC device 20 detects the coordinates of five or more points on the outer circumference surface of the machined workpiece W, the separation distance calculation process may calculate the separation distance as the n possible distances between each of the n point coordinates and the center coordinate of the front spindle 11. 【0080】 When the NC device 20 detects the coordinates of four or more points on the outer surface of the processed workpiece W, it may calculate an approximate circle using the least squares method based on the coordinates of the four or more points, and determine the radius of that approximate circle as the diameter of the processed workpiece W. 【0081】 Furthermore, in S111, the NC device 20 determines whether the difference between the maximum and minimum values ​​of the four separation distances is within a predetermined range. However, the NC device 20 is not limited to this, and may calculate the average value of the four separation distances between the coordinates of four points corresponding to the first coordinate information acquired from the storage unit 20b and the front spindle center coordinates of the front spindle 11 calculated by the centering process in S101, and determine whether the difference between the four separation distances of the outer circumferential surface of the processed workpiece W, which were calculated by the separation distance calculation process shown in S109, and the average value is within a predetermined range. The difference from the average value of the four separation distances is an example of the variation in separation distances. 【0082】Furthermore, in S111, the NC device 20 determines whether the difference between the maximum and minimum values ​​of the four separation distances is within a predetermined range. However, the NC device 20 is not limited to this, and may calculate the standard deviation of the four separation distances between the coordinates of the four points corresponding to the first coordinate information acquired from the storage unit 20b and the front spindle center coordinates of the front spindle 11 calculated by the centering process in S101, and determine whether the standard deviation of the four separation distances is within a predetermined range. The standard deviation of the four separation distances is an example of the variation in separation distances. 【0083】 Furthermore, in the work diameter calculation process shown in S105, the NC device 20 may store the calculated center coordinates for work diameter calculation in the storage unit 20b as center coordinate information for work diameter calculation. Instead of calculating the separation distance calculated by the separation distance calculation process shown in S109, the NC device 20 may calculate the separation distance as one of four possible distances between the center coordinates for work diameter calculation, which are the center coordinates of the circle through which the three selected points pass, and the one point that was not selected from the four points. The center coordinates indicated by the center coordinate information for work diameter calculation are an example of predetermined center coordinates. 【0084】 Furthermore, in the work diameter calculation process shown in S105, if the NC device 20 overflows for reasons such as the three points being aligned in a nearly straight line when viewed from one end of the processed workpiece W in the stretching direction, the processes shown in S106 to S111 may be skipped and the process shown in S113 may be executed. 【0085】 Furthermore, while the machine tool 1 has a front spindle 11, a rear spindle 12, a guide bushing device 13, and a tool post 14, the machine tool according to this embodiment only needs to have a front spindle 11 and a tool post 14, and does not need to have a rear spindle 12 and a guide bushing device 13. 【0086】Furthermore, in the workpiece machining process according to the first modified example, after performing a workpiece rotation process to rotate the machined workpiece W, the process returns to the outer circumference detection process shown in S204. However, in the workpiece machining process according to the embodiment, after performing a workpiece rotation process to rotate the machined workpiece W, a re-acquisition process for movement path information may be performed to acquire movement path information different from the movement path information acquired in the process shown in S203. Furthermore, in the workpiece machining process according to the second modified example, after performing a cleaning process to clean the machined workpiece W, the process returns to the outer circumference detection process shown in S304. However, in the workpiece machining process according to the embodiment, after performing a cleaning process to clean the machined workpiece W, a re-acquisition process for movement path information may be performed to acquire movement path information different from the movement path information acquired in the process shown in S303. 【0087】 Furthermore, in the workpiece machining process according to the third modified example, the execution count determination process shown in S413 is performed, followed by the re-acquisition process of movement path information shown in S414. However, in the workpiece machining process according to the embodiment, at least one of a workpiece rotation process for rotating the machined workpiece W and a cleaning process for cleaning the workpiece W may be performed between the execution count determination process shown in S413 and the re-acquisition process of movement path information shown in S414. 【0088】 Furthermore, the workpiece machining process described ends when the NC device 20 determines that the variation in the diameter of the machined workpieces W is within a predetermined range. However, in the workpiece machining process according to the embodiment, if the NC device 20 determines that the variation in the diameter of the machined workpieces W is within a predetermined range, the process may continue without ending after discarding the machined workpieces W whose diameter variation is determined to be within a predetermined range. 【0089】 Furthermore, the above-described embodiment described a case in which the coordinates of four points on the outer surface of the machined workpiece W are detected by the touch probe 41. However, the invention is not limited to this, and if the center coordinates of the machined workpiece W are known in advance, the coordinates of at least three points on the outer surface of the machined workpiece W may be detected, and the dispersion distance between the coordinates of those three points and the center coordinates may be calculated to determine the dispersion distance. 【0090】 1. Machine tool 11. Front spindle (spindle) 12. Rear spindle 13. Guide bushing device 14. Tool post 20. NC device 40. Tool 41. Touch probe (position sensor)

Claims

1. A machine tool comprising: a spindle for gripping an unprocessed or processed workpiece; a tool for processing the unprocessed or processed workpiece gripped by the spindle, and a tool post for holding a position sensor for detecting the coordinates of the outer circumferential surface of the processed workpiece gripped by the spindle; and a control device for controlling the spindle and the tool post, wherein the control device performs: an outer circumferential detection process for detecting the coordinates of at least three points on the outer circumferential surface of a processed workpiece processed to have a cross-sectional shape in which at least a part of the outer edge is arc-shaped using the position sensor; a separation distance calculation process for calculating a separation distance which is the distance between the coordinates of the at least three points detected in the outer circumferential detection process and a predetermined center coordinate; a determination process for determining whether the variation in the calculated separation distance is within a predetermined range; and an alarm output process for outputting an alarm signal indicating that the processed workpiece does not have a desired diameter when the determination process determines that the variation is within a predetermined range.

2. The machine tool according to claim 1, wherein the control device, in the determination process, determines that the variation is not within the predetermined range, and then performs the outer circumference detection process again.

3. The machine tool according to claim 2, wherein when the control device executes the outer circumference detection process again, it detects the coordinates of at least three points that are different from the coordinates of the at least three points detected in the outer circumference detection process using the position sensor.

4. The machine tool according to claim 2, wherein the control device further performs a workpiece rotation process to rotate the machined workpiece before performing the outer circumference detection process again.

5. The machine tool according to claim 2, wherein the control device further performs a cleaning process to clean the machined workpiece before performing the outer circumference detection process again.

6. The machine tool according to claim 2, wherein the control device further performs an execution count determination process to determine whether the number of times the outer perimeter detection process has been executed again has reached a predetermined upper limit, and when the execution count determination process determines that the number of times the outer perimeter detection process has been executed again has reached a predetermined upper limit, the control device performs the alarm output process.

7. The machine tool according to any one of claims 1 to 6, wherein the control device further performs a work diameter calculation process for calculating the diameter of the machined work from the separation distance, and a first determination process for determining whether the diameter of the machined work calculated by the work diameter calculation process is within a target range, and the control device performs the determination process when it determines in the first determination process that the separation distance calculated by the separation distance calculation process is not within a target range.

8. A machine tool comprising: a spindle for gripping an unprocessed workpiece or a processed workpiece; a tool for processing the unprocessed workpiece or the processed workpiece gripped by the spindle; a tool post for holding a position sensor for detecting the coordinates of the outer circumferential surface of the processed workpiece gripped by the spindle; and a control device for controlling the spindle and the tool post, the method for determining a workpiece diameter, comprising: an outer circumferential detection process for detecting the coordinates of at least three points on the outer circumferential surface of a processed workpiece processed to have a cross-sectional shape in which at least a part of the outer edge is arc-shaped using the position sensor; a separation distance calculation process for calculating a separation distance which is the distance between the coordinates of the at least three points detected in the outer circumferential detection process and a predetermined center coordinate; a determination process for determining whether the variation in the calculated separation distance is within a predetermined range; and an alarm output process for outputting an alarm signal indicating that the processed workpiece does not have a desired diameter when the determination process determines that the variation is within a predetermined range.

9. A machine tool comprising: a spindle for gripping an unprocessed or processed workpiece; a tool for processing the unprocessed or processed workpiece gripped by the spindle; a tool post for holding a position sensor for detecting the coordinates of the outer circumferential surface of the processed workpiece gripped by the spindle; and a control device for controlling the spindle and the tool post, wherein the control device is configured to execute: an outer circumferential detection process for detecting the coordinates of at least three points on the outer circumferential surface of the processed workpiece, which has been processed to have a cross-sectional shape in which at least a part of the outer edge is arc-shaped, using the position sensor; a separation distance calculation process for calculating a separation distance which is the distance between the coordinates of the at least three points detected in the outer circumferential detection process and a predetermined center coordinate; a determination process for determining whether the variation in the calculated separation distance is within a predetermined range; and an alarm output process for outputting an alarm signal indicating that the processed workpiece does not have a desired diameter when the determination process determines that the variation is within a predetermined range.