Machine tool interpolation tool changing method and device, computer readable storage medium

By using a tool change path determination model trained by machine learning to plan the tool removal and installation paths of the machine tool, the problems of insufficient flexibility and easy impact in the tool change process are solved, and efficient and safe tool change operation is achieved.

CN119566918BActive Publication Date: 2026-02-10ZHUHAI GREE INTELLIGENT EQUIP CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411917874.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2026-02-10
Estimated Expiration
2044-12-24

AI Technical Summary

Technical Problem

In the existing technology, the tool changing process of machine tools is not flexible enough, and it is easy to collide with the machine tool workpiece or adjacent tools. In addition, the tool changing path is limited and the mechanical travel is severely restricted.

Method used

A tool change path determination model trained by machine learning is used to obtain the current position of the tool to be removed, plan the tool removal and installation path, and control the machine tool to perform tool change operations according to the planned path, avoiding mechanical interference and impact.

Benefits of technology

It improves the flexibility of tool changing, avoids the risks in the tool changing process, achieves precise tool changing, and improves the production efficiency and safety of machine tools.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119566918B_ABST
    Figure CN119566918B_ABST
Patent Text Reader

Abstract

The application discloses a machine tool interpolation tool changing method and device and a computer readable storage medium. The method comprises the following steps: in the case that a tool changing signal is detected, the current position of a tool to be removed from the machine tool is acquired; the current position is taken as a starting position, and a tool magazine tool changing position is taken as an ending position, which are input into a tool changing path determination model to obtain a tool removal path for removing the tool to be removed from the machine tool; the machine tool is controlled to run according to the tool removal path until the tool to be removed is removed, and then a target installation position of a tool to be installed is acquired; the tool magazine tool changing position is taken as the starting position, and the target installation position is taken as the ending position, which are input into the tool changing path determination model to obtain an installation path for installing the tool to be installed to the machine tool; and the machine tool is controlled to run according to the installation path to move the tool to be installed to the target installation position. The application solves the technical problems in the related art that the tool changing process of the machine tool is not flexible enough and is prone to risks such as collision with a workpiece or adjacent tools of the machine tool.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine tool tool changing technology, and more specifically, to a machine tool interpolation tool changing method and apparatus, and a computer-readable storage medium. Background Technology

[0002] In modern manufacturing, Computer Numerical Control (CNC) machine tools are widely used in metal cutting, plastic molding, and composite material processing. The core advantages of CNC machine tools lie in their high precision, high efficiency, and automated operation capabilities, making them indispensable in the production of precision parts. The Automatic Tool Changer (ATC), a key component of CNC machine tools, greatly improves the machine's productivity and flexibility, allowing for rapid tool changes during machining to perform multiple operations. Automatic tool changers are typically equipped with a tool magazine, the structure and layout of which directly affect the efficiency and safety of the tool changing process. Common tool magazine types include: 1) Chain tool magazine: Chain tool magazines consist of a series of continuously arranged tool carriers, providing a high tool storage capacity. They are suitable for machining environments requiring a large number of tools. However, the non-circular layout and unequal spacing of tool positions in chain tool magazines may encounter mechanical interference problems during tool changing, especially when tool changing operations need to be performed at specific angles or positions. When using chain tool magazines on machine tools, the non-circular and unequally spaced tool positions require consideration of whether the spindle will interfere with the tools in adjacent positions during tool changing, which can easily lead to the risk of damage to the spindle and tools; 2) Disc tool magazine: Disc tool magazines have tools arranged in a circle around a central point. Tool changing operations usually require the spindle to be positioned perpendicular to the center line of the tool magazine. Although this layout provides the advantage of fast tool changing, its fixed angle limits the selection of the tool changing point; 3) Linear tool magazine: Linear tool magazines have tools arranged along a straight line. Although the tool changing path is clear and simple, it has strict requirements on the physical position of the tools and the linear movement range of the machine tool, limiting the tool changing flexibility of the machine tool. Currently, CNC machine tools use linear tool changing for automatic tool changing. However, due to the structural limitations of different tool magazines, linear tool changing cannot be performed.

[0003] In general, existing machine tool changing methods typically suffer from the following drawbacks: 1) Limited tool changing path: In chain or disc tool magazines, if tools in adjacent tool positions interfere with each other on a specific tool changing path, the traditional linear tool changing path cannot be used, which limits the tool changing capability of the machine tool; 2) Mechanical travel limitation: The mechanical travel range of the X, Y, and Z axes of the machine tool may limit the selection of the tool changing point, especially when oblique or complex path tool changing is required.

[0004] There is currently no effective solution to the problems of inflexible tool changing process and the risk of collision with machine tool workpieces or adjacent tools in the aforementioned related technologies. Summary of the Invention

[0005] This invention provides a machine tool interpolation and tool changing method and apparatus, and a computer-readable storage medium, to at least solve the technical problems in the related art, such as the lack of flexibility in the tool changing process of machine tools and the risk of collision with machine tool workpieces or adjacent tools.

[0006] According to one aspect of the present invention, a machine tool interpolation tool changing method is provided, comprising: upon detecting a tool changing signal, acquiring the current position of a tool to be removed in the machine tool, wherein the tool to be removed refers to a tool that needs to be removed from the machine tool; inputting the current position as a starting position and the tool magazine changing position as an ending position into a tool changing path determination model, so as to determine a tool removal path for removing the tool to be removed from the machine tool using the tool changing path determination model, wherein the tool magazine changing position refers to the contact position between the machine tool and the tool magazine for tool changing, and the tool changing path determination model is trained using multiple sets of training data through machine learning, each set of training data including: a sample starting position, a sample ending position, and a position relative to the sample starting position and the sample ending position. The corresponding sample tool change path is one of the following: a sample tool removal path or a sample tool installation path. The machine tool is controlled to run according to the tool removal path until the tool to be removed is removed, and then the target installation position of the tool to be installed is obtained. The tool to be installed refers to the tool in the tool magazine that needs to be installed on the machine tool. The tool magazine tool change position is used as the starting position, and the target installation position is used as the ending position, which are input into the tool change path determination model to determine the installation path for installing the tool to be installed on the machine tool. The machine tool is controlled to run according to the installation path to move the tool to be installed to the target installation position, completing the tool change operation. The tool change operation is the operation indicated by the tool change signal.

[0007] Optionally, before obtaining the current position of the tool to be removed in the machine tool, the machine tool interpolation tool changing method further includes one of the following: determining that the tool changing signal is detected when the type of the machining program of the machine tool is detected to have changed, wherein different types of machining programs require different types of tools to complete; determining that the tool changing signal is detected when the wear degree of the currently used tool in the machine tool reaches a wear threshold, and / or when the cumulative usage time of the currently used tool reaches a duration threshold, wherein the currently used tool refers to the tool currently installed in the machine tool; determining that the tool changing signal is detected when the current time is a preset tool changing time.

