Control device, machining path generating method, computer program and storage medium
The control device optimizes machining path generation by detecting contact, acquiring coordinates, and controlling movements to reduce operations and time, maintaining accuracy by limiting movements along predetermined shapes, addressing precision and time efficiency in machining path generation.
Patent Information
- Application Number
- JP2023108884
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2025-01-17
AI Technical Summary
Existing machining path generation methods face challenges in maintaining precision while reducing the time required for path generation, particularly when the predetermined distance is short.
A control device and method that includes contact detection, coordinate acquisition, and controlled movement operations to generate a machining path by performing separation and approach movements based on contact with a master workpiece, optimizing movement distance and direction to suppress accuracy loss and reduce generation time.
The method reduces the number of approach and separation operations, shortens the time needed for machining path generation, and maintains machining path accuracy by limiting movements along predetermined shape portions during contact.
Smart Images

Figure 2025007463000001_ABST
Abstract
Description
[Technical field]
[0001] The present technology relates to a control device for controlling machining such as deburring or polishing using a tool, a machining path generation method, a computer program, and a storage medium. [Background technology]
[0002] A machine tool has been proposed that sets a reference path along the surface of a master workpiece based on taught points, moves a tool a predetermined distance along the reference path, and causes the tool to approach and move away from the master workpiece during the movement, and acquires the coordinates of the spindle when the tool comes into contact with the master workpiece (see Patent Document 1). The machine tool repeatedly executes the movement, approach, and movement of the predetermined distance, and is able to generate a machining path corresponding to the master workpiece based on the multiple coordinates acquired. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] International Publication No. 2021 / 200403 Summary of the Invention [Problem to be solved by the invention]
[0004] If the predetermined distance is short, the accuracy of the machining path is increased, but it takes a long time to generate the machining path.
[0005] The present disclosure has been made in consideration of the above circumstances, and aims to provide a control device, a processing path generation method, a computer program, and a storage medium that can suppress a decrease in accuracy of the processing path and shorten the time required to generate a processing path. [Means for solving the problem]
[0006] A control device according to an embodiment of the present disclosure includes a first movement execution unit that executes an approaching operation of a spindle to a surface of a master workpiece along a reference path along the surface of the master workpiece that is determined based on a plurality of reference points, a contact determination unit that determines whether or not an end effector attached to the spindle has come into contact with the surface during the approaching operation by the first movement execution unit, an acquisition unit that acquires coordinates of the spindle when the contact determination unit determines that contact has occurred, and a second movement execution unit that executes a moving away operation relative to the reference path after acquiring the coordinates of the spindle with the acquisition unit. a control device that repeatedly executes a separating operation by a moving axis and acquires coordinates of the spindle each time the end effector comes into contact with the surface during the approaching operation, and generates a machining path for the spindle based on the acquired multiple coordinates.The control device includes a shape determination unit that determines whether or not the end effector has come into contact with a predetermined shape portion on the surface based on the multiple coordinates or a reference point, and a third movement execution unit that executes a movement operation of the spindle in a direction along the predetermined shape portion after execution of the separating operation and before execution of the approaching operation when the shape determination unit determines that the end effector has come into contact with the predetermined shape portion.
[0007] In the present disclosure, when the end effector comes into contact with the predetermined shaped portion, after the moving away motion is performed and before the moving toward motion is performed, the main shaft moves in a direction along the predetermined shaped portion.
[0008] In the control device according to one embodiment of the present disclosure, the predetermined shape portion includes a flat portion.
[0009] In the present disclosure, when the end effector contacts the flat portion, the main shaft moves in a direction along the predetermined shape portion after performing the moving away motion and before performing the approaching motion.
[0010] In a control device according to one embodiment of the present disclosure, the judgment by the shape determination unit and the execution of the movement operation of the spindle by the third movement execution unit are repeated, and when the movement operation of the spindle by the third movement execution unit is executed multiple times, the movement distance of the movement operation of the spindle by the third movement execution unit becomes longer than the previous time.
[0011] In the present disclosure, when the movement operation of the spindle is executed multiple times, the movement distance of the movement operation of the spindle is longer than the previous movement operation.
[0012] In a control device according to one embodiment of the present disclosure, the movement distance of the movement operation of the spindle by the third movement execution unit is a distance obtained by adding a predetermined distance to the previous movement distance or a distance obtained by multiplying the previous movement distance by a predetermined coefficient greater than 1.
[0013] In the present disclosure, the previous movement distance is added with a predetermined distance or the previous movement distance is multiplied with a predetermined coefficient greater than 1 to determine the movement distance of the current movement motion.
[0014] In the present disclosure, the predetermined distance is variable.
[0015] In the present disclosure, the predetermined distance is changed depending on the situation, and the predetermined distance is optimized.
[0016] A control device according to one embodiment of the present disclosure includes an intermediate coordinate calculation unit that calculates an intermediate coordinate located between the first coordinate, which is the coordinate of the spindle, when the acquisition unit acquires a first coordinate, which is the coordinate of the spindle, and then the third movement execution unit executes the movement operation of the spindle and acquires a second coordinate, which is the coordinate of the spindle, in the acquisition unit.
[0017] In the present disclosure, intermediate coordinates located between the first coordinates and the second coordinates, i.e., coordinates in a section where the spindle does not come into contact with the master workpiece due to the movement of the spindle, are calculated.
[0018] In a control device according to one embodiment of the present disclosure, the shape determination unit includes a vector derivation unit that derives a plurality of vectors based on the plurality of coordinates or reference points, and a similarity determination unit that determines whether a similarity in the direction of the plurality of vectors is within a predetermined range, and the third movement execution unit, when the similarity determination unit determines that the similarity is within the predetermined range, executes a movement operation of the main axis in a direction along the predetermined shape portion after performing the separating operation and before performing the approaching operation.
[0019] In the present disclosure, when the similarity between the directions of a plurality of vectors is within a predetermined range, a movement operation of the main axis is executed.
[0020] A control device according to one embodiment of the present disclosure includes a reference vector derivation unit that derives a reference vector for calculating the similarity, and the multiple coordinates include a third coordinate and a fourth coordinate that are consecutively arranged. The vector derivation unit derives a first vector extending from the third coordinate to the fourth coordinate and a second vector extending from the third coordinate to the reference point, and includes a first similarity calculation unit that calculates a first similarity which is the similarity in the directions of the reference vector and the first vector and a second similarity which is the similarity in the directions of the first vector and the second vector. The similarity determination unit determines whether the first similarity is within a first predetermined range and determines whether the second similarity is within a second predetermined range.
[0021] In the present disclosure, when the first similarity is within a first predetermined range and the second similarity is within a second predetermined range, a movement operation of the spindle is executed.
[0022] A control device according to one embodiment of the present disclosure stops the execution of the movement operation of the spindle by the third movement execution unit when the similarity determination unit determines that the first similarity is not within the first specified range or the second similarity is not within the second specified range.
[0023] In the present disclosure, if the first similarity is not within a first predetermined range or the second similarity is not within a second predetermined range, the execution of the movement operation of the spindle is stopped.
[0024] In a control device according to one embodiment of the present disclosure, the multiple coordinates include a fifth coordinate, a sixth coordinate, a seventh coordinate, and an eighth coordinate that are consecutively arranged, the vector derivation unit derives a third vector extending from the fifth coordinate to the sixth coordinate, a fourth vector extending from the sixth coordinate to the seventh coordinate, and a fifth vector extending from the seventh coordinate to the eighth coordinate, and is equipped with a second similarity calculation unit that calculates a third similarity which is the similarity in the directions of the third vector and the fourth vector, and a fourth similarity which is the similarity in the directions of the third vector and the fifth vector, and the similarity determination unit determines whether the third similarity and the fourth similarity are within the specified range.
[0025] In the present disclosure, when the third similarity and the fourth similarity are within a predetermined range, a movement operation of the spindle is executed.
[0026] A control device according to an embodiment of the present disclosure moves the main shaft in a zigzag manner along the reference path.
[0027] In the present disclosure, the spindle is moved in a zigzag manner along a reference path.
[0028] A control device according to an embodiment of the present disclosure causes the spindle to approach or move away at approach and separation points, which are points provided at predetermined intervals on the reference path.
[0029] In the present disclosure, the spindle is moved toward or away from the reference path at approach and separation points that are provided at predetermined intervals on the reference path.
[0030] A machining path generation method according to an embodiment of the present disclosure performs an approaching operation of a spindle to a surface of a master workpiece along a reference path along the surface of the master workpiece that is determined based on a plurality of reference points, determines whether or not an end effector attached to the spindle has contacted the surface during the approaching operation, and if it is determined that the end effector has contacted the surface, acquires coordinates of the spindle, and after acquiring the coordinates of the spindle, performs a moving operation relative to the reference path, repeatedly performs the approaching operation and the moving away operation, and acquires coordinates of the spindle each time the end effector contacts the surface during the approaching operation, and generates a machining path for the spindle based on the acquired plurality of coordinates. In this machining path generation method, it is determined whether or not the end effector has contacted a predetermined shaped portion on the surface based on the plurality of coordinates or reference points, and if it is determined that the end effector has contacted the predetermined shaped portion, after performing the moving away operation, a moving operation of the spindle is performed in a direction along the predetermined shaped portion before performing the approaching operation.
[0031] In the present disclosure, when the end effector comes into contact with the predetermined shaped portion, after the moving away motion is performed and before the moving toward motion is performed, the main shaft moves in a direction along the predetermined shaped portion.
[0032] A computer program according to an embodiment of the present disclosure causes a control device to execute an approaching operation of a spindle to approach a surface of a master workpiece along a reference path along the surface of the master workpiece that is determined based on a plurality of reference points, determines whether or not an end effector attached to the spindle has contacted the surface during the approaching operation, and if it is determined that the end effector has contacted the surface, acquires coordinates of the spindle, and after acquiring the coordinates of the spindle, executes a moving away operation along the reference path, repeatedly executes the approaching operation and the moving away operation, acquires coordinates of the spindle each time the end effector contacts the surface during the approaching operation, and generates a machining path for the spindle based on the acquired plurality of coordinates. The computer program causes the control device to determine whether or not the end effector has contacted a portion of a predetermined shape on the surface based on the plurality of coordinates or reference points, and if it is determined that the end effector has contacted the portion of the predetermined shape, executes a moving operation of the spindle in a direction along the portion of the predetermined shape after executing the moving away operation and before executing the approaching operation. Execute the process.
[0033] In the present disclosure, when the end effector comes into contact with the predetermined shaped portion, after the moving away motion is performed and before the moving toward motion is performed, the main shaft moves in a direction along the predetermined shaped portion.
[0034] A storage medium according to an embodiment of the present disclosure stores a computer program that causes a control device to execute a process of: executing an approaching operation of a spindle to approach a surface of a master workpiece along a reference path along the surface of the master workpiece that is determined based on a plurality of reference points; determining whether or not an end effector attached to the spindle has contacted the surface during the approaching operation; and if it is determined that the end effector has contacted the surface, acquiring coordinates of the spindle; and if it is determined that the end effector has contacted the surface, executing a separating operation of the spindle in a separating angle direction that is a predetermined angle with respect to the reference path, repeatedly executing the approaching operation and the separating operation, acquiring coordinates of the spindle each time the end effector contacts the surface during the approaching operation, and generating a machining path for the spindle based on the acquired plurality of coordinates. In this storage medium, the computer program causes the control device to determine whether or not the end effector has contacted a predetermined shaped portion on the surface based on the plurality of coordinates or reference points, and if it is determined that the end effector has contacted the predetermined shaped portion, executing a moving operation of the spindle in a direction along the predetermined shaped portion after executing the separating operation and before executing the approaching operation. Execute the process.
[0035] In the present disclosure, when the end effector comes into contact with the predetermined shaped portion, after the moving away motion is performed and before the moving toward motion is performed, the main shaft moves in a direction along the predetermined shaped portion. Effect of the Invention
[0036] In the control device, machining path generation method, computer program, and storage medium according to an embodiment of the present disclosure, when the end effector comes into contact with the predetermined shaped portion, the spindle moves in a direction along the predetermined shaped portion after the execution of the separation motion and before the execution of the approach motion. Therefore, it is possible to reduce the number of times the approach motion and separation motion are performed, and to shorten the time required to generate the machining path. In addition, since the movement of the spindle in a direction along the predetermined shaped portion is limited to the case where the end effector comes into contact with the predetermined shaped portion, it is possible to suppress a decrease in the accuracy of the machining path. [Brief description of the drawings]
[0037] [Figure 1] 1 is a simplified perspective view of a machine tool according to a first embodiment. [Diagram 2] FIG. 2 is a block diagram showing the configuration of a machine tool. [Diagram 3] FIG. 11 is an explanatory diagram for explaining generation of a reference trajectory. [Figure 4] FIG. 11 is an explanatory diagram for explaining generation of a processing path. [Diagram 5] FIG. 11 is an explanatory diagram for explaining machining based on a machining path. [Figure 6] 4 is an example of a display screen of a display unit. [Figure 7] FIG. 1 is an explanatory diagram for explaining a search method of search method No. 1. [Figure 8] FIG. 8 is a partially enlarged view of FIG. [Figure 9] FIG. 11 is an explanatory diagram for explaining generation of a processing path. [Figure 10] 13 is an explanatory diagram of a case where a smoothing function is used to correct the machining path so as to make it smooth. FIG. [Figure 11] FIG. 11 is an explanatory diagram showing a first example of a contact detection method. [Figure 12] FIG. 11 is an explanatory diagram showing a second example of a contact detection method. [Figure 13A] FIG. 11 is an explanatory diagram showing a third example of a contact detection method as viewed from the side. [Figure 13B] FIG. 13 is an explanatory diagram showing a third example of a contact detection method as viewed from the front. [Figure 14] FIG. 11 is an explanatory diagram showing a fourth example of a contact detection method. [Figure 15] 11 is an explanatory diagram illustrating a shape determination process for determining whether or not a tool has come into contact with a portion of a predetermined shape on the surface of a master workpiece. FIG. [Figure 16] FIG. 13 is an explanatory diagram for explaining an exceptional process in which the shape determination process is not performed. [Figure 17] 13 is a flowchart illustrating a shape determination process. [Figure 18] 13 is a flowchart illustrating a shape determination process. [Figure 19]FIG. 11 is an explanatory diagram for explaining a search method of search method No. 2 according to embodiment 2. [Figure 20] FIG. 13 is an explanatory diagram for explaining a search method of search method No. 3 according to embodiment 3. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0038] (Embodiment 1) The present invention will be described below based on the drawings showing a machine tool according to a first embodiment. In the following description, up, down, front, back, left and right shown in the drawings will be used. FIG. 1 is a schematic perspective view of the machine tool. The machine tool 1 has a base 2 that is rectangular in plan view. A plurality of reinforcing cylinders 2a are provided on the upper surface of the base 2. A support table 3 is provided on the reinforcing cylinder 2a in the center of the base 2. The support table 3 is cylindrical and holds a workpiece.
[0039] The three pillars 4 are provided around the support base 3 and extend upward from the reinforcing cylinder 2a. The three pillars 4 are arranged at phase intervals of approximately 120 degrees in a plan view. A track 5 is provided on the side surface of each pillar 4 that faces the support base 3, and the track 5 extends in the vertical direction.
[0040] The moving part 6 and the drive source are provided on the track 5. The drive source is, for example, a ball screw 14 and a moving axis motor 13 (see FIG. 2). The ball screw 14 driven by the moving axis motor 13 moves the moving part 6 up and down along the track 5. In other words, the moving part 6 is movable in a direction intersecting with a first support plate 10 described below. An attachment portion is provided on the side of the moving part 6 facing the support base 3, for attaching a first link 11 and a second link 21 described below. The attachment portion is, for example, a hole or a protrusion.
[0041] A first support plate 10 is disposed above the holding table 3. The first support plate 10 has a triangular shape in a plan view and is approximately parallel to the upper surface of the holding table 3. The three sides of the first support plate 10 face the three upright columns 4, respectively. That is, the three sides correspond to the three moving parts 6, respectively. Each side and each moving part 6 are connected by two parallel first links 11. The first links 11 are rod-shaped. One end of each of the two first links 11 is connected to both ends of the side, respectively, via a rotatable joint 7. The other end of each of the two first links 11 is connected to the moving part 6, respectively, via a rotatable joint 7. The joints 7 are, for example, universal joints.
[0042] The first support plate 10 holds a spindle 30 that protrudes upward and downward. The spindle 30 holds a tool 30a at its end. The tool 30a is an example of an end effector. Instead of the tool 30a, the spindle 30 may hold another end effector such as a touch probe. The second support plate 20 is disposed above the first support plate 10 (on the moving section 6 side), and a connecting tube 8 with its axial direction extending up and down is provided between the first support plate 10 and the second support plate 20. The connecting tube 8 connects the first support plate 10 and the second support plate 20. The connecting tube 8 integrates the first support plate 10 and the second support plate 20.
[0043] The upper part of the main shaft 30 passes through the second support plate 20 from the inside of the connecting tube 8. The second support plate 20 has a triangular shape in a plan view and is approximately parallel to the first support plate 10. The three sides of the second support plate 20 face the three upright columns 4, respectively. That is, the three sides correspond to the three moving parts 6, respectively. Each side and each moving part 6 are connected by two parallel second links 21. The second links 21 are rod-shaped. One end of each of the two second links 21 is connected to both ends of the side, respectively, via a rotatable joint 7. The other end of each of the two second links 21 is connected to the moving part 6, respectively, via a rotatable joint 7. The joints 7 are, for example, universal joints.
[0044] The connecting tube 8 has a hexagonal shape in a plan view, and three of the six sides at the upper end of the connecting tube 8, spaced apart in the circumferential direction, are connected to three sides of the second support plate 20. Of the six sides at the lower end of the connecting tube 8, three adjacent sides, spaced apart in the circumferential direction, are connected to three sides of the first support plate 10.
[0045] When the three moving parts 6 are at the same height position, the main shaft 30 is located approximately directly above the center of the support table 3. When two moving parts 6 are at the same vertical position and another moving part 6 moves downward relative to the two moving parts 6, the main shaft 30 moves only in the horizontal direction toward the opposite side of the moving part 6 moving downward.
[0046] When two moving parts 6 are at the same vertical position and another moving part 6 moves higher than the two moving parts 6, the spindle 30 moves only horizontally toward the moving part 6 moving higher. When the three moving parts 6 move the same distance in the vertical direction, the spindle 30 moves in the vertical direction. By combining these movements, the machine tool 1 positions the spindle 30 at the desired vertical, front-rear, left-right position. Therefore, the spindle 30 is connected to the ball screw 14 via the first support plate 10, the second support plate 20, the connecting cylinder 8, the first link 11, the second link 21, the joint 7, and the moving parts 6.
[0047] The spindle 30 is equipped with a spindle motor 12 (see FIG. 2). The spindle 30 positioned at a desired position is rotated by the spindle motor 12, and a tool 30a attached to the spindle 30 machines a workpiece held on the holder 3.
[0048] FIG. 2 is a block diagram showing the configuration of the machine tool. As shown in FIG. 2, the control device 40 includes a control unit 41, an auxiliary storage unit 42, a main storage unit 43, an input / output interface 44, an operation unit 45, and a display unit 46. The control unit 41 includes a processor such as a CPU, an MPU, or a GPU, or a logic circuit such as an FPGA, an ASIC, or a CPLD. The control unit 41 controls the operation of each unit of the machine tool 1. The auxiliary storage unit 42 is rewritable and includes, for example, an EEPROM, a flash ROM, or a hard disk. The auxiliary storage unit 42 stores a control program (not shown) for controlling the machine tool 1, a machining program DB 421 that stores a plurality of machining programs for machining a workpiece 95 (see FIG. 5), and a machining path generation program (hereinafter referred to as a program) 422. The program 422 executes a process for generating a machining path. The control device 40 may obtain the program 422 from a computer-readable storage medium 423, such as an optical disk or a portable flash memory, and store it in the auxiliary storage unit 42. Furthermore, the control device 40 may obtain the program 422 from an external device connected to the control device 40 via a communication network, and store the program 422 in the auxiliary storage unit 42 .
[0049] The main memory unit 43 is, for example, a RAM. The operation unit 45 is, for example, a keyboard, a button, a touch panel, a mouse, etc. The display unit 46 is, for example, a liquid crystal display panel, an organic EL panel, etc.
[0050] Table 1 below is an example of a storage table of the machining program DB421. The machining program DB421 stores a No. column, a machining program column, and a machining path column. The No. column stores the machining program number. The machining program column stores the program for each machining. The machining path column initially stores a reference path L0 generated by a method such as online teaching using CAM software. When the CPU 41 generates a machining path L1 based on the program 422, it overwrites the machining path column with the machining path L1 and stores it.
[0051] [Table 1]
[0052] When an operator operates the operation unit 45, a signal is input from the operation unit 45 to the input / output interface 44. The input / output interface 44 outputs the signal to the display unit 46. The display unit 46 displays characters, figures, symbols, and the like.
[0053] The control device 40 further includes a spindle control circuit 47 corresponding to the spindle motor 12, a servo amplifier 48, a moving axis control circuit 49 corresponding to the moving axis motor 13, and a servo amplifier 50. Based on a command from the CPU 41, the spindle control circuit 47 outputs a command indicating target values such as the rotation direction and rotation speed of the spindle motor 12 to the servo amplifier 48. The servo amplifier 48 supplies power to the spindle motor 12 based on the command. The encoder 18 detects the rotation position and speed of the spindle motor 12, and sends a detection signal to the servo amplifier 48. The servo amplifier 48 compares the detection signal with the target values and controls the output power.
[0054] Based on instructions from the control unit 41, the moving axis control circuit 49 outputs commands indicating target values such as the moving direction and speed of the three moving parts 6 to the servo amplifier 50. The servo amplifier 50 supplies power to the moving axis motor 13 based on the commands. The encoder 19 detects the rotational position and speed of the moving axis motor 13 and sends a detection signal to the servo amplifier 50. The servo amplifier 50 compares the detection signal with the target values and controls the output power.
[0055] The holding table 3 of the machine tool 1 holds a master workpiece 9 that has already been deburred, and a tool 30a is attached to the tip of the spindle 30. The master workpiece 9 has already been deburred, and thus has the desired machining accuracy. As shown in FIG. 3, a reference path L0 is generated on the outer periphery of the master workpiece 9 by a method such as online teaching using a CAM device. The reference path L0 is determined by a plurality of teaching points T on the reference path L0. j The reference path L0 is stored in the machining program DB 421.
[0056] FIG. 3 is an explanatory diagram for explaining the generation of the reference path, FIG. 4 is an explanatory diagram for explaining the generation of the machining path, and FIG. 5 is an explanatory diagram for explaining machining based on the machining path. The control unit 41 reads out the reference path L0 from the machining program DB 421, and moves the spindle 30 toward or away from the peripheral portion of the master workpiece 9 along the reference path L0 based on the program 422. The control unit 41 detects the contact of the tool 30a with the peripheral portion, and acquires the coordinates P of the center of the spindle 30 each time the contact is detected. As shown in FIG. 4, the CPU 41 generates a machining path L1 based on the acquired coordinates P of the multiple centers. When deburring a workpiece 95 with a burr, the workpiece 95 is held on the holding table 3. Based on the corresponding machining program, as shown in FIG. 5, the spindle 30 to which the tool 30a is attached is moved along the machining path L1 to machine the workpiece 95.
[0057] A method for generating a machining path will be described in detail below. A non-deburred workpiece is designated as a master workpiece 9, and an operator holds the master workpiece 9 on the holder 3. The operator attaches to the spindle 30 a tool 30 a to be used.
[0058] The control unit 41 acquires the reference path L0. After acquiring the number (No.) of the machining program based on the operation of the operator, the control unit 41 refers to the machining program DB 421 to acquire the corresponding reference path L0. Alternatively, the spindle 30 is moved to bring the tool 30a into contact with the master workpiece 9, and the coordinates of the point indicating the corner of the master workpiece 9 and the coordinates of the point where the attitude of the tool 30a changes are acquired, and the coordinates are set as the teaching point T. j Then, the teaching point T j The reference path L0 is obtained based on
[0059] The control unit 41 displays the reference path L0 and an input field on the display unit 46. In the input field, conditions such as the search method number, search interval, search width / evacuation amount, and movement amount during measurement are input. Details of the search method will be described later. FIG. 6 is an example of a display screen of the display unit 46. The control unit 41 displays the master work and the teaching point T on the right side of the display screen. jand the reference path L0 are displayed as an oblique view or a plan view. The oblique view or the plan view may be switched by the operator's operation. The control unit 41 displays an input field on the left side of the display screen. The operator checks the reference path L0 displayed on the display unit 46 by the control unit 41. When there is a part of the reference path L0 that the operator wishes to correct, the operator indicates that part using the operation unit 45. The operator inputs the search method number, search interval, search width / retraction amount, and movement amount during measurement using the operation unit 45. The search interval, search width / retraction amount, and movement amount during measurement may be displayed as candidates and the operator may select one. The control unit 41 acquires the search method number, search interval, search width / retraction amount, and movement amount during measurement input by the operator and sets the search conditions.
[0060] FIG. 7 is an explanatory diagram for explaining the search method of search method No. 1. A case where the operator inputs search method No. 1 will be described. As shown in FIG. 7, a reference path L0 is a path initially stored in the machining program DB 421. A plurality of teaching points T j Fig. 7 shows three teaching points T1, T2, and T3. In Fig. 7, point S0 on the reference path L0 indicates the initial position of the center of the spindle 30, and point S1 indicates a passing point when the center of the spindle 30 moves from the initial position to the first teaching point, i.e., teaching point T1, for searching.
[0061] The center of the spindle 30 starts moving from the initial position point S0, and moves to the teaching point T1 via the passing point S1. The tool 30a, i.e., the spindle 30, comes into contact with the master workpiece 9 at the teaching point T1. By contacting the master workpiece 9, the control unit 41 acquires the coordinate P1 of the center of the spindle 30. In other words, the coordinate of the teaching point T1 is approximately the same as the coordinate P1 of the center of the spindle 30.
[0062] Fig. 8 is a partially enlarged view of Fig. 7. As shown in Fig. 7, the control unit 41 moves the spindle 30 away based on a third vector c, which is the sum of a first vector a that faces the teaching point T2 from the coordinate P1 of the center of the spindle 30 and has the length of the search interval (hereinafter, the first length) and a second vector b that is perpendicular to the first vector a and has the length of the retreat amount (hereinafter, the second length). The control unit 41 moves the spindle 30 away based on θ aNext, the control unit 41 moves the spindle 30 closer to the master workpiece 9 based on a fourth vector d having a third length obtained by adding the amount of movement during measurement to the second length and having a direction opposite to that of the second vector b. Until contact with the master workpiece 9 is detected, the control unit 41 continues to move the spindle 30 closer to the master workpiece 9 based on an end point P b Approach the target with the aim.
[0063] When contact with the master workpiece 9 is detected, the control unit 41 acquires the coordinate P2 of the center of the spindle 30. The control unit 41 moves the spindle 30 away based on a third vector c which is the sum of a first vector a which faces from the coordinate P2 of the center of the spindle 30 toward the taught point T2 and has a first length, and a second vector b which is perpendicular to the first vector a and has a second length. Next, the control unit 41 moves the spindle 30 closer based on a fourth vector d which has a third length which is the second length plus the movement amount during measurement and which has a direction opposite to that of the second vector b. Until contact with the master workpiece 9 is detected, the control unit 41 continues to control the end point P of the fourth vector d inside the master workpiece 9. b In this way, the spindle 30 repeats the moving away and approaching motions until it reaches the teaching point T2. When the distance between the teaching point T2 and the center of the spindle 30 becomes equal to or less than a predetermined threshold, the control unit 41 determines that the teaching point T2 has been reached, and changes the next target teaching point to teaching point T3. In FIG. 7, when the target teaching point is changed, the coordinate P i Then, the number i (i=1, 2, . . . ) of the coordinates of the center of the spindle 30 to be obtained next is reset to 1.
[0064] Fig. 9 is an explanatory diagram for explaining the generation of the machining path, and Fig. 10 is an explanatory diagram for the case where the machining path is corrected so as to be smooth by using a smoothing function. As shown in Fig. 9, the control unit 41 calculates the coordinate P i (i=1, 2, . . .) and teaching point T j (j=1, 2, . . .) to generate the machining path L1. iis not limited to being connected in a line segment, but may be connected in an arc or curved line. As shown in Fig. 10, the control unit 41 can correct the curve of the machining path L1 to be smooth by using a smoothing function (a method of approximating with a smooth curve). Examples of smooth curves include spline curves, Bezier curves, and NURBS curves.
[0065] FIG. 11 is an explanatory diagram showing a first example of a contact detection method. For the purpose of explanation, FIG. 11 shows a simplified model of the machine tool 1, which is different from the shape shown in FIG. 1. The spindle 30 held by the connecting tube 8 is arranged on the outer periphery of the master work 9 at a predetermined position (a designated horizontal plane) on the side of the master work 9, with a predetermined angle relative to the longitudinal direction of the upright column 4. The spindle 30 rotates forward or backward at a low speed and moves according to the above-mentioned search method. The control unit 41 detects the load of the spindle 30 corresponding to the signal output by the servo amplifier 48 based on the detection signal of the encoder 18. The control unit 41 detects the contact between the tool 30a and the master work 9 based on the change in the detected load. Specifically, the control unit 41 detects the change in the rotation speed and torque of the spindle 30, the deviation amount, and the like. Therefore, the control unit 41 corresponds to the second detection unit.
[0066] Fig. 12 is an explanatory diagram showing a second example of a contact detection method. For the purpose of explanation, Fig. 12 shows a simplified model of the machine tool 1, which is different from the shape shown in Fig. 1. As described above, the moving axis motor 13 drives the ball screw 14, and the moving part moves up and down along the track. The control unit 41 detects the load of the ball screw 14 corresponding to the signal output by the servo amplifier 50 based on the detection signal of the encoder 19. The control unit 41 detects the contact between the tool 30a and the master workpiece 9 based on the change in the detected load. Specifically, the control unit 41 detects the change in the number of rotations and torque of the ball screw 14, the amount of deviation, etc.
[0067] Fig. 13A is an explanatory diagram showing a third example of a contact detection method as viewed from the side, and Fig. 13B is an explanatory diagram showing the third example of a contact detection method as viewed from the front. Figs. 13A and 13B show a simplified model of machine tool 1 for the purpose of explanation, and the shape is different from that of Fig. 1. Machine tool 1 is provided with a force sensor 15 between connecting tube 8 and spindle 30. Force sensor 15 detects the load on spindle 30, and control unit 41 detects contact between tool 30a and master workpiece 9 based on a change in the detected load.
[0068] Fig. 14 is an explanatory diagram showing a fourth example of a contact detection method. In the circuit shown in Fig. 14, the spindle 30 is connected to the + side of the battery 16, and the master workpiece 9 is connected to the - side via the ammeter 17. The control unit 41 applies a voltage to the spindle 30, and when the tool 30a contacts the master workpiece 9, electricity flows (energizes) in the circuit. The ammeter 17 detects the energization. When the master workpiece 9 is not conductive, the operator or the machine tool 1 wets the surface of the master workpiece 9 with a conductive liquid. In other words, the machine tool 1 detects the contact between the tool 30a and the master workpiece 9.
[0069] When generating the machining path L1 based on the program 422, the control unit 41 determines whether or not the tool 30a contacts a portion of a predetermined shape on the surface of the master workpiece 9. The portion of the predetermined shape is, for example, a flat surface. The master workpiece 9 has a flat surface 9a (see FIG. 15).
[0070] Fig. 15 is an explanatory diagram for explaining the shape determination process for determining whether or not the tool 30a has come into contact with a portion of a predetermined shape on the surface of the master workpiece 9, Fig. 16 is an explanatory diagram for explaining exception processing in which the shape determination process is not performed, and Figs. 17 and 18 are flowcharts for explaining the shape determination process. In Fig. 15, the solid arrow indicates the movement path of the spindle 30 in the search process, and corresponds to the third vector c and the fourth vector d in Fig. 8. In Fig. 15, the white arrow indicates the coordinate P i From coordinate P i+1 The arrows M1 and M2 indicate the movement of the main shaft 30 in the direction along the predetermined shape portion, which is executed after the separation operation and before the approach operation. The control unit 41 receives various parameters from the auxiliary storage unit 42, for example, the coordinate Pi Variable i, teaching point T j The control unit 41 reads out the variable j, counter C, moving distance D, threshold value, etc., and stores them in the main memory unit 43. In the shape determination process, the control unit 41 updates various parameters as necessary, and after the shape determination process, stores the updated various parameters in the auxiliary memory unit 42. In the following description, i is a variable indicating the number of times the tool 30a has come into contact with the master workpiece 9. j is a variable indicating the number of the target teaching point.
[0071] The control unit 41 sets the variable j to 1, moves the spindle 30 from the point S0, and moves the center of the spindle 30 to the teaching point T1 (S1). The control unit 41 determines whether or not the tool 30a has come into contact with the master workpiece 9 (S2). If it is determined that the tool 30a has come into contact with the master workpiece 9 (S2: YES), the control unit 41 sets the variable j to 2, sets the variable i to 1, and calculates the coordinate P i That is, the coordinates of the spindle 30 at the time of contact are acquired (S3). When the center of the spindle 30 is located at or near the teaching point T1, the spindle 30 comes into contact with the master workpiece 9, the contact is detected, and the coordinates P1 of the spindle 30 are acquired. That is, the coordinates of the teaching point T1 are approximately the same as the coordinates P1 (see FIG. 15).
[0072] The control unit 41 determines the teaching point T j is set as the target teaching point (S4). The control unit 41 executes a moving away operation (S5, see vector c in FIG. 8), moves a moving distance D (S6), and executes an approaching operation (S7, see vector d in FIG. 8). The control unit 41 determines whether the tool 30a has come into contact with the master workpiece 9 (S8). When it is determined that the tool 30a has come into contact with the master workpiece 9 (S8: YES), the coordinate P i That is, the coordinates of the main axis 30 are obtained (S9).
[0073] In step S8, when it is determined that the tool 30a is not in contact with the master workpiece 9 (S8: NO), the control unit 41 returns the process to step S8. When it is determined that the tool 30a is in contact with the predetermined shape portion, after the separation operation is performed, and before the approach operation is performed, the control unit 41 performs a movement operation of the spindle 30 in a direction along the predetermined shape portion. The control unit 41 determines whether the variable i is 2 or more (S10). If the variable i is not 2 or more (S10: NO), the control unit 41 increments the variable i by 1 (S11) and returns the process to step S5.
[0074] If the variable i is 2 or more (S10: YES), the control unit 41 judges whether or not the movement distance D is greater than 0 (S40). If it is judged that the movement distance D is not greater than 0 (S40: NO), the control unit 41 advances the process to step S12. If it is judged that the movement distance D is greater than 0 (S40: YES), the control unit 41 calculates intermediate coordinates (S41) and advances the process to step S12. The movement distance D is the movement distance of the spindle 30 in a direction along the predetermined shape portion. The initial value of the movement distance D is 0. The details of the intermediate coordinates will be described later. The control unit 41 calculates the obtained coordinate P i is teaching point T j The control unit 41 determines whether the coordinates P are substantially the same as the coordinates of the target teaching point (S12). i and the target teaching point T j If the distance is less than or equal to a predetermined threshold value, the coordinate P i is the target teaching point T j If the coordinates are not equal to or less than the threshold value, the coordinates P i is the target teaching point T j It is determined that the coordinates are not substantially the same as those of the coordinates of the point.
[0075] Coordinate P i and the target teaching point T j If it is determined that the coordinates of the target teaching point T are substantially the same as those of the target teaching point T (S12: YES), the control unit 41 ends the determination mode or the straight line mode (S13), jIt is determined whether the target teaching point T is the final teaching point (S14). The final teaching point is the final teaching point among the multiple teaching points set in the moving order of the tool 30a on the reference path L0. j If it is determined that the target teaching point T is not the final teaching point (S14: NO), the control unit 41 increments the variable j by 1, sets i to 1 (S15), and resets the moving distance D (S16), i.e., sets the moving distance D to 0, and returns the process to step S4. j If it is determined that the teaching point is the final teaching point (S14: YES), the control unit 41 ends the process.
[0076] In step S12, the coordinate P i and the target teaching point T j When it is determined that the coordinates of the teaching point T are not substantially the same as those of the teaching point T (S12: NO), the control unit 41 j-1 and the target teaching point T j It is determined whether or not movement along an additional axis has occurred during movement between the coordinates P and P (S17). The additional axis refers to the axis of rotation of the holder 3 when the holder 3 is configured to be rotatable. When the holder 3 is configured to be rotatable around the A axis extending in the left-right direction, the B axis extending in the front-back direction, or the C axis extending in the up-down direction, the A axis, the B axis, and the C axis are the additional axes. i After the coordinates P are acquired, when the holding table 3 moves around the additional axis, the master work 9 moves and the flat surface 9a, i.e., the predetermined shape portion, also moves. i and the coordinate P obtained after moving around the additional axis i It is highly likely that these coordinates are not on the same flat surface 9a. In other words, it is highly likely that the control unit 41 cannot determine whether or not the tool 30a has been in contact with the same predetermined shape portion continuously before and after the movement around the additional axis.
[0077] When it is determined that a movement around the additional axis has occurred (S17: YES), the control unit 41 resets the movement distance D, i.e., returns it to the initial value 0 (S19), and returns the process to step S11. iThis is to obtain the data to determine whether the portion that the tool 30a comes into contact with after the movement around the additional axis has a predetermined shape.
[0078] When it is determined that there is no movement by the additional axis (S17: NO), the control unit 41 j and the coordinate P obtained in step S5 i It is determined whether the distance L between the coordinate P and the target object exceeds the threshold value S (S18). i is the target teaching point T j If the distance L does not exceed the threshold S, the coordinate P i is the target teaching point T j Located in the vicinity of.
[0079] If the distance L does not exceed the threshold value S (S18: NO), the control unit 41 resets the travel distance D, i.e., returns it to the initial value 0 (S19), and returns the process to step S11. If it is determined that the tool 30a has come into contact with the portion of the predetermined shape, after the separation operation is performed and before the approach operation is performed, the movement operation of the spindle 30 is performed in a direction along the portion of the predetermined shape. The movement distance D is the distance traveled in the movement operation of the spindle 30. Hereinafter, the movement distance D will also be simply referred to as the distance D.
[0080] If the distance L exceeds the threshold S (S18: YES), the control unit 41 i-1 From coordinate P i Vector V[i-1→i] pointing to coordinate P i-1 to target teaching point T j Vector V[i-1→T j ] is calculated (S20), and it is determined whether or not the linear mode is set (S21). The linear mode is a mode in which it is determined that the tool 30a has come into contact with the portion of the predetermined shape, and after the separation operation is performed and before the approach operation is performed, the spindle 30 is moved in a direction along the portion of the predetermined shape.
[0081] In step S21, when it is determined that the linear mode is not set (S21: NO), the control unit 41 determines whether or not the mode is a judgment mode (S28). The judgment mode is a mode for determining whether or not the tool 30a has come into contact with a portion having a predetermined shape. When it is determined that the mode is not a judgment mode (S28: NO), the control unit 41 calculates vector V[i-1→i] and vector V[i-1→T j ] is similar to the orientation of the character (S29).
[0082] Specifically, the control unit 41 calculates the similarity between two vectors based on the cosine similarity shown in the following equation 1.
[0083]
number
[0084] In the formula 1, x and y indicate vectors, x·y indicates the inner product of the vectors, and ||x||·||y|| indicates the product of the magnitudes of the vectors. That is, the cosine value of the angle between the two vectors x and y is obtained by the formula 1. When the cosine value is 1, the two vectors x and y are completely in the same direction, and when the cosine value is 0, the two vectors x and y are in directions that are 90 degrees out of phase with each other. Note that the auxiliary storage unit 42 stores, as thresholds, for example, a first threshold and a second threshold smaller than the first threshold. In step S29 and steps S22 and S32 described later, the threshold to be compared with the calculation result of the formula 1 is the second threshold. The range equal to or greater than the second threshold and the range equal to or greater than the first threshold correspond to the predetermined range. The range equal to or greater than the second threshold corresponds to the second predetermined range, and the range equal to or greater than the first threshold corresponds to the first predetermined range.
[0085] Vector V[i-1→i] and vector V[i-1→T j ] is not similar to the vector V[i-1→i] (S29: NO), that is, if the vector V[i-1→T jIf it is determined that the cosine similarity between vector V[i-1→i] and vector V[i-1→T j If it is determined that the orientation of vector V[i-1→i] is similar to that of vector V[i-1→i] (S29: YES), control unit 41 sets vector V[i-1→i] as the reference vector (S30), starts the determination mode (S31), and returns the process to step S11.
[0086] Here, the similarity in steps S22, S29, and S32 will be described. Step S29 indicates an exceptional process in which the shape determination process is not performed. For example, as shown in FIG. 16, when the spindle 30 moves on the flat surface 9a and the coordinate P i When the target teaching point T j When the angle of the target teaching point T with respect to the flat surface 9a is a predetermined angle, for example, 225 degrees or more clockwise in FIG. 16, the target teaching point T is located near the boundary between the flat surface 9a and the surface 9b. j If there is no such a condition, the tool 30a cannot contact the master workpiece 9 near the boundary between the flat surface 9a and the surface 9b, and the coordinate P i There is a risk of failure to obtain the password.
[0087] When the calculation result of Equation 1 is smaller than the second threshold, the control unit 41 divides the vector V[i-1→i] and the vector V[i-1→T j In other words, the control unit 41 does not perform the shape determination process, and the tool 30a cannot contact the master workpiece 9 near the boundary between the flat surface 9a and the surface 9b, and the coordinate P i When the calculation result of Equation 1 is smaller than the second threshold, the control unit 41 performs the following operations to avoid failure in acquiring vector V[i-1→i] and vector V[i-1→T j ] is not similar to the coordinate P. In other words, the control unit 41 executes the exception process, stops the execution of the movement operation of the spindle 30, and the tool 30a cannot contact the master workpiece 9 near the boundary between the flat surface 9a and the surface 9b. iWhen the calculation result of Equation 1 is equal to or greater than the second threshold value, in other words, the tool 30a cannot contact the master workpiece 9 near the boundary between the flat surface 9a and the surface 9b, the control unit 41 determines that the tool 30a cannot contact the master workpiece 9 near the boundary between the flat surface 9a and the surface 9b, and the coordinate P i If there is no risk of failure in obtaining vector V[i-1→i] and vector V[i-1→T j ] is determined to be similar to the coordinate P. In other words, the control unit 41 continues the shape determination process. Here, the calculation result of Equation 1 is compared with the second threshold value. The comparison with the first threshold value is not performed in the case of exceptional processing, that is, in the vicinity of the boundary between the flat surface 9a and the surface 9b, the tool 30a cannot contact the master workpiece 9 and the coordinate P i This is because the processing is performed to determine whether there is a risk of failing to obtain the similarity. In the exception processing, the similarity does not need to be higher than the judgment of whether or not the flat surface 9a is in contact. Therefore, a second threshold value that is a threshold value smaller than the threshold value used to judge whether or not the flat surface 9a is in contact, i.e., the first threshold value, is used.
[0088] In step S28, when it is determined that the determination mode is set (S28: YES), the control unit 41 performs a vector V[i-1→i] and a vector V[i-1→T j ] is similar to the vector V[i-1→i] (S32). j ] is equal to or greater than a second threshold. j ] is determined to be similar to the vector V[i-1→i] (S32: YES), that is, the vector V[i-1→T j] is equal to or greater than the second threshold, the control unit 41 determines whether the orientation of the vector V[i-1→i] is similar to that of the reference vector (S33). The control unit 41 calculates the cosine similarity between the vector V[i-1→i] and the reference vector based on Equation 1, and compares the calculated cosine similarity with a threshold, i.e., a first threshold. If the calculation result of Equation 1 is smaller than the first threshold, the control unit 41 determines that the vector V[i-1→i] and the reference vector do not point in the same direction, i.e., the orientations of the two vectors are not similar, and if the calculation result of Equation 1 is equal to or greater than the first threshold, the control unit 41 determines that the two vectors point in the same direction, i.e., the orientations of the two vectors are similar. The same applies to step S25 described later. The vector V[i-1→i] corresponds to the first vector, and the vector V[i-1→T j ] corresponds to the second vector. The cosine similarity between the vector V[i-1→i] and the reference vector corresponds to the first similarity. j ] corresponds to the second similarity.
[0089] When it is determined that the orientation of the vector V[i-1→i] is similar to that of the reference vector (S33: YES), the control unit 41 increments the counter C by 1 (S36) and determines whether the counter C is equal to or greater than a threshold (S37). The initial value of the counter C is 0, and the threshold is, for example, 1. The threshold may be 2 or greater. When the counter C is not equal to or greater than the threshold (S37: NO), the control unit 41 returns the process to step S11.
[0090] If the counter C is equal to or greater than the threshold value (S37: YES), the control unit 41 ends the determination mode and starts the straight line mode (S38). The control unit 41 resets the counter C (S39), i.e., returns it to the initial value 0, and returns the process to step S11.
[0091] In step S32, vector V[i-1→i] and vector V[i-1→T jIf it is determined that the orientation of vector V[i-1→i] is not similar to that of the reference vector (S32: NO), or if it is determined in step S33 that the orientation of vector V[i-1→i] is not similar to that of the reference vector (S33: NO), the control unit 41 ends the determination mode (S34). The control unit 41 resets the counter C (S35), i.e., returns it to the initial value 0, and returns the process to step S11.
[0092] In step S21, when it is determined that the linear mode is selected (S21: YES), the control unit 41 calculates the vector V[i-1→i] and the vector V[i-1→T j ] is similar to the vector V[i-1→i] (S22). j If it is determined that the orientation of vector V[i-1→i] is similar to that of the reference vector (S22: YES), the control unit 41 determines whether the orientation of vector V[i-1→i] is similar to that of the reference vector (S25). If it is determined that the orientation of vector V[i-1→i] is similar to that of the reference vector (S25: YES), that is, if it is determined that the tool 30a is in contact with the portion with the predetermined shape, the control unit 41 adds a predetermined distance D0 to the distance D (S26) and returns the process to step S11. Note that the predetermined distance D0 is, for example, the distance between two adjacent coordinates P when D=0, that is, when the spindle 30 is not moved in the direction along the portion with the predetermined shape. i and coordinate P i+1 is the distance between.
[0093] After the process of step S26, the spindle 30 performs a separation operation (S5), a movement of a distance D (S6), an approach operation (S7), and a movement of the coordinate P i (S9), and calculates the intermediate coordinates (S40: YES, S41). Here, the intermediate coordinates will be explained. In step S5, the main axis 30 is i-1 Then, the robot moves a distance D along the predetermined shape portion, i.e., the flat surface 9a, and then moves toward the master workpiece 9 to contact the master workpiece 9. The current coordinates P i By moving the distance D, if the distance D is not moved, there will be a point that touches the master work 9. The intermediate coordinate is the coordinate P i-1 And the next coordinate P iIf the distance D does not move, it will be replaced with the coordinates of the point that touched the master work 9. In FIG. 15, the black circle indicates the coordinate P obtained by contact. i , a white circle indicates an intermediate coordinate, and a double circle indicates a teaching point.
[0094] Before making the judgment in step S25, in the judgment mode, the control unit 41 judges that the orientation of the previous vector V[i-1→i], i.e., the current vector V[i-2→i-1], is similar to that of the reference vector (S33: YES). Therefore, if the judgment in step S25 is YES, it has been judged that the orientation of the vector V[i-2→i-1] is similar to that of the reference vector, and that the orientation of the vector V[i-1→i] is similar to that of the reference vector. The reference vector is the current vector V[i-3→i-2]. Coordinate P i-3 is the fifth coordinate, coordinate P i-2 is the sixth coordinate, coordinate P i-1 is the seventh coordinate, coordinate P i corresponds to the eighth coordinate. The reference vector corresponds to the third vector going from the fifth coordinate to the sixth coordinate, the vector V[i-2 → i-1] corresponds to the fourth vector going from the sixth coordinate to the seventh coordinate, and the vector V[i-1 → i] corresponds to the fifth vector going from the seventh coordinate to the eighth coordinate.
[0095] In step S22, vector V[i-1→i] and vector V[i-1→T j ] is not similar to the orientation of the reference vector (S22: NO), or if it is determined in step S25 that the orientation of the vector V[i-1→i] is not similar to the orientation of the reference vector (S25: NO), the control unit 41 ends the straight-line mode (S23) and resets the distance D (S24), i.e., returns the distance D to its initial value, and returns the process to step S11.
[0096] A specific description will be given below. After the start of the shape determination process, the control unit 41 acquires the coordinate P1 of the center of the spindle 30 (S1 to S9). The coordinate P1 is approximately the same as the coordinate of the teaching point T1. As shown in FIG. 15, the coordinate P1 is the coordinate when the tool 30a contacts a surface other than the flat surface 9a. The control unit 41 acquires the coordinate P2 (S10, S11, S9) and executes the processes of steps S12, S17, S18, and S20. At this point, the mode is neither the straight line mode (S21: NO) nor the determination mode (S28: NO), so the control unit 41 executes the process of step S29. As shown in FIG. 15, the coordinate P1 is the coordinate when the tool 30a contacts a surface other than the flat surface 9a, the coordinate P2 is the coordinate when the tool 30a contacts the flat surface 9a, and the target teaching point T2 is the coordinate on the flat surface 9a. Therefore, the vector V[1→2] and the vector V[1→T2] are not similar (S29: NO). The control unit 41 acquires the coordinate P3 (S11, S5 to S9), and proceeds with the process up to step S29.
[0097] As shown in FIG. 15, the coordinates P2 and P3 are coordinates when the tool 30a contacts the flat surface, and the target teaching point T2 is a coordinate on the flat surface 9a. Therefore, the vector V[2→3] and the vector V[2→T2] are similar (S29: YES). The control unit 41 sets the vector V[2→3] as the reference vector (S30), starts the judgment mode (S31), acquires the coordinate P4 (S11, S5 to S9), and proceeds to the process up to step S28. Since the judgment mode is in effect at this point (S28: YES), the control unit 41 executes the processes of steps S32 and S33. As shown in FIG. 15, the coordinates P3 and P4 are coordinates when the tool 30a contacts the flat surface, and the target teaching point T2 is a coordinate on the flat surface 9a. Therefore, the vector V[3→4] and the vector V[3→T2] are similar (S32: YES), and the vector V[3→4] and the reference vector are similar (S33: YES).
[0098] The control unit 41 increments the counter C by 1 (S36), ends the judgment mode, starts the straight line mode, and resets the counter C (S37: YES, S38, S39). The control unit 41 acquires the coordinate P5 (S11, S5 to S9), and proceeds with the process up to step S21. At this point, since the straight line mode is selected (S21: YES), a predetermined distance D0 is added to the distance D (S22: YES, S25: YES, S26), and the spindle 30 is caused to move away and move by the distance D, i.e., move M1 and approach, to acquire the coordinate P6 (S11, S5 to S9, see FIG. 15), and calculates the intermediate coordinate (S40: YES, S41).
[0099] Thereafter, the control unit 41 further adds a predetermined distance D0 to the distance D (S22: YES, S25: YES, S26), and executes a moving away operation, a movement of the distance D, i.e., a moving operation M2, and an approaching operation for the spindle 30, and obtains a coordinate P7 (S11, S5 to S9, see FIG. 15). At this time, the distance D is "initial value + 2 * D0", and the distance D is longer. Therefore, for example, as shown in FIG. 15, two intermediate coordinates are calculated.
[0100] In this way, in the straight line mode, a predetermined distance D0 is added to the distance D each time it is determined that the direction of the vector V[i-1→i] is similar to that of the reference vector. That is, the distance D traveled along the flat surface 9a becomes longer, so that the number of approaching and separating operations can be reduced, and the time required to generate the machining path can be shortened. Even if the number of approaching and separating operations is reduced on the flat surface 9a, the machining path is a straight path, so that the accuracy of the machining path is only slightly reduced. That is, the accuracy of the machining path can be suppressed from being reduced. The predetermined shape portion is not limited to the flat surface 9a. For example, it may be a curved surface with a large radius of curvature that approximates a flat surface.
[0101] Obtained coordinate P iand the coordinates of the target taught point T2 are substantially the same (S12: YES), the control unit 41 ends the straight line mode (S13). When the target taught point T2 is reached, the control unit 41 cancels the straight line mode, sets the next target taught point T3 (S15, S4), resets the distance D (S16), sets a new reference vector (S30), and executes the judgment mode or straight line mode. That is, every time the taught point is changed, a new reference vector is set and the judgment mode or straight line mode is executed. In this way, the setting of the reference vector, the judgment mode, and the straight line mode are repeatedly executed. The acquired coordinate P i and the target teaching point T j It is determined that the coordinates of the target teaching point T j is the final teaching point (S14: YES), the control unit 41 ends the process.
[0102] The control unit 41 that executes the processes of steps S21, S22, and S25 constitutes a shape determination unit. If the determinations are YES in steps S21, S22, and S25, it is determined that the tool 30a has come into contact with the portion with the predetermined shape.
[0103] In the machine tool according to the first embodiment, when the tool 30a comes into contact with a portion of a predetermined shape, for example, the flat surface 9a, the spindle 30 moves in a direction along the portion of the predetermined shape after the moving away operation and before the approaching operation. Therefore, the number of times the approaching and moving away operations are performed can be reduced, and the time required to generate the machining path L1 can be shortened. In addition, the movement of the spindle 30 in a direction along the portion of the predetermined shape is limited to the case where the tool comes into contact with the portion of the predetermined shape, so that the deterioration of the accuracy of the machining path L1 can be suppressed.
[0104] Furthermore, when the movement operation of the spindle 30 is executed multiple times, the movement distance D of the movement operation of the spindle 30 will be longer than the previous one. The previous movement distance D is added to a predetermined distance D0 to determine the movement distance D of the current movement operation. Since the movement distance D is longer, the time required to generate the machining path L1 can be shortened. Note that the predetermined distance D0 may be a fixed distance or a changeable distance. For example, in step S22, the vector V[i-1→i] and the vector V[i-1→T j In step S25, the predetermined distance D0 may be increased as the value of the cosine similarity between the vector V[i-1→i] and the reference vector increases, or the predetermined distance D0 may be increased as the value of the cosine similarity between the vector V[i-1→i] and the reference vector increases. i The predetermined distance D0 may be shortened as the distance between the target teaching point and the target teaching point becomes shorter. An upper limit may be set for the length of the moving distance D, and when the moving distance D reaches the upper limit, the predetermined distance D0 may be set to 0 in step S26. The predetermined distance D0 may be set to a negative value, and the moving distance D may be changed so that it is long or short depending on the magnitude of the cosine similarity in step S25. The control unit 41 may multiply the previous moving distance D by a predetermined coefficient instead of adding the predetermined distance D0 to the previous moving distance D. When multiplying by the predetermined coefficient, the previous moving distance D is a positive value. When the previous moving distance D is 0, the moving distance D is multiplied by the predetermined coefficient after adding a positive predetermined distance D0 to the moving distance D. The predetermined coefficient may be changed to change the moving distance D so that it is long or short depending on the magnitude of the cosine similarity in step S25.
[0105] Also, for example, an intermediate coordinate located between coordinates P5 and P6, i.e., a coordinate in a section where the movement of the spindle 30 does not contact the master workpiece 9, is calculated. Therefore, it is possible to suppress a decrease in the accuracy of the machining path L1. The coordinate P5 corresponds to the first coordinate, and the coordinate P6 corresponds to the second coordinate. When calculating an intermediate coordinate located between coordinates P6 and P7, the coordinate P6 corresponds to the first coordinate, and the coordinate P7 corresponds to the second coordinate.
[0106] Furthermore, when the similarity between the directions of a plurality of vectors, for example the cosine similarity, is within a predetermined range, movement operations M1 and M2 of the main shaft 30 are executed.
[0107] Furthermore, the cosine similarity between the reference vector and the vector V[i-1→i] is within a range equal to or greater than a first threshold, and the vector V[i-1→i] and the vector V[i-1→T j If the cosine similarity of the directions of the reference vector and the vector V[i-1→i] is within a range equal to or greater than the second threshold, the movement operations M1 and M2 of the main shaft 30 are executed. The cosine similarity of the directions of the reference vector and the vector V[i-1→i] corresponds to the first similarity, and the range equal to or greater than the first threshold corresponds to the first predetermined range. j The cosine similarity in the direction of ] corresponds to a second similarity, and the range equal to or greater than the second threshold corresponds to being within a second predetermined range.
[0108] The cosine similarity between the reference vector and the vector V[i-1→i] is not within a range equal to or greater than the first threshold, or the vector V[i-1→i] and the vector V[i-1→T j If the cosine similarity of the direction of [ ] is not within the range of the second threshold or more, the movement operations M1 and M2 of the main shaft 30 are not executed. In other words, the movement operation of the main shaft 30 is stopped.
[0109] Furthermore, when the cosine similarity of the direction between the current vector V[i-2 → i-1] and the reference vector and the cosine similarity of the direction between the current vector V[i-1 → i] and the reference vector are within a range equal to or greater than a first threshold, movement operations M1 and M2 of the main shaft 30 are executed. The cosine similarity of the direction between the current vector V[i-2 → i-1] and the reference vector corresponds to a third similarity, the cosine similarity of the direction between the current vector V[i-1 → i] and the reference vector corresponds to a fourth similarity, and the range equal to or greater than the first threshold corresponds to being within a predetermined range.
[0110] In the first embodiment, three vectors are used: a reference vector, a vector V[i-1→i], and a vector V[i-1→T j] is used to determine whether to move the main shaft 30, but it may also be determined whether to move the main shaft 30 based on the cosine similarity of two vectors or four or more vectors. For example, it may be possible to determine only the cosine similarity of the reference vector and the vector V[i-1→i], and move the main shaft 30 if the cosine similarity is within a range equal to or greater than a first threshold value. Also, it may be possible to determine whether to move the main shaft 30 based on the cosine similarity of the vector V[i-1→i] and the vector V[i-1→T j ] is within a range equal to or greater than a second threshold, and the cosine similarity between the reference vector and vector V[i-2→i-1] and the cosine similarity between the reference vector and vector V[i-1→i] are within a range equal to or greater than a first threshold, a movement operation of the main shaft 30 may be performed.
[0111] The control unit 41 that executes S7 corresponds to the first movement execution unit, the control unit 41 that executes S2 and S8 corresponds to the contact determination unit, the control unit 41 that executes S3 and S9 corresponds to the acquisition unit, the control unit 41 that executes S5 corresponds to the second movement execution unit, the control unit 41 that executes S25 corresponds to the shape determination unit, and the control unit 41 that executes S6 after executing S26 corresponds to the third movement execution unit. The control unit 41 that executes S41 corresponds to the intermediate coordinate calculation unit. The control unit 41 that executes S20 corresponds to the vector derivation unit, and the control unit 41 that executes S22, S29, and S32 corresponds to the similarity determination unit. The control unit 41 that executes S30 corresponds to the reference vector derivation unit.
[0112] (Embodiment 2) FIG. 19 is an explanatory diagram for explaining the search method of the search method No. 2. a In Fig. 19, the distance between the reference path L0 and a dashed line G1 below the reference path L0 is the movement width of the spindle 30 approaching the peripheral portion of the master workpiece 9 from the reference path L0. The distance between the reference path L0 and a dashed line G2 above the reference path L0 is the movement width of the spindle 30 moving away from the master workpiece 9 from the reference path L0. The sum of the movement width of the approach to the peripheral portion of the master workpiece 9 and the movement width of the moving away from the master workpiece 9 is the search width.
[0113] Multiple points T on the dashed line G1 b There are several points T on the dashed line G2. b In the longitudinal direction of the reference path L0, each point T on the dashed line G2 b are two adjacent points T on the dashed line G1. b The CPU 41 generates a search path K along which the main axis 30 moves in a zigzag manner based on the set search interval and search width along the reference path L0. b The broken broken line connecting these, i.e., the zigzag line, is the search path K. The search width is the width of the centrifugal oscillation when the spindle 30 moves in a zigzag manner. The search interval is the distance from when the spindle 30 comes closest to the master workpiece 9 until it approaches again. Moving in a zigzag manner means making a reciprocating movement that exceeds the reference path L0.
[0114] When the CPU 41 detects that the tool 30a has come into contact with the peripheral portion of the master workpiece 9, the CPU 41 calculates the coordinate P i 19, each time a contact is detected, the coordinates P1, P2, . . . of the center of the spindle 30 are obtained.
[0115] In the second embodiment, as in the first embodiment, a shape determination process is executed, and when the tool 30a comes into contact with a portion of a predetermined shape, for example, a flat surface 9a, the spindle 30 moves in a direction along the portion of the predetermined shape after the separation operation is performed and before the approach operation is performed.
[0116] (Embodiment 3) The present invention will be described below with reference to the drawings showing a machine tool according to a third embodiment. Fig. 20 is an explanatory diagram for explaining a search method of search method No. 3. The control unit 41 moves the spindle 30 based on set parameters (search interval, search width) in accordance with the teaching points T1, T2, ... of the reference path L0. That is, the spindle 30 is moved toward or away from the peripheral portion of the master workpiece 9 at the approach and separation points provided at the search intervals along the reference path L0. In the third embodiment, a search path K is generated so that the spindle 30 approaches or separates from the peripheral portion of the master workpiece 9 at the approach and separation points provided at the search intervals along the reference path L0.
[0117] Between T1 and T2 (when swinging without a hit) (i) At the teaching point T1, the main axis 30 is moved toward the teaching point T2 by half the search width in the direction (1) perpendicular to the vector from the teaching point T1 to the teaching point T2. (ii) If the master workpiece 9 is not contacted, the spindle 30 is moved away by half the search width in the opposite direction (2). (iii) If the master workpiece 9 is not contacted, the robot returns to the teaching point T1, and moves from the teaching point T1 in the direction of the teaching point T2 (the direction of (3)) by the search interval. (iv) Coordinate P after movement 1a In the same manner as in (i) to (iii), the coordinate P 1b In the coordinate P, the same operations as (i) to (iii) are performed. 1a , coordinate P 1b corresponds to the approach and separation point.
[0118] T2-P 2e (When contact occurs during movement of (3)) (i) After moving in the directions (1) and (2) at the teaching point T2, return to the teaching point T2 and move from the teaching point T2 in the direction of the teaching point T3 (direction (3)) by the search interval. If contact is detected during the movement, the coordinate P of the center of the spindle 30 at that time 2a Memorize. (ii) Coordinate P 2a In this state, the main shaft 30 is moved toward the contact point 1 in the direction indicated by (1). If contact is still detected, the main shaft 30 is moved away in the opposite direction indicated by (2). (iii) From the escape point moved in the direction of (2), move in the direction of the teaching point T3 (direction of (3)) by the search interval. If contact is detected during the movement, the coordinate P of the center of the spindle 30 at that time 2b Memorize. (iv) Move in the same way as above to coordinate P 2c From coordinate P 2e Memorize.
[0119] P 2e -P 3c (When contact occurs during movement of (1)) (i) Coordinate P 2eIf the distance from to teaching point T3 is shorter than the search interval, coordinate P 2e For the vector from to teaching point T3, approach in the direction of (1) by half the search width. If it comes into contact with the master work 9, its coordinates P 2e’ Memorize. (ii) After memorization, the coordinate P 2e Return to coordinate P 2e The robot moves in the direction from the target point T1 to the teaching point T3 (the direction of (3)) by the search interval. (iii) Make the same movements as above.
[0120] In the third embodiment, as in the first embodiment, a shape determination process is executed, and when the tool 30a comes into contact with a portion of a predetermined shape, for example, a flat surface 9a, the spindle 30 moves in a direction along the portion of the predetermined shape after the moving away operation and before the approaching operation.
[0121] It should be noted that a computer program can be deployed to be executed on a single computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communication network.
[0122] The embodiments disclosed herein should be considered to be illustrative in all respects and not restrictive. The scope of the present invention is intended to include all modifications within the scope of the claims and the scope equivalent to the claims. The matters described in each embodiment can be combined with each other. In addition, the independent claims and dependent claims described in the claims can be combined with each other in all combinations regardless of the citation format. Furthermore, the claims use a format (multiple claim format) in which a claim cites two or more other claims, but this is not limited to this. A format in which a multiple claim (multi-multi claim) citing at least one multiple claim may be used. [Explanation of symbols]
[0123] 1 Machine tools 30 spindle 30a tools 40 Control device 41 Control section 42 Auxiliary storage 421 Machining program DB 422 Machining Path Generation Program 43 Main memory
Claims
1. a first movement execution unit that executes an approaching operation of the spindle to the surface of the master work along a reference path along the surface of the master work, the reference path being determined based on a plurality of reference points; a contact determination unit that determines whether or not an end effector attached to the spindle has come into contact with the surface during an approaching operation by the first movement execution unit; an acquisition unit that acquires coordinates of the main axis when the contact determination unit determines that contact has occurred; a second movement execution unit that executes a separation operation with respect to the reference path after the acquisition unit acquires the coordinates of the main axis; Equipped with a control device which repeatedly executes an approaching operation by the first movement executing unit and a separating operation by the second movement executing unit, acquires coordinates of the spindle every time the end effector contacts the surface during the approaching operation, and generates a machining path of the spindle based on the acquired coordinates, a shape determination unit that determines whether or not the end effector has come into contact with a portion of a predetermined shape on the surface based on the plurality of coordinates or reference points; a third movement execution unit that executes a movement operation of the main shaft in a direction along the predetermined shape portion after the separation operation and before the approach operation when the shape determination unit determines that the end effector has come into contact with the predetermined shape portion; Equipped Control device.
2. The predetermined shape portion includes a flat portion. The control device according to claim 1 .
3. The determination by the shape determination unit and the execution of the movement operation of the spindle by the third movement execution unit are repeated, When the third movement execution unit executes the movement operation of the spindle a plurality of times, the movement distance of the movement operation of the spindle by the third movement execution unit becomes longer than the previous movement distance. The control device according to claim 1 or 2.
4. The movement distance of the movement operation of the spindle by the third movement execution unit is a distance obtained by adding a predetermined distance to the previous movement distance or a distance obtained by multiplying the previous movement distance by a predetermined coefficient. The control device according to claim 3.
5. The predetermined distance is variable. The control device according to claim 4.
6. After the acquisition unit acquires a first coordinate, which is a coordinate of the spindle, the third movement execution unit executes a movement operation of the spindle, and when the acquisition unit acquires a second coordinate, which is a coordinate of the spindle, an intermediate coordinate calculation unit is provided which calculates an intermediate coordinate located between the first coordinate and the second coordinate. The control device according to claim 1 or 2.
7. The shape determination unit is A vector derivation unit that derives a plurality of vectors based on the plurality of coordinates or reference points; a similarity determination unit that determines whether or not a similarity between the directions of the plurality of vectors is within a predetermined range; Equipped with The third movement execution unit, When the similarity determination unit determines that the similarity is within the predetermined range, after the separation operation, and before the approach operation, a movement operation of the main shaft is performed in a direction along the predetermined shape portion. The control device according to claim 1 or 2.
8. A reference vector derivation unit that derives a reference vector for calculating the similarity, the plurality of coordinates include a third coordinate and a fourth coordinate that are consecutively arranged, the vector derivation unit derives a first vector extending from the third coordinate to the fourth coordinate and a second vector extending from the third coordinate to the reference point; a first similarity calculation unit that calculates a first similarity which is a similarity between directions of the reference vector and the first vector, and a second similarity which is a similarity between directions of the first vector and the second vector, The similarity determination unit determines whether the first similarity is within a first predetermined range, and determines whether the second similarity is within a second predetermined range. The control device according to claim 7.
9. When the similarity determination unit determines that the first similarity is not within the first predetermined range or the second similarity is not within the second predetermined range, the execution of the movement operation of the spindle by the third movement execution unit is stopped. The control device according to claim 8.
10. the plurality of coordinates include a fifth coordinate, a sixth coordinate, a seventh coordinate, and an eighth coordinate which are consecutively arranged, the vector derivation unit derives a third vector extending from the fifth coordinate to the sixth coordinate, a fourth vector extending from the sixth coordinate to the seventh coordinate, and a fifth vector extending from the seventh coordinate to the eighth coordinate, a second similarity calculation unit that calculates a third similarity which is a similarity between directions of the third vector and the fourth vector, and a fourth similarity which is a similarity between directions of the third vector and the fifth vector, The similarity determination unit determines whether the third similarity and the fourth similarity are within the predetermined range. The control device according to claim 7.
11. The spindle is moved in a zigzag manner along the reference path. The control device according to claim 1 or 2.
12. The spindle is moved toward or away from the reference path at contact and separation points that are provided at predetermined intervals on the reference path. The control device according to claim 1 or 2.
13. executing an approaching movement of the spindle to the surface of the master workpiece along a reference path along the surface of the master workpiece that is determined based on a plurality of reference points; determining whether an end effector attached to the spindle has come into contact with the surface during the approaching operation; If it is determined that contact has occurred, the coordinates of the principal axis are obtained; After obtaining the coordinates of the main axis, a separation operation is performed with respect to the reference path; a machining path generating method for generating a machining path for the spindle, the machining path generating method comprising: repeatedly executing the approaching operation and the separating operation; acquiring coordinates of the spindle each time the end effector contacts the surface during the approaching operation; and generating a machining path for the spindle based on the acquired coordinates, determining whether the end effector has contacted a portion of the surface having a predetermined shape based on the plurality of coordinates or reference points; When it is determined that the end effector has come into contact with the predetermined shaped portion, after the separation operation is performed and before the approach operation is performed, a movement operation of the main shaft is performed in a direction along the predetermined shaped portion. A method for generating machining paths.
14. executing an approaching movement of the spindle to the surface of the master workpiece along a reference path along the surface of the master workpiece that is determined based on a plurality of reference points; determining whether an end effector attached to the spindle has come into contact with the surface during the approaching operation; If it is determined that contact has occurred, the coordinates of the principal axis are obtained; After obtaining the coordinates of the main axis, a separation operation is performed with respect to the reference path; a control device for executing a process of repeatedly executing the approaching operation and the separating operation, acquiring coordinates of the spindle each time the end effector contacts the surface during the approaching operation, and generating a machining path of the spindle based on the acquired coordinates, The control device includes: determining whether the end effector has contacted a portion of the surface having a predetermined shape based on the plurality of coordinates or reference points; When it is determined that the end effector has come into contact with the predetermined shaped portion, after the separation operation is performed and before the approach operation is performed, a movement operation of the main shaft is performed in a direction along the predetermined shaped portion. A computer program that executes a process.
15. executing an approaching movement of the spindle to the surface of the master workpiece along a reference path along the surface of the master workpiece that is determined based on a plurality of reference points; determining whether an end effector attached to the spindle has come into contact with the surface during the approaching operation; If it is determined that contact has occurred, the coordinates of the principal axis are obtained; After obtaining the coordinates of the main axis, a separation operation is performed with respect to the reference path; a storage medium storing a computer program for causing a control device to execute a process of repeatedly executing the approaching operation and the separating operation, acquiring coordinates of the spindle each time the end effector contacts the surface during the approaching operation, and generating a machining path of the spindle based on the acquired coordinates, The computer program causes the control device to determining whether the end effector has contacted a portion of the surface having a predetermined shape based on the plurality of coordinates or reference points; When it is determined that the end effector has come into contact with the predetermined shaped portion, after the separation operation is performed and before the approach operation is performed, a movement operation of the main shaft is performed in a direction along the predetermined shaped portion. Execute the process storage medium.
Citation Information
Patent Citations
Machine tool, machining path generation method, and computer program
WO2021200403A1