[0008] Optionally, upon detecting a tool change signal, obtaining the current position of the tool to be removed in the machine tool includes: upon detecting the tool change signal, controlling the spindle of the machine tool to stop rotating, wherein the spindle is a component in the machine tool used to rotate the tool to perform a cutting operation; controlling the first moving axis of the machine tool to move to move the tool to be removed to a preset safe position, wherein the preset safe position refers to a position where the distance between the tool and the currently processed workpiece exceeds a distance threshold, the currently processed workpiece refers to the workpiece to be processed placed on the worktable of the machine tool, and the first moving axis is a moving axis in the machine tool that moves in the vertical direction; upon determining that the tool to be removed is in the preset safe position, controlling the spindle to move so that the tool changing end of the spindle reaches the tool magazine changing position, wherein the tool changing end refers to the end of the spindle that contacts the tool magazine during tool changing; and obtaining the current position of the tool to be removed when the tool changing end of the spindle reaches the tool magazine changing position.

[0009] Optionally, before controlling the machine tool to run according to the tool removal path, the machine tool interpolation tool changing method further includes: performing a calibration operation on the tool pawl assembly in the tool magazine so that the alignment of the tool pawl assembly with the spindle in the machine tool is higher than a preset alignment threshold during the tool changing process, wherein the tool pawl assembly is a component in the tool magazine used to hold the tool, and the tool changing process includes: the process of removing the tool to be removed from the machine tool and the process of installing the tool to be installed onto the machine tool.

[0010] Optionally, controlling the machine tool to run according to the tool removal path until the tool to be removed is removed, and then obtaining the target installation position of the tool to be installed, includes: determining a tool removal program instruction to control the movement of the second and third moving axes of the machine tool according to the tool removal path, wherein the second and third moving axes are both moving axes in the horizontal direction of the machine tool, and the moving directions of the second and third moving axes are perpendicular; controlling the second and third moving axes to move according to the tool removal program instruction to complete the tool removal operation; and obtaining the target installation position of the tool to be installed after determining that the tool to be removed has been removed.

[0011] Optionally, controlling the machine tool to run according to the installation path to move the tool to be installed to the target installation position and complete the tool change operation includes: determining an installation program command for controlling the second and third moving axes of the machine tool to move according to the installation path; controlling the second and third moving axes to move according to the installation program command to move the tool to be installed to the target installation position and complete the tool change operation.

[0012] Optionally, the machine tool interpolation tool changing method further includes: after each time the tool changing path determination model generates a corresponding tool changing path based on the input start position and the end position, optimizing the tool changing path determination model using the input start position and the end position to obtain an optimized tool changing path determination model; and updating the tool changing path determination model to the optimized tool changing path determination model.

[0013] According to another aspect of the present invention, a machine tool interpolation tool changing device is also provided, comprising: a first acquisition unit, configured to acquire the current position of a tool to be removed in a machine tool when a tool changing signal is detected, wherein the tool to be removed refers to a tool that needs to be removed from the machine tool; and a first determination unit, configured to input the current position as a starting position and the tool magazine changing position as an ending position into a tool changing path determination model, so as to determine a tool removal path for removing the tool to be removed from the machine tool using the tool changing path determination model, wherein the tool magazine changing position refers to the contact position between the machine tool and the tool magazine for tool changing, and the tool changing path determination model is trained using multiple sets of training data through machine learning, each set of training data including: a sample starting position, a sample ending position, and a corresponding sample starting position and sample ending position. The sample tool change path is one of the following: a sample tool removal path or a sample tool installation path; a second acquisition unit is used to control the machine tool to run according to the tool removal path until the tool to be removed is removed, and then acquire the target installation position of the tool to be installed, wherein the tool to be installed refers to the tool in the tool magazine that needs to be installed on the machine tool; a second determination unit is used to input the tool magazine tool change position as the starting position and the target installation position as the ending position into the tool change path determination model, so as to use the tool change path determination model to determine the installation path for installing the tool to be installed on the machine tool; a control unit is used to control the machine tool to run according to the installation path, so as to move the tool to be installed to the target installation position and complete the tool change operation, wherein the tool change operation is the operation that needs to be completed as indicated by the tool change signal.

[0014] Optionally, the machine tool interpolation tool changing device further includes one of the following: a third determining unit, configured to determine that the tool changing signal is detected when the type of the machining program of the machine tool is detected to have changed before obtaining the current position of the tool to be removed in the machine tool, wherein different types of machining programs require different types of tools to complete; a fourth determining unit, configured to determine that the tool changing signal is detected when the wear degree of the currently used tool in the machine tool reaches a wear threshold, and / or when the cumulative usage time of the currently used tool reaches a duration threshold, wherein the currently used tool refers to the tool currently installed in the machine tool; and a fifth determining unit, configured to determine that the tool changing signal is detected when the current time is a preset tool changing time.

[0015] Optionally, the first acquisition unit includes: a first control module, configured to control the spindle of the machine tool to stop rotating when the tool change signal is detected, wherein the spindle is a component in the machine tool used to rotate the tool to perform a cutting operation; a second control module, configured to control the first moving axis of the machine tool to move to move the tool to be removed to a preset safe position, wherein the preset safe position refers to a position where the distance between the tool and the currently processed workpiece exceeds a distance threshold, the currently processed workpiece refers to the workpiece to be processed placed on the worktable of the machine tool, and the first moving axis is a moving axis in the machine tool that moves in the vertical direction; a third control module, configured to control the spindle to move when it is determined that the tool to be removed is in the preset safe position, so that the tool changing end of the spindle reaches the tool magazine changing position, wherein the tool changing end refers to the end of the spindle that contacts the tool magazine during tool changing; and a first acquisition module, configured to acquire the current position of the tool to be removed when the tool changing end of the spindle reaches the tool magazine changing position.

[0016] Optionally, the machine tool interpolation tool changing device further includes: an execution unit, used to perform a calibration operation on the tool pawl assembly in the tool magazine before controlling the machine tool to run according to the tool removal path, so that the alignment of the tool pawl assembly with the spindle in the machine tool is higher than a preset alignment threshold during the tool changing process, wherein the tool pawl assembly is a component in the tool magazine used to hold the tool, and the tool changing process includes: the process of removing the tool to be removed from the machine tool and the process of installing the tool to be installed onto the machine tool.

[0017] Optionally, the second acquisition unit includes: a first determining module, configured to determine a tool removal program instruction for controlling the movement of the second and third moving axes of the machine tool according to the tool removal path, wherein the second and third moving axes are both moving axes in the horizontal direction of the machine tool, and the moving directions of the second and third moving axes are perpendicular; a fourth control module, configured to control the second and third moving axes to move according to the tool removal program instruction to complete the tool removal operation; and a second acquisition module, configured to acquire the target installation position of the tool to be installed after determining that the tool to be removed has been removed.

[0018] Optionally, the control unit includes: a second determining module, configured to determine, according to the installation path, an installation procedure instruction for controlling the movement of the second and third moving axes of the machine tool; and a fifth control module, configured to control the second and third moving axes to move according to the installation procedure instruction, so as to move the tool to be installed to the target installation position and complete the tool changing operation.

[0019] Optionally, the machine tool interpolation tool changing device further includes: an optimization unit, used to optimize the tool changing path determination model by using the input start position and the end position after each time the corresponding tool changing path is generated using the tool changing path determination model based on the input start position and the end position, to obtain an optimized tool changing path determination model; and an update unit, used to update the tool changing path determination model to the optimized tool changing path determination model.

[0020] According to another aspect of the present invention, a machine tool interpolation tool changing system is also provided, wherein the machine tool interpolation tool changing system uses any of the machine tool interpolation tool changing methods described above.

[0021] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein the program executes any of the machine tool interpolation and tool changing methods described above.

[0022] According to another aspect of the present invention, a processor is also provided, the processor being used to run a program, wherein the program, when running, executes any of the machine tool interpolation and tool changing methods described above.

[0023] According to another aspect of the present invention, a computer program product is also provided, including computer instructions, which, when executed by a processor, perform any of the machine tool interpolation and tool changing methods described above.

[0024] In this embodiment of the invention, upon detecting a tool change signal, the current position of the tool to be removed from the machine tool is obtained, where the tool to be removed refers to the tool that needs to be removed from the machine tool. The current position is used as the starting position, and the tool magazine changing position is used as the ending position, which are then input into the tool change path determination model to determine the tool removal path from the machine tool. The tool magazine changing position refers to the contact position between the machine tool and the tool magazine during the tool change. The tool change path determination model is trained using multiple sets of training data through machine learning. Each set of training data includes: a sample starting position, a sample ending position, and a pair of values ​​corresponding to the sample starting and ending positions. The corresponding sample tool change path is one of the following: sample tool removal path or sample tool installation path. The machine tool is controlled to run according to the tool removal path until the tool to be removed is removed. Then, the target installation position of the tool to be installed is obtained, where the tool to be installed refers to the tool in the tool magazine that needs to be installed on the machine tool. The tool magazine tool change position is used as the starting position, and the target installation position is used as the ending position, which are input into the tool change path determination model to determine the installation path for installing the tool to be installed on the machine tool. The machine tool is controlled to run according to the installation path to move the tool to be installed to the target installation position, completing the tool change operation. The tool change operation is the operation indicated by the tool change signal. The above technical solutions achieve the goal of generating corresponding tool change paths using models to accurately perform tool changes when needed. They realize the technical effect of calling models or programs to generate tool change paths to control the multi-axis interpolation tool change of machine tools, improve the flexibility of tool changing, avoid potential risks of tool changing, and solve the technical problems in related technologies such as the lack of flexibility in the tool changing process of machine tools and the risk of collision with machine tool workpieces or adjacent tools. Attached Figure Description

[0025] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0026] Figure 1 This is a hardware structure block diagram of a mobile terminal for a machine tool interpolation and tool changing method according to an embodiment of the present invention.

[0027] Figure 2 This is a flowchart of a machine tool interpolation and tool changing method according to an embodiment of the present invention;

[0028] Figure 3 This is a flowchart of an optional machine tool interpolation and tool changing method according to an embodiment of the present invention;

[0029] Figure 4 This is a schematic diagram of a tool magazine according to an embodiment of the present invention;

[0030] Figure 5 This is a schematic diagram of the tool changing process according to an embodiment of the present invention;

[0031] Figure 6 This is a schematic diagram of a machine tool interpolation and tool changing device according to an embodiment of the present invention. Detailed Implementation

[0032] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0034] As described in the background section, the tool changing process of machine tools in related technologies is not flexible enough and is prone to collisions with the machine tool workpiece or adjacent tools. To address these shortcomings, embodiments of the present invention provide a machine tool interpolation tool changing method and apparatus, and a computer-readable storage medium.

[0035] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0036] The methods and embodiments provided in this invention can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a machine tool interpolation and tool changing method according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0037] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the machine tool interpolation and tool changing method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0038] According to an embodiment of the present invention, a method embodiment of a machine tool interpolation tool changing method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0039] Figure 2 This is a flowchart of a machine tool interpolation and tool changing method according to an embodiment of the present invention, such as... Figure 2 As shown, the method includes the following steps:

[0040] Step S202: When a tool change signal is detected, the current position of the tool to be removed in the machine tool is obtained, wherein the tool to be removed refers to the tool that needs to be removed from the machine tool.

[0041] In this embodiment, when a switching signal is detected, the current position of the tool to be removed from the machine tool (i.e., the tool to be removed) can be obtained first, so as to plan the path for removing the tool in the future.

[0042] Step S204: Input the current position as the starting position and the tool magazine change position as the ending position into the tool change path determination model, so as to determine the tool removal path to remove the tool from the machine tool. The tool magazine change position refers to the contact position between the machine tool and the tool magazine during tool change. The tool change path determination model is trained using multiple sets of training data through machine learning. Each set of training data includes: sample starting position, sample ending position, and sample tool change path corresponding to the sample starting position and sample ending position. The sample tool change path is one of the following: sample tool removal path and sample installation path.

[0043] In this embodiment, the current position of the tool to be removed can be used as the starting position for removing the tool, and the tool magazine changing position can be used as the ending position for removing the tool. The tool changing path determination model is then used to process the input data and plan the tool removal path to remove the tool from the machine tool back to the tool magazine.

[0044] Step S206: Control the machine tool to run along the tool removal path until the tool to be removed is removed, and then obtain the target installation position of the tool to be installed. The tool to be installed refers to the tool in the tool magazine that needs to be installed on the machine tool.

[0045] In this embodiment, the machine tool can be controlled to run according to the tool removal path planned above, so as to remove the tool to be removed from the machine tool and put it back into the tool magazine. Then, the specific position (i.e. the target installation position) of the new tool (i.e. the tool to be installed) to be installed on the machine tool can be obtained. It should be noted that when the new tool is installed on the spindle of the machine tool, it is usually installed at the position of the spindle before the tool change. However, considering the possible fine adjustments made by the robot, the actual coordinates may be slightly different.

[0046] Step S208: Input the tool changer position as the starting position and the target installation position as the ending position into the tool change path determination model, so as to determine the installation path for installing the tool to be installed onto the machine tool using the tool change path determination model.

[0047] In this embodiment, the tool changer position can be used as the starting position of the installation path for installing the tool to be installed onto the machine tool, and the target installation position can be used as the ending position of the installation path for installing the tool to be installed onto the machine tool. These positions are then input into the tool changer path determination model. The tool changer path determination model is used to process the input data and plan the installation path for installing the tool to be installed from the tool magazine onto the machine tool.

[0048] Step S210: Control the machine tool to run according to the installation path to move the tool to be installed to the target installation position and complete the tool change operation. The tool change operation is the operation that needs to be completed as indicated by the tool change signal.

[0049] In this embodiment, after the tool to be removed is removed, the machine tool can be controlled to run according to the installation path planned above, so as to install the tool to be installed from the tool magazine onto the machine tool to complete the tool change operation.

[0050] As described above, the technical solution provided by the above embodiments of the present invention can obtain the current position of the tool to be removed in the machine tool when a tool change signal is detected. The tool to be removed refers to the tool that needs to be removed from the machine tool. The current position is used as the starting position, and the tool magazine changing position is used as the ending position, which are input into the tool change path determination model to determine the tool removal path from the machine tool. The tool magazine changing position refers to the contact position between the machine tool and the tool magazine during tool change. The tool change path determination model is trained using multiple sets of training data through machine learning. Each set of training data includes: a sample starting position, a sample ending position, and a sample tool change path corresponding to the sample starting position and sample ending position. The sample tool change path is one of the following: a sample tool removal path or a sample tool installation path. The machine tool is then controlled to... The process follows the tool removal path until the tool to be removed is removed. Then, the target installation position of the tool to be installed is obtained. The tool to be installed refers to the tool in the tool magazine that needs to be installed on the machine tool. The tool magazine changing position is used as the starting position, and the target installation position is used as the ending position. These are input into the tool change path determination model to determine the installation path for installing the tool to be installed on the machine tool. The machine tool is controlled to run according to the installation path to move the tool to be installed to the target installation position, completing the tool change operation. The tool change operation is indicated by a tool change signal. This achieves the goal of generating corresponding tool change paths using the model to accurately perform tool changes when needed. It realizes the technical effect of calling the model or program to generate tool change paths to control the multi-axis interpolation tool change of the machine tool, improving the flexibility of tool changing and avoiding potential risks associated with tool changing.

[0051] Therefore, the technical solutions provided by the above embodiments of the present invention solve the technical problems in the related art, such as the machine tool tool changing process being inflexible and prone to collisions with the machine tool workpiece or adjacent tools.

[0052] According to the above embodiments of the present invention, before obtaining the current position of the tool to be removed in the machine tool, the machine tool interpolation tool changing method further includes one of the following: when a change in the type of machining program of the machine tool is detected, a tool changing signal is determined to be detected, wherein different types of machining programs require different types of tools to complete; when the wear degree of the currently used tool in the machine tool is detected to reach a wear threshold, and / or when the cumulative usage time of the currently used tool is detected to reach a duration threshold, a tool changing signal is determined to be detected, wherein the currently used tool refers to the tool currently installed in the machine tool; when the current time is detected to be a preset tool changing time, a tool changing signal is determined to be detected.

[0053] Specifically, in the machining process of CNC (Computer Numerical Control) machine tools, tool changing is usually performed in the following situations: 1) Machining program requirements: When the machining program requires the use of different types of tools for different machining operations, such as switching from drilling to milling, or from roughing to finishing, a tool changing operation is required; 2) Tool wear or damage: Tools will gradually wear down after prolonged use, affecting machining accuracy and surface quality. Once the tool reaches the preset wear level or is damaged, a tool changing operation is also required to ensure machining quality; 3) Machining task change: When the machining task or workpiece type changes, it may be necessary to use different specifications or types of tools, which will also trigger a tool changing operation; 4) Preventive maintenance: In some maintenance plans, regular tool replacement is preventative to avoid unexpected tool failures affecting production progress. CNC machine tools can usually identify and trigger tool changing in the following ways: 1) Machining program instructions: In the CNC machining program, specific codes (such as T codes) are used to specify the tool changing operation, for example, "T01 The "M06" command indicates switching to tool number 1 in the tool magazine. When the CNC system parses the tool change command, it will automatically stop the current machining step and trigger the tool change sequence; 2) Tool life management: Some advanced CNC systems monitor tool usage, including machining time, cutting amount, and other information. When the tool reaches its specified lifespan or an abnormal wear signal appears, the system will automatically issue a tool change command; 3) Manual command: In some cases, the operator may need to manually trigger the tool change, which is usually achieved by using the tool change button on the operation panel or by manually entering the tool change command in the control program; 4) Fault detection: If a tool fault is detected during machining, such as tool breakage, the system will immediately stop machining and issue a tool change signal to avoid further damage or safety accidents.

[0054] In a specific embodiment of the present invention, upon detecting a tool change signal, obtaining the current position of the tool to be removed in the machine tool includes: upon detecting a tool change signal, controlling the spindle of the machine tool to stop rotating, wherein the spindle is a component in the machine tool used to rotate the tool to perform a cutting operation; controlling the first moving axis of the machine tool to move to move the tool to be removed to a preset safe position, wherein the preset safe position refers to a position where the distance between the tool and the currently processed workpiece exceeds a distance threshold, the currently processed workpiece refers to the workpiece to be processed placed on the worktable of the machine tool, and the first moving axis is a moving axis in the machine tool that moves in the vertical direction; upon determining that the tool to be removed is in the preset safe position, controlling the spindle to move so that the tool changing end of the spindle reaches the tool magazine changing position, wherein the tool changing end refers to the end of the spindle that contacts the tool magazine during tool changing; and obtaining the current position of the tool to be removed when the tool changing end of the spindle reaches the tool magazine changing position.

[0055] Specifically, when a tool change signal is detected, the machine tool's control program first instructs the spindle to stop rotating and withdraws the tool from the workpiece to a safe position. This involves controlling the machine tool's moving axes (usually the Z-axis, but the X or Y axes can also be controlled; no specific limitation is made here. The Z-axis is the first moving axis in this embodiment, and the X and Y axes are the second and third moving axes, respectively) to move the tool away from the surface of the workpiece being machined. This ensures that the tool will not come into accidental contact with the workpiece during the tool change process, preventing damage to the workpiece, the tool, or the machine tool. This safe position is usually far from the workpiece surface to avoid collisions between the tool and the workpiece, the worktable, or other machine tool components during the movement. Then, the machine tool controls the spindle to move to the tool change point (i.e., the tool change position). This tool change point is usually located at a fixed position inside or near the tool magazine.

[0056] In an optional embodiment of the present invention, before controlling the machine tool to run according to the tool removal path, the machine tool interpolation tool changing method further includes: performing a calibration operation on the tool pawl assembly in the tool magazine so that the alignment of the tool pawl assembly with the spindle in the machine tool is higher than a preset alignment threshold during the tool changing process. The tool pawl assembly is a component in the tool magazine used to hold the tool. The tool changing process includes: the process of removing the tool to be removed from the machine tool and the process of installing the tool to be installed onto the machine tool.

[0057] The following is combined with Figure 3 and Figure 4 The embodiments of the present invention will be described in detail below. Figure 3 This is a flowchart of an optional machine tool interpolation and tool changing method according to an embodiment of the present invention. Figure 4 This is a schematic diagram of a tool magazine according to an embodiment of the present invention.

[0058] like Figure 3 As shown, firstly, a dial indicator is used to calibrate the tool magazine origin position (i.e., the tool change point, the position to which the tool is changed). In this embodiment of the invention, a dial indicator is used to calibrate the tool magazine origin position (i.e., the tool change point, the position to which the tool is changed). Figure 4 Taking the chain tool magazine as an example, the specific calibration process is as follows: First, to determine the accuracy of tool position 1, the tool claws of tool position 40 (T40) in tool magazine T1 in the Y direction need to be leveled. Ideally, the accuracy of both sides of the tool claws should be within 0.005mm. Then, perform fine-tuning of the tool magazine: Using the servo debugging software, open the inching control interface and adjust the inching speed to a low speed, preferably 10rpm, to ensure that the inching is slow enough. Then, enable the inching and jog the forward or directional buttons according to... Figure 4 The tool gripper is calibrated using a dial indicator. By adjusting the forward and reverse rotation, the parallelism of both sides of the tool gripper is repeatedly verified using the dial indicator until the accuracy on both sides of the tool gripper reaches 0.02mm. After the T40 tool gripper is leveled, the current position is set as the origin of tool magazine #1. The setting method is: P2-08 = 271, P2-71 = 1. P2-08 is a special parameter to be written, and parameter 271 represents the origin setting parameter. By setting the value of P2-71 to 1, the driver will set the current position to the origin position, and the tool magazine driver will be powered off and restarted. That is, tool gripper 1 is tool magazine #1. The above calibration process can be verified using a dial indicator. The alignment and handwheel adjustment calibrate the tool change point P4 of the tool magazine. The operator can determine the optimal path for the tool from the spindle to the tool change point or from the tool change point back to the spindle. This path is often an oblique line or curve, rather than a simple straight line. This is to accommodate the non-standard layout of the tool pawls in the chain tool magazine and avoid mechanical interference that may occur during straight tool changes. Through the linkage interpolation motion of the X and Y axes, the tool can accurately reach the tool change point on an oblique path to complete the tool exchange, and then return to the spindle on the same interpolation path, thereby ensuring the accuracy and safety of the entire tool change process.

[0059] In another specific embodiment of the present invention, the machine tool is controlled to run according to the tool removal path until the tool to be removed is removed, and then the target installation position of the tool to be installed is obtained. This includes: determining a tool removal program instruction for controlling the second and third moving axes of the machine tool to move according to the tool removal path, wherein the second and third moving axes are both moving axes in the horizontal direction of the machine tool, and the moving directions of the second and third moving axes are perpendicular; controlling the second and third moving axes to move according to the tool removal program instruction to complete the tool removal operation; and obtaining the target installation position of the tool to be installed after determining that the tool to be removed has been removed.

[0060] Specifically, the interpolation program of the machine tool can be determined based on the tool change path determined by the model to determine the tool removal path, thereby determining the tool removal program instructions that control the movement of the X and Y axes, and thus controlling the X and Y axes to move according to the program to complete the operation of removing the tool to be removed.

[0061] In another specific embodiment of the present invention, the control machine tool runs according to the installation path to move the tool to be installed to the target installation position and complete the tool change operation, including: determining the installation procedure instructions for moving the second and third moving axes of the machine tool according to the installation path; controlling the second and third moving axes to move according to the installation procedure instructions to move the tool to be installed to the target installation position and complete the tool change operation.

[0062] Specifically, the interpolation program of the machine tool can be determined based on the installation path generated by the tool change path model, so as to determine the installation program instructions for controlling the movement of the X and Y axes, thereby controlling the X and Y axes to move according to the program, thus completing the operation of installing the tool to be installed onto the machine tool.

[0063] The following is combined with Figure 5 The tool changing process in the embodiments of the present invention will be described in detail. Figure 5 This is a schematic diagram of the tool changing process according to an embodiment of the present invention, as shown below. Figure 3 and Figure 5As shown, after determining the XY position of tool #1 using the three-piece tool set and obtaining the X / Y position, remove the three-piece tool set and install the actual tool to obtain the Z-axis tool change point and spindle orientation angle. Assuming the X / Y positions of the tool change point are (X1, Y1), and the entry and exit directions of tool #1 are at a 45° angle to the XY axis, XY linkage is required for entry and exit of the tool gripper. Since handwheel operation is not possible, interpolation must be completed using G-code, with the handwheel retraction function controlling the speed. Create a new interpolation program in the program list and activate the handwheel simulation button (TEACH) in automatic mode. Slowly move the spindle towards the tool gripper by cranking the handwheel, allowing the machine tool spindle to move according to the program coordinates. The interpolation program is as follows: G53.2 G90 G01 X408.255 Y-1377.410, (X1, Y1), where G53.2 is the program's machine coordinate system, moving to the X and Y positions at a feed rate of 2000, i.e., the tool change point (408.255, -1377.410). M00 indicates the program stops; G53.2 G90 G01 X308.255 Y-1277.410F2000, (X1-100, Y1+100), where G53.2 is the program's machine coordinate system, moving to the X-100, Y+100 positions at a feed rate of 2000, i.e., the tool change point outside the tool chuck (308.255, -1277.410). M30 indicates the program ends; when using a real tool close to the tool chuck, determine the Z1 coordinate for the tool change, which can be visually observed (the vertical clearance between the tool chuck and the tool holder should be consistent); use the interpolation program handwheel. The simulation function slowly enters the tool holder. One person holds the tool handle and rotates it intermittently. When the tool handle cannot be rotated, it indicates that the XY tool change point setting is incorrect. The other person is responsible for turning the handwheel and constantly observing the XY axis load, which should be as low as possible (less than 10%). Here, it is necessary to manually find the locking position where the tool handle and tool holder are fixed, and find the positioning angle of the spindle during tool change. If the tool holder can be successfully locked, the two extreme angles of the spindle are taken and the average value is calculated to obtain the orientation angle S1. The orientation angle S1 is written into parameter 4077.

[0064] The three-piece set mentioned here refers to a set of tools used for tool positioning and calibration during machine tool operation. These mainly include: 1) Tool measuring instrument (or tool pre-setting instrument): used to measure the geometric parameters of the tool, such as length and diameter, before mounting the tool onto the machine tool, ensuring the correct position of the tool on the machine tool and thus improving machining accuracy; 2) Tool setting bar or tool setter: this type of tool is used to determine the position of the tool relative to the workpiece or machine tool coordinate system on the machine tool. By slight contact with the workpiece or using a sensor, the actual position of the tool tip can be determined, thereby correcting the tool's coordinate parameters; 3) Dial indicator or micrometer: used to measure the precise position of the tool in the tool magazine, especially when determining the offset of the tool relative to the tool change point. By using a dial indicator or micrometer mounted on the spindle, the distance the tool moves from the spindle to the tool magazine or from the tool magazine to the spindle can be precisely measured, ensuring the accuracy and safety of tool changes.

[0065] In another optional embodiment of the present invention, the machine tool interpolation tool changing method further includes: after each time the corresponding tool changing path is generated using the tool changing path determination model based on the input start position and end position, the tool changing path determination model is optimized using the input start position and end position to obtain an optimized tool changing path determination model; and the tool changing path determination model is updated to the optimized tool changing path determination model.

[0066] Specifically, in the process of continuously using the tool change path to determine the model's tool change path planning, the model can be continuously optimized using input and output data to improve its performance.

[0067] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0068] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0069] According to embodiments of the present invention, a machine tool interpolation tool changing device for implementing the above-described machine tool interpolation tool changing method is also provided. Figure 6 This is a schematic diagram of a machine tool interpolation and tool changing device according to an embodiment of the present invention, as shown below. Figure 6 As shown, the device includes: a first acquisition unit 61, a first determination unit 63, a second acquisition unit 65, a second determination unit 67, and a control unit 69. The interpolation tool changing device for this machine tool will now be described in detail.

[0070] The first acquisition unit 61 is used to acquire the current position of the tool to be removed in the machine tool when a tool change signal is detected, wherein the tool to be removed refers to the tool that needs to be removed from the machine tool.

[0071] The first determining unit 63 is used to input the current position as the starting position and the tool magazine tool change position as the ending position into the tool change path determining model, so as to determine the tool removal path to remove the tool to be removed from the machine tool using the tool change path determining model. The tool magazine tool change position refers to the contact position between the machine tool and the tool magazine for tool changing. The tool change path determining model is trained by machine learning using multiple sets of training data. Each set of training data includes: sample starting position, sample ending position, and sample tool change path corresponding to the sample starting position and sample ending position. The sample tool change path is one of the following: sample tool removal path and sample installation path.

[0072] The second acquisition unit 65 is used to control the machine tool to run according to the tool removal path until the tool to be removed is removed, and then acquire the target installation position of the tool to be installed, wherein the tool to be installed refers to the tool in the tool magazine that needs to be installed on the machine tool.

[0073] The second determining unit 67 is used to input the tool change position of the tool magazine as the starting position and the target installation position as the ending position into the tool change path determining model, so as to determine the installation path of the tool to be installed on the machine tool using the tool change path determining model.

[0074] Control unit 69 is used to control the machine tool to run according to the installation path, so as to move the tool to be installed to the target installation position and complete the tool change operation. The tool change operation is the operation that needs to be completed as indicated by the tool change signal.

[0075] It should be noted that the first acquisition unit 61, the first determination unit 63, the second acquisition unit 65, the second determination unit 67 and the control unit 69 mentioned above correspond to steps S202 to S210 in the above embodiments. The five units and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments.

[0076] As can be seen from the above, in the solution described in the above embodiments of the present invention, the first acquisition unit can acquire the current position of the tool to be removed in the machine tool when a tool change signal is detected, wherein the tool to be removed refers to the tool that needs to be removed from the machine tool; then the first determination unit inputs the current position as the starting position and the tool magazine tool change position as the ending position into the tool change path determination model, so as to determine the tool removal path to remove the tool to be removed from the machine tool using the tool change path determination model, wherein the tool magazine tool change position refers to the contact position between the machine tool and the tool magazine for tool change, and the tool change path determination model is trained using multiple sets of training data through machine learning, each set of multiple sets of training data includes: sample starting position, sample ending position, and sample tool change path corresponding to the sample starting position and sample ending position, and the sample tool change path is one of the following: sample tool removal path, sample installation path; then the second acquisition unit controls The machine tool runs along the tool removal path until the tool to be removed is removed, and then obtains the target installation position of the tool to be installed. The tool to be installed refers to the tool in the tool magazine that needs to be installed on the machine tool. Then, the second determining unit inputs the tool magazine changing position as the starting position and the target installation position as the ending position into the tool changing path determining model. This model determines the installation path for installing the tool to be installed onto the machine tool. Finally, the control unit controls the machine tool to run along the installation path to move the tool to the target installation position, completing the tool changing operation. The tool changing operation is indicated by a tool changing signal. This achieves the goal of generating corresponding tool changing paths using the model to accurately perform tool changing when needed. It realizes the technical effect of calling the model or program to generate tool changing paths to control the machine tool's multi-axis interpolation tool changing, improving the flexibility of tool changing and avoiding potential risks associated with tool changing.

[0077] Therefore, the technical solutions provided by the above embodiments of the present invention solve the technical problems in the related art, such as the machine tool tool changing process being inflexible and prone to collisions with the machine tool workpiece or adjacent tools.

[0078] In an optional embodiment, the machine tool interpolation tool changing device further includes one of the following: a third determining unit, configured to determine that a tool changing signal has been detected when a change in the type of machining program of the machine tool is detected before obtaining the current position of the tool to be removed in the machine tool, wherein different types of machining programs require different types of tools to complete; a fourth determining unit, configured to determine that a tool changing signal has been detected when the wear degree of the currently used tool in the machine tool reaches a wear threshold, and / or when the cumulative usage time of the currently used tool reaches a duration threshold, wherein the currently used tool refers to the tool currently installed in the machine tool; and a fifth determining unit, configured to determine that a tool changing signal has been detected when the current time is a preset tool changing time.

[0079] In one optional embodiment, the first acquisition unit includes: a first control module, configured to control the spindle of the machine tool to stop rotating when a tool change signal is detected, wherein the spindle is a component in the machine tool used to rotate the tool to perform a cutting operation; a second control module, configured to control the first moving axis of the machine tool to move to move the tool to be removed to a preset safe position, wherein the preset safe position refers to a position where the distance between the tool and the currently processed workpiece exceeds a distance threshold, the currently processed workpiece refers to the workpiece to be processed placed on the worktable of the machine tool, and the first moving axis is a moving axis in the machine tool that moves in the vertical direction; a third control module, configured to control the spindle to move when it is determined that the tool to be removed is in the preset safe position, so that the tool changing end of the spindle reaches the tool magazine changing position, wherein the tool changing end refers to the end of the spindle that contacts the tool magazine during tool changing; and a first acquisition module, configured to acquire the current position of the tool to be removed when the tool changing end of the spindle reaches the tool magazine changing position.

[0080] In an optional embodiment, the machine tool interpolation tool changing device further includes: an execution unit, used to perform a calibration operation on the tool pawl assembly in the tool magazine before controlling the machine tool to run according to the tool removal path, so that the alignment of the tool pawl assembly with the spindle in the machine tool is higher than a preset alignment threshold during the tool changing process, wherein the tool pawl assembly is a component in the tool magazine used to hold the tool, and the tool changing process includes: the process of removing the tool to be removed from the machine tool and the process of installing the tool to be installed onto the machine tool.

[0081] In one optional embodiment, the second acquisition unit includes: a first determining module, configured to determine a tool removal program instruction for controlling the movement of the second and third moving axes of the machine tool according to the tool removal path, wherein the second and third moving axes are both moving axes in the horizontal direction of the machine tool, and the moving directions of the second and third moving axes are perpendicular; a fourth controlling module, configured to control the second and third moving axes to move according to the tool removal program instruction to complete the tool removal operation; and a second acquisition module, configured to acquire the target installation position of the tool to be installed after determining that the tool to be removed has been removed.

[0082] In one optional embodiment, the control unit includes: a second determining module, configured to determine, according to the installation path, an installation procedure instruction for controlling the second and third moving axes of the machine tool to move; and a fifth control module, configured to control the second and third moving axes to move according to the installation procedure instruction, so as to move the tool to be installed to the target installation position and complete the tool change operation.

[0083] In one optional embodiment, the machine tool interpolation tool changing device further includes: an optimization unit, configured to optimize the tool changing path determination model by using the input start and end positions after each generation of the corresponding tool changing path using the tool changing path determination model based on the input start and end positions, to obtain an optimized tool changing path determination model; and an update unit, configured to update the tool changing path determination model to the optimized tool changing path determination model.

[0084] According to another aspect of the present invention, a machine tool interpolation tool changing system is also provided, which uses any of the above-described machine tool interpolation tool changing methods.

[0085] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein the program executes any of the above-described machine tool interpolation and tool changing methods.

[0086] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any communication device in a group of communication devices.

[0087] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: upon detecting a tool change signal, obtaining the current position of the tool to be removed from the machine tool, wherein the tool to be removed refers to the tool that needs to be removed from the machine tool; inputting the current position as the starting position and the tool magazine changing position as the ending position into the tool change path determination model, so as to determine the tool removal path for removing the tool to be removed from the machine tool using the tool change path determination model, wherein the tool magazine changing position refers to the contact position between the machine tool and the tool magazine for tool changing, and the tool change path determination model is trained using multiple sets of training data through machine learning, each set of training data including: sample starting position, sample ending position, ... The tool change path corresponding to the sample start position and sample end position is one of the following: sample tool removal path or sample installation path. The machine tool is controlled to run according to the tool removal path until the tool to be removed is removed, and then the target installation position of the tool to be installed is obtained. The tool to be installed refers to the tool in the tool magazine that needs to be installed on the machine tool. The tool magazine tool change position is used as the start position and the target installation position is used as the end position to input into the tool change path determination model, so as to determine the installation path of the tool to be installed on the machine tool using the tool change path determination model. The machine tool is controlled to run according to the installation path to move the tool to be installed to the target installation position and complete the tool change operation. The tool change operation is the operation that needs to be completed as indicated by the tool change signal.

[0088] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining that a tool change signal has been detected when the type of machining program of the machine tool is detected to have changed, wherein different types of machining programs require different types of tools to complete; determining that a tool change signal has been detected when the wear level of the currently used tool in the machine tool reaches a wear threshold, and / or when the cumulative usage time of the currently used tool reaches a duration threshold, wherein the currently used tool refers to the tool currently installed in the machine tool; and determining that a tool change signal has been detected when the current time is a preset tool change time.

[0089] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: upon detecting a tool change signal, controlling the machine tool spindle to stop rotating, wherein the spindle is a component in the machine tool used to rotate the tool to perform a cutting operation; controlling the first moving axis of the machine tool to move to move the tool to be removed to a preset safe position, wherein the preset safe position refers to a position where the distance between the tool and the currently processed workpiece exceeds a distance threshold, the currently processed workpiece refers to the workpiece to be processed placed on the machine tool's worktable, and the first moving axis is a moving axis in the machine tool that moves in the vertical direction; upon determining that the tool to be removed is in the preset safe position, controlling the spindle to move so that the tool changing end of the spindle reaches the tool magazine changing position, wherein the tool changing end refers to the end of the spindle that contacts the tool magazine during tool changing; upon the tool changing end of the spindle reaching the tool magazine changing position, obtaining the current position of the tool to be removed.

[0090] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: performing a calibration operation on the tool gripper assembly in the tool magazine so that the alignment of the tool gripper assembly with the spindle in the machine tool is higher than a preset alignment threshold during the tool changing process, wherein the tool gripper assembly is a component in the tool magazine used to hold the tool, and the tool changing process includes: the process of removing the tool to be removed from the machine tool and the process of installing the tool to be installed onto the machine tool.

[0091] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining a tool removal program instruction to control the movement of the second and third moving axes of the machine tool according to the tool removal path, wherein the second and third moving axes are both moving axes in the horizontal direction of the machine tool, and the moving directions of the second and third moving axes are perpendicular; controlling the second and third moving axes to move according to the tool removal program instruction to complete the tool removal operation to remove the tool to be removed; after determining that the tool to be removed has been removed, obtaining the target installation position of the tool to be installed.

[0092] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining installation program instructions for controlling the second and third moving axes of the machine tool to move according to the installation path; controlling the second and third moving axes to move according to the installation program instructions to move the tool to be installed to the target installation position and complete the tool change operation.

[0093] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: after each time the tool change path determination model generates a corresponding tool change path based on the input start position and end position, the model is optimized using the input start position and end position to obtain an optimized tool change path determination model; the tool change path determination model is updated to the optimized tool change path determination model.

[0094] According to another aspect of the present invention, a processor is also provided, which is used to run a program, wherein the program executes any of the above-described machine tool interpolation and tool changing methods during runtime.

[0095] According to another aspect of the present invention, a computer program product is also provided, including computer instructions, which, when executed by a processor, perform any one of the machine tool interpolation and tool changing methods.

[0096] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0097] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0098] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0099] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0100] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0101] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0102] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for interpolation and tool changing on a machine tool, characterized in that, include: When a tool change signal is detected, the current position of the tool to be removed in the machine tool is obtained, wherein the tool to be removed refers to the tool that needs to be removed from the machine tool; The current position is used as the starting position and the tool magazine change position is used as the ending position. These are input into the tool change path determination model to determine the tool removal path to remove the tool from the machine tool. The tool magazine change position refers to the contact position between the machine tool and the tool magazine during the tool change. The tool change path determination model is trained using multiple sets of training data through machine learning. Each set of training data includes: a sample starting position, a sample ending position, and a sample tool change path corresponding to the sample starting position and the sample ending position. The sample tool change path is one of the following: a sample tool removal path or a sample tool installation path. The machine tool is controlled to run according to the tool removal path until the tool to be removed is removed, and then the target installation position of the tool to be installed is obtained. The tool to be installed refers to the tool in the tool magazine that needs to be installed on the machine tool. The tool change position is used as the starting position and the target installation position is used as the ending position. These are input into the tool change path determination model to determine the installation path for installing the tool to be installed onto the machine tool. The machine tool is controlled to run according to the installation path to move the tool to be installed to the target installation position and complete the tool change operation, wherein the tool change operation is the operation that needs to be completed as indicated by the tool change signal; When a tool change signal is detected, the current position of the tool to be removed in the machine tool is obtained, including: when the tool change signal is detected, controlling the spindle of the machine tool to stop rotating, wherein the spindle is a component in the machine tool used to rotate the tool to perform a cutting operation; controlling the first moving axis of the machine tool to move to move the tool to be removed to a preset safe position, wherein the preset safe position refers to a position where the distance between the tool and the currently processed workpiece exceeds a distance threshold, the currently processed workpiece refers to the workpiece to be processed placed on the worktable of the machine tool, and the first moving axis is a moving axis in the machine tool that moves in the vertical direction; when it is determined that the tool to be removed is in the preset safe position, controlling the spindle to move so that the tool changing end of the spindle reaches the tool magazine changing position, wherein the tool changing end refers to the end of the spindle that contacts the tool magazine during tool changing; when the tool changing end of the spindle reaches the tool magazine changing position, obtaining the current position of the tool to be removed.

2. The machine tool interpolation and tool changing method according to claim 1, characterized in that, Before obtaining the current position of the tool to be retracted in the machine tool, one of the following is also included: If a change in the type of machining program of the machine tool is detected, it is determined that the tool change signal has been detected, wherein different types of machining programs require different types of tools to complete; If the wear level of the currently used tool in the machine tool is detected to reach a wear threshold, and / or the cumulative usage time of the currently used tool is detected to reach a duration threshold, the tool change signal is determined to be detected, wherein the currently used tool refers to the tool currently installed in the machine tool; If the current time is detected to be the preset tool change time, it is determined that the tool change signal has been detected.

3. The machine tool interpolation and tool changing method according to claim 1, characterized in that, Before controlling the machine tool to run according to the tool withdrawal path, the method further includes: A calibration operation is performed on the tool gripper assembly in the tool magazine so that the alignment of the tool gripper assembly with the spindle in the machine tool is higher than a preset alignment threshold during the tool changing process. The tool gripper assembly is a component in the tool magazine used to hold the tool. The tool changing process includes: removing the tool to be removed from the machine tool and installing the tool to be installed into the machine tool.

4. The machine tool interpolation and tool changing method according to claim 1, characterized in that, Controlling the machine tool to run along the tool removal path until the tool to be removed is removed, and then obtaining the target installation position of the tool to be installed, including: Based on the tool withdrawal path, a tool withdrawal program instruction is determined to control the movement of the second and third moving axes of the machine tool, wherein the second and third moving axes are both moving axes in the horizontal direction of the machine tool, and the moving directions of the second and third moving axes are perpendicular. Control the second and third moving axes to move according to the tool removal program command to complete the tool removal operation; After determining that the tool to be removed will be removed, the target installation position of the tool to be installed will be obtained.

5. The machine tool interpolation and tool changing method according to claim 1, characterized in that, Controlling the machine tool to run along the installation path to move the tool to be installed to the target installation position and complete the tool change operation includes: Based on the installation path, determine the installation procedure instructions for controlling the movement of the second and third moving axes of the machine tool; The second and third moving axes are controlled to move according to the installation instructions to move the tool to be installed to the target installation position, thereby completing the tool change operation.

6. The machine tool interpolation and tool changing method according to claim 1, characterized in that, Also includes: After each tool change path is generated using the tool change path determination model based on the input start position and end position, the model is optimized using the input start position and end position to obtain the optimized tool change path determination model. The tool change path determination model is updated to the optimized tool change path determination model.

7. A machine tool interpolation and tool changing device, characterized in that, include: The first acquisition unit is used to acquire the current position of the tool to be removed in the machine tool when a tool change signal is detected, wherein the tool to be removed refers to the tool that needs to be removed from the machine tool; The first determining unit is used to input the current position as the starting position and the tool magazine changing position as the ending position into the tool changing path determining model, so as to determine the tool removal path for removing the tool to be removed from the machine tool using the tool changing path determining model. The tool magazine changing position refers to the contact position between the machine tool and the tool magazine for tool changing. The tool changing path determining model is trained using multiple sets of training data through machine learning. Each set of multiple sets of training data includes: a sample starting position, a sample ending position, and a sample tool changing path corresponding to the sample starting position and the sample ending position. The sample tool changing path is one of the following: a sample tool removal path and a sample installation path. The second acquisition unit is used to control the machine tool to run according to the tool removal path until the tool to be removed is removed, and then acquire the target installation position of the tool to be installed, wherein the tool to be installed refers to the tool in the tool magazine that needs to be installed on the machine tool; The second determining unit is used to input the tool change position of the tool magazine as the starting position and the target installation position as the ending position into the tool change path determining model, so as to use the tool change path determining model to determine the installation path of the tool to be installed on the machine tool; The control unit is used to control the machine tool to run according to the installation path, so as to move the tool to be installed to the target installation position and complete the tool change operation, wherein the tool change operation is the operation that needs to be completed as indicated by the tool change signal; The first acquisition unit includes: a first control module, configured to control the spindle of the machine tool to stop rotating when the tool change signal is detected, wherein the spindle is a component of the machine tool used to rotate the tool to perform a cutting operation; a second control module, configured to control the first moving axis of the machine tool to move to move the tool to be removed to a preset safe position, wherein the preset safe position refers to a position where the distance between the tool and the currently processed workpiece exceeds a distance threshold, the currently processed workpiece refers to the workpiece to be processed placed on the worktable of the machine tool, and the first moving axis is a moving axis of the machine tool that moves in the vertical direction; a third control module, configured to control the spindle to move when it is determined that the tool to be removed is in the preset safe position, so that the tool changing end of the spindle reaches the tool magazine changing position, wherein the tool changing end refers to the end of the spindle that contacts the tool magazine during tool changing; and a first acquisition module, configured to acquire the current position of the tool to be removed when the tool changing end of the spindle reaches the tool magazine changing position.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program executes the machine tool interpolation and tool changing method according to any one of claims 1 to 6.

9. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, the machine tool interpolation and tool changing method according to any one of claims 1 to 6 is performed.

Citation Information

Patent Citations

  • Automatic tool changing method, system and device of numerical control machine tool and storage medium

    CN116475815A

  • Path planning and model training method and system, storage medium and robot

    CN118913275A