Machine tool interpolation tool changing method and device and computer readable storage medium
By applying the tool change path determination model obtained by machine learning in machine tools, the problems of tool change path limitation and mechanical stroke limitation of machine tools are solved, and a more flexible and safe tool change process is achieved.
Patent Information
- Application Number
- CN202411917874.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-12-24
AI Technical Summary
The tool change method of machine tools in the prior art has the risk of restricting the tool change path and mechanical stroke limit, which leads to the inflexible tool change process and is prone to impact with machine tool workpieces or adjacent tools.
When a tool change signal is detected, the tool change path obtained by machine learning is determined using multiple sets of training data, the tool change path of the tool to be removed and the installation path of the tool to be installed, and the machine tool is controlled to operate according to these paths to achieve flexible tool change operations.
It improves the flexibility of tool change in machine tools, avoids the risk of impact with machine tool workpieces or adjacent tools during tool change, and enhances the safety and efficiency of tool change.
Smart Images

Figure CN119566918A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine tool tool changing, and in particular to a machine tool interpolation tool changing method and device, and a computer-readable storage medium. Background Art
[0002] In modern manufacturing, CNC machine tools (CNC, Computer Numerical Control) are widely used in metal cutting, plastic molding, composite material processing and other fields. The core advantages of CNC machine tools are their high precision, high efficiency and automated operation capabilities, which make them indispensable in the production of precision parts. As a key component of CNC machine tools, the automatic tool changer (ATC, Automatic Tool Changer) system greatly improves the productivity and flexibility of machine tools, allowing different tools to be quickly replaced during the processing process to perform multiple processes. The automatic tool changer system is usually equipped with a tool magazine, and the structure and layout of the tool magazine directly affect the efficiency and safety of the tool change process. Common tool magazine types include: 1) Chain tool magazine: Chain tool magazine is composed of a series of continuously arranged tool carriers, which can provide a high tool storage capacity and is suitable for processing environments that require a large number of tools. However, the non-circular layout and unequally spaced tool position arrangement of the chain tool magazine may encounter mechanical interference problems during tool change, especially when the tool change operation needs to be performed at a specific angle or position. When the machine tool uses a chain tool magazine, the tool magazine has non-circular and equidistant tool positions. When changing tools on the machine tool, it is necessary to consider whether the spindle will interfere with the tools in the adjacent tool positions when changing tools, which may easily lead to the risk of damaging the spindle and the tool; 2) Disc tool magazine: The tools of the disc tool magazine are arranged in a circle around a center point. Usually, the tool change operation requires the spindle to be positioned perpendicular to the center line of the tool magazine. Although this layout provides the advantage of fast tool change, its fixed angle limits the choice of tool change points; 3) Linear tool magazine: The tools of the linear tool magazine are arranged along a straight line. Although the tool change path is clear and simple, it has strict requirements on the physical position of the tool and the linear movement range of the machine tool, which limits the tool change flexibility of the machine tool. At present, the automatic tool change of CNC machine tools adopts the linear tool change method. When facing different tool magazines, the linear tool change method cannot be used due to the structural limitations of the tool magazine.
[0003] In general, the tool changing methods of machine tools in the prior art usually have the following defects: 1) Limited tool change path: In a chain or disc tool magazine, if the tools in adjacent tool positions interfere with each other on a specific tool change path, the traditional straight tool change 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-axis, Y-axis and Z-axis of the machine tool may limit the selection of tool change points, especially when oblique or complex path tool change is required.
[0004] Currently, no effective solution has been proposed to address the problems in the above-mentioned related technologies, such as the tool changing process of the machine tool is not flexible enough and is prone to collision with the machine tool workpiece or adjacent tools. Summary of the invention
[0005] The embodiments of the present invention provide a machine tool interpolation tool changing method and device, and a computer-readable storage medium, so as to at least solve the technical problems in the related art that the tool changing process of the machine tool is not flexible enough and is prone to the risk of collision with the machine tool workpiece or adjacent tools.
[0006] According to one aspect of an embodiment of the present invention, a method for interpolation tool changing of a machine tool is provided, comprising: when a tool changing signal is detected, obtaining 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 in the machine tool; inputting the current position as a starting position and a tool magazine tool changing position as an ending position into a tool change path determination model, so as to use the tool change path determination model to determine a tool withdrawal path for removing the tool to be removed from the machine tool, wherein the tool magazine tool changing position refers to a contact position between the machine tool and the tool magazine for tool change, and the tool change path determination model is obtained by training using multiple sets of training data by means of machine learning, and each of the multiple sets of training data includes: a sample starting position, a sample ending position, and a contact position with the sample starting position and the sample ending position. A corresponding sample tool change path, wherein the sample tool change path is one of the following: a sample tool withdrawal path, a sample installation path; controlling the machine tool to operate according to the tool withdrawal path until the tool to be withdrawn is withdrawn, and obtaining a 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; inputting 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; controlling the machine tool to operate according to the installation path to move the tool to be installed to the target installation position, and completing the tool change operation, wherein the tool change operation is the operation that needs to be completed as 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 also includes one of the following: when it is detected that the type of the machining program of the machine tool has changed, it is determined that the tool change signal has been detected, wherein different types of the machining programs require the use of different types of the tools to complete; when it is detected that the wear degree of the tool currently in use in the machine tool has reached a wear threshold, and / or when it is detected that the cumulative usage time of the tool currently in use has reached a time threshold, it is determined that the tool change signal has been detected, wherein the tool currently in use refers to the tool currently installed in the machine tool; when it is detected that the current moment is a preset tool change moment, it is determined that the tool change signal has been detected.
[0008] Optionally, 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, the spindle of the machine tool is controlled to stop rotating, wherein the spindle is a component in the machine tool used to rotate the tool to perform a cutting operation; the first movable axis of the machine tool is controlled to move to move the tool to be removed to a preset safety position, wherein the preset safety position refers to a position where the distance from the current workpiece to be processed exceeds a distance threshold, the current workpiece to be processed refers to the workpiece to be processed placed on the workbench of the machine tool, and the first movable axis is a movable axis that moves in a vertical direction in the machine tool; when it is determined that the tool to be removed is in the preset safety position, the spindle is controlled to move so that the tool change end of the spindle reaches the tool magazine tool change position, wherein the tool change end refers to an end of the spindle that contacts the tool magazine during tool change; when the tool change end of the spindle reaches the tool magazine tool change position, the current position of the tool to be removed is obtained.
[0009] Optionally, before controlling the machine tool to run according to the tool withdrawal path, the machine tool interpolation tool changing method also includes: performing a correction operation on the tool claw assembly in the tool magazine to make the alignment of the tool claw assembly with the spindle in the machine tool during the tool change process higher than a preset alignment threshold, wherein the tool claw assembly is a component in the tool magazine for clamping the tool, and the tool changing process includes: a process of removing the tool to be withdrawn from the machine tool, and a process of installing the tool to be installed onto the machine tool.
[0010] Optionally, the machine tool is controlled to operate according to the tool withdrawal path until the tool to be withdrawn is withdrawn, and then the target installation position of the tool to be installed is obtained, including: determining a tool withdrawal program instruction for controlling the second moving axis and the third moving axis of the machine tool to move according to the tool withdrawal path, wherein the second moving axis and the third moving axis are both moving axes that move in the machine tool in a horizontal direction, and the moving directions of the second moving axis and the third moving axis are perpendicular; controlling the second moving axis and the third moving axis to move according to the tool withdrawal program instruction to complete the tool withdrawal operation of withdrawing the tool to be withdrawn; after determining that the tool to be withdrawn is withdrawn, obtaining the target installation position of the tool to be installed.
[0011] Optionally, the machine tool is controlled to operate according to the installation path to move the tool to be installed to the target installation position to complete the tool changing operation, including: determining the installation program instructions for controlling the second moving axis and the third moving axis of the machine tool to move according to the installation path; controlling the second moving axis and the third moving axis to move according to the installation program instructions to move the tool to be installed to the target installation position to complete the tool changing operation.
[0012] Optionally, the machine tool interpolation tool changing method also includes: after each time the tool change path determination model is used to generate a corresponding tool change path according to the input starting position and the input ending position, optimizing the tool change path determination model using the input starting position and the input ending position to obtain an optimized tool change path determination model; updating the tool change path determination model to the optimized tool change path determination model.
[0013] According to another aspect of an embodiment of the present invention, a machine tool interpolation tool changing device is also provided, comprising: a first acquisition unit, for acquiring the current position of a tool to be removed in the machine tool when a tool change signal is detected, wherein the tool to be removed refers to a tool that needs to be removed in the machine tool; a first determination unit, for inputting the current position as a starting position and a tool magazine tool change position as an ending position into a tool change path determination model, so as to use the tool change path determination model to determine the tool withdrawal path for removing the tool to be removed from the machine tool, 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 obtained by training using multiple sets of training data through machine learning, and each of the multiple sets of training data includes: a sample starting position, a sample ending position, and a sample starting position and a sample ending position corresponding to the sample starting position and the sample ending position. A sample tool change path, wherein the sample tool change path is one of the following: a sample tool withdrawal path, a sample installation path; a second acquisition unit, used to control the machine tool to operate according to the tool withdrawal path until the tool to be withdrawn is withdrawn, and then obtain 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, 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 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, used to control the machine tool to operate 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 also includes one of the following: a third determination unit, used to determine that the tool change signal is detected when it is detected that the type of the machining program of the machine tool has changed before obtaining the current position of the tool to be removed in the machine tool, wherein different types of the machining programs require the use of different types of tools to complete; a fourth determination unit, used to determine that the tool change signal is detected when it is detected that the wear degree of the tool currently in use in the machine tool reaches a wear threshold, and / or when it is detected that the cumulative usage time of the tool currently in use reaches a time threshold, wherein the tool currently in use refers to the tool currently installed in the machine tool; a fifth determination unit, used to determine that the tool change signal is detected when it is detected that the current moment is a preset tool change moment.
[0015] Optionally, the first acquisition unit includes: a first control module, which is used 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, which is used to control the first movable axis of the machine tool to move so as to move the tool to be removed to a preset safety position, wherein the preset safety position refers to a position where the distance between the tool and the current workpiece exceeds a distance threshold, the current workpiece refers to the workpiece to be processed placed on the workbench of the machine tool, and the first movable axis is a movable axis that moves in a vertical direction in the machine tool; a third control module, which is used to control the spindle to move when it is determined that the tool to be removed is in the preset safety position so that the tool change end of the spindle reaches the tool magazine tool change position, wherein the tool change end refers to an end of the spindle that contacts the tool magazine during tool change; the first acquisition module is used to acquire the current position of the tool to be removed when the tool change end of the spindle reaches the tool magazine tool change position.
[0016] Optionally, the machine tool interpolation tool changing device also includes: an execution unit, which is used to perform a correction operation on the tool claw assembly in the tool magazine before controlling the machine tool to run according to the tool withdrawal path, so that the alignment of the tool claw assembly with the spindle in the machine tool during the tool changing process is higher than a preset alignment threshold, wherein the tool claw assembly is a component in the tool magazine for clamping the tool, and the tool changing process includes: a process of removing the tool to be withdrawn from the machine tool, and a process of installing the tool to be installed onto the machine tool.
[0017] Optionally, the second acquisition unit includes: a first determination module, used to determine the tool withdrawal program instructions for controlling the second movable axis and the third movable axis of the machine tool to move according to the tool withdrawal path, wherein the second movable axis and the third movable axis are movable axes that move in the horizontal direction in the machine tool, and the moving directions of the second movable axis and the third movable axis are perpendicular; a fourth control module, used to control the second movable axis and the third movable axis to move according to the tool withdrawal program instructions to complete the tool withdrawal operation of withdrawing the tool to be withdrawn; a second acquisition module, used to obtain the target installation position of the tool to be installed after determining to withdraw the tool to be withdrawn.
[0018] Optionally, the control unit includes: a second determination module, used to determine the installation program instructions for controlling the second movable axis and the third movable axis of the machine tool to move according to the installation path; a fifth control module, used to control the second movable axis and the third movable axis to move according to the installation program instructions, 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 also includes: an optimization unit, which is used to optimize the tool change path determination model using the input starting position and the input ending position after each time the tool change path determination model is used to generate a corresponding tool change path according to the input starting position and the input ending position, so as to obtain an optimized tool change path determination model; and an updating unit, which is used to update the tool change path determination model to the optimized tool change path determination model.
[0020] According to another aspect of an embodiment of the present invention, a machine tool interpolation tool changing system is further provided, wherein the machine tool interpolation tool changing system uses any one of the above-mentioned machine tool interpolation tool changing methods.
[0021] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored program, wherein the program executes any one of the above-mentioned machine tool interpolation tool changing methods.
[0022] According to another aspect of an embodiment of the present invention, a processor is further provided, and the processor is used to run a program, wherein the program executes any one of the above-mentioned machine tool interpolation tool changing methods when running.
[0023] According to another aspect of an embodiment of the present invention, a computer program product is further provided, comprising computer instructions, wherein when the computer instructions are executed by a processor, any one of the machine tool interpolation tool changing methods is executed.
[0024] In an embodiment of the present invention, when a tool change signal is detected, the current position of a tool to be removed in a machine tool is obtained, wherein the tool to be removed refers to a tool that needs to be removed in the machine tool; the current position is used as a starting position, and the tool magazine tool change position is used as an end position. The tool change path determination model is used to determine the tool withdrawal path for removing the tool to be removed from the machine tool, wherein the tool magazine tool change position refers to the contact position between the machine tool and the tool magazine for tool change. The tool change path determination model is obtained by training using multiple sets of training data through machine learning, and each of the multiple sets of training data includes: a sample starting position, a sample end position, and a contact with the sample starting position and the sample end position. A corresponding sample tool change path is provided, where the sample tool change path is one of the following: a sample tool withdrawal path and a sample installation path; the machine tool is controlled to run according to the tool withdrawal path until the tool to be withdrawn is withdrawn, and a target installation position of the tool to be installed is obtained, wherein the tool to be installed refers to a tool in the tool magazine that needs to be installed on the machine tool; the tool magazine tool change position is used as a starting position, and the target installation position is used as an end position to input into a 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; 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 the tool change operation is completed, wherein the tool change operation is the operation that needs to be completed as indicated by the tool change signal. Through the above technical scheme, the purpose of using the model to generate the corresponding tool change path so as to accurately change the tool when it is needed is achieved, and the technical effect of calling the model or program to generate the tool change path to control the multi-axis of the machine tool for interpolation tool change is achieved, which improves the flexibility of tool change and avoids the possible risks of tool change, thereby solving the technical problems in the related technology that the tool change process of the machine tool is not flexible enough and is prone to collision with the machine tool workpiece or adjacent tools. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0026] Figure 1 It is a hardware structure block diagram of a mobile terminal of a machine tool interpolation tool changing method according to an embodiment of the present invention;
[0027] Figure 2 is a flow chart of a machine tool interpolation tool changing method according to an embodiment of the present invention;
[0028] Figure 3 is a flow chart of an optional machine tool interpolation tool changing method according to an embodiment of the present invention;
[0029] Figure 4 is a schematic diagram of a tool magazine according to an embodiment of the present invention;
[0030] Figure 5 is a schematic diagram of a tool changing process according to an embodiment of the present invention;
[0031] Figure 6 Schematic diagram of a machine tool interpolation tool changing device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work 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 and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0034] As introduced in the background technology, the tool changing process of the machine tool in the related art is not flexible enough and is prone to collision with the machine tool workpiece or adjacent tools. In view of the above defects, a machine tool interpolation tool changing method and device and a computer readable storage medium are provided in the embodiments of the present invention.
[0035] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0036] The method embodiments provided in the embodiments of the present invention can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a machine tool interpolation tool changing method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0037] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the machine tool interpolation tool changing method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above network 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. The above network specific examples may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as 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 of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0039] Figure 2 is a flow chart of a machine tool interpolation tool changing method according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0040] Step S202, when a tool change signal is detected, the current position of a tool to be removed in the machine tool is obtained, wherein the tool to be removed refers to a tool that needs to be removed in the machine tool.
[0041] In this embodiment, when the switching signal is detected, the current position of the tool to be removed in the machine tool (ie, the tool to be removed) can be obtained first, so as to facilitate the subsequent planning of the path for removing the tool.
[0042] Step S204, input the current position as the starting position and the tool magazine tool changing position as the ending position into the tool changing path determination model, so as to use the tool changing path determination model to determine the tool withdrawal path for removing the tool to be removed from the machine tool, wherein the tool magazine tool changing position refers to the contact position between the machine tool and the tool magazine for tool change, and the tool changing path determination model is obtained by training using multiple sets of training data through machine learning, and each set of the 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, and the sample tool changing path is one of the following: a sample tool withdrawal path and a 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 tool changing position can be input into the tool change path determination model as the ending position for removing the tool. The tool change path determination model can be used to process the input data and plan the tool withdrawal path for withdrawing the tool to be removed from the machine tool to the tool magazine.
[0044] Step S206, controlling the machine tool to run according to the tool withdrawal path until the tool to be withdrawn is withdrawn, and obtaining 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.
[0045] In this embodiment, the machine tool can be controlled to run according to the tool withdrawal path obtained by the above plan, so as to remove the tool to be withdrawn from the machine tool and install it back into the tool magazine, and then obtain the new tool (i.e., the tool to be installed) in the tool magazine that needs to be installed on the machine tool and install it on the specific position (i.e., the target installation position) on the machine tool; 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, but considering the fine-tuning that may be performed by the robot, the actual coordinates may be slightly different.
[0046] Step S208: 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 determine the installation path for installing the tool to be installed on the machine tool using the tool change path determination model.
[0047] In this embodiment, the tool magazine tool changing position can also be used as the starting position of the installation path for installing the tool to be installed on 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 on the machine tool, and input into the tool change path determination model, so that the tool change path determination model can be used to process the input data and plan the installation path for installing the tool to be installed from the tool magazine to the machine tool.
[0048] Step S210, controlling the machine tool to run according to the installation path to move the tool to be installed to the target installation position to complete the tool changing operation, wherein the tool changing operation is the operation that needs to be completed as indicated by the tool changing 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 obtained by the above plan, so as to install the tool to be installed from the tool magazine to the machine tool to complete the tool change operation.
[0050] As can be seen from the above, through the technical solution provided by the above embodiment of the present invention, the current position of the tool to be removed in the machine tool can be obtained when the tool change signal is detected, wherein the tool to be removed refers to the tool that needs to be removed in the machine tool; the current position is used as the starting position, and the tool magazine tool change position is used as the end position. Input into the tool change path determination model, so as to use the tool change path determination model to determine the tool withdrawal path for removing the tool to be removed from the machine tool, 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 obtained by training using multiple groups of training data through machine learning, and each group of the multiple groups of training data includes: a sample starting position, a sample end position, and a sample tool change path corresponding to the sample starting position and the sample end position, and the sample tool change path is one of the following: a sample tool withdrawal path, a sample installation path; control the machine tool according to Run according to the tool withdrawal path until the tool to be withdrawn is withdrawn, and then obtain 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; input the tool magazine tool change position as the starting position and the target installation position as the end 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; control the machine tool to run according to the installation path to move the tool to be installed to the target installation position to complete the tool change operation, wherein the tool change operation is the operation that needs to be completed indicated by the tool change signal, thereby achieving the purpose of generating the corresponding tool change path by using the model to accurately change the tool when the tool change is needed, and realizing the technical effect of calling the model or program to generate the tool change path to control the multi-axis of the machine tool to perform interpolation tool change, thereby improving the flexibility of tool change and avoiding the possible risks of tool change.
[0051] Therefore, the technical solution provided by the above-mentioned embodiment of the present invention 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 the risk of collision with the machine tool workpiece or adjacent tools.
[0052] According to the above-mentioned embodiment 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 also includes one of the following: when it is detected that the type of the machining program of the machine tool has changed, it is determined that a tool change signal has been detected, wherein different types of machining programs require the use of different types of tools to complete; when it is detected that the wear degree of the tool currently in use in the machine tool has reached a wear threshold, and / or when it is detected that the cumulative usage time of the tool currently in use has reached a time threshold, it is determined that a tool change signal has been detected, wherein the tool currently in use refers to the tool currently installed in the machine tool; when it is detected that the current moment is a preset tool change moment, it is determined that a tool change signal has been detected.
[0053] Specifically, in the processing of CNC (Computer Numerical Control) machine tools, tool change is usually performed in the following situations: 1) Processing program requirements: When different types of tools are required to perform different processing steps in the processing program, such as switching from drilling to milling, or from rough processing to finishing, a tool change operation is required; 2) Tool wear or damage: The tool will gradually wear out after long-term use, affecting the processing accuracy and surface quality. Once the tool reaches the preset wear degree or damage, in order to ensure the processing quality, a tool change is also required; 3) Processing task change: When the processing task or workpiece type changes, it may be necessary to use tools of different specifications or types, which will also trigger a tool change operation; 4) Preventive maintenance: In some maintenance plans, regular tool replacement is preventive to avoid unexpected tool failures affecting production progress; and CNC machine tools can usually identify and trigger tool changes in the following ways: 1) Processing program instructions: In CNC processing programs, specific codes (such as T codes) are used to specify tool change operations, for example, "T01 The "M06" command means changing to tool No. 1 in the tool library. When the CNC system interprets the tool change command, it will automatically stop the current processing step and trigger the tool change sequence; 2) Tool life management: Some advanced CNC systems monitor the use of tools, including processing time, cutting volume and other information. When the tool reaches the specified service life or shows abnormal wear, the system will automatically issue a tool change command; 3) Manual command: In some cases, the operator may need to manually trigger a tool change, which is usually achieved by pressing the tool change button on the operation panel or manually entering a tool change command in the control program; 4) Fault detection: If a tool fault is detected during processing, such as a broken tool, the system will immediately stop processing and issue a tool change signal to avoid further damage or safety accidents.
[0054] In a specific embodiment of the present invention, when a tool change signal is detected, the current position of a tool to be removed in a machine tool is obtained, including: when the tool change signal is detected, the spindle of the machine tool is controlled to stop rotating, wherein the spindle is a component in the machine tool used to rotate the tool to perform a cutting operation; the first movable axis of the machine tool is controlled to move to move the tool to be removed to a preset safety position, wherein the preset safety position refers to a position where the distance between the tool and the current workpiece exceeds a distance threshold, the current workpiece refers to the workpiece to be processed placed on a workbench of the machine tool, and the first movable axis is a movable axis that moves in a vertical direction in the machine tool; when it is determined that the tool to be removed is in the preset safety position, the spindle is controlled to move so that the tool changing end of the spindle reaches the tool changing position of the tool magazine, wherein the tool changing end refers to an end of the spindle that contacts the tool magazine during tool changing; when the tool changing end of the spindle reaches the tool changing position of the tool magazine, the current position of the tool to be removed is obtained.
[0055] Specifically, when the tool change signal is detected, the control program of the machine tool will first instruct the spindle to stop rotating and withdraw the tool from the workpiece to a safe position, that is, control the moving axis of the machine tool (usually control the movement of the Z axis, of course, the X axis or Y axis can also be controlled, there is no specific limitation here, the Z axis is the first moving axis in the embodiment of the present invention, and the X axis and Y axis are the second moving axis and the third moving axis in the embodiment of the present invention) to move, so as to move the tool away from the surface of the workpiece currently being processed by a certain distance to ensure that there is no accidental contact with the workpiece during the tool replacement process, causing damage to the workpiece, damage to the tool or machine tool failure. This safe position is usually far away from the workpiece surface, which can prevent the tool from colliding with the workpiece, workbench or other machine tool parts during movement; then the machine tool will control the movement of the spindle through the control program to move it to the tool magazine tool change point (i.e., tool magazine tool change position), where the tool magazine 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 withdrawal path, the machine tool interpolation tool changing method also includes: performing a correction operation on the tool claw assembly in the tool magazine to make the alignment of the tool claw assembly with the spindle in the machine tool during the tool change process higher than a preset alignment threshold, wherein the tool claw assembly is a component in the tool magazine for clamping the tool, and the tool changing process includes: a process of removing the tool to be withdrawn from the machine tool, and a process of installing the tool to be installed onto the machine tool.
[0057] Combine the following Figure 3 and Figure 4 The above embodiments of the present invention are described in detail. Figure 3 is a flow chart of an optional machine tool interpolation tool changing method according to an embodiment of the present invention, Figure 4 Schematic diagram of a tool magazine according to an embodiment of the present invention.
[0058] like Figure 3 As shown, firstly, the tool magazine origin position (i.e., the tool magazine tool change point, the position to be changed) is calibrated using a micrometer. Figure 4 The chain tool magazine shown in the figure is used as an example to explain. The specific correction process is as follows: first, to determine the accuracy of tool position 1, it is necessary to level the tool claw of tool position 40 (T40) in the T1 tool magazine in the Y direction. It is best to ensure that the accuracy of both sides of the tool claw is within 0.005mm; then fine-tune the tool magazine operation: use the servo debugging software, open the inch control interface, adjust the inch speed to a low speed, 10rpm is recommended, to ensure that the inch speed is slow enough, and then enable it, jog the forward or direction button according to the Figure 4 The claws are checked by the table, and the parallelism of the two sides of the claws is repeatedly verified by adjusting the forward and reverse rotation. When the accuracy of both sides of the claws reaches 0.02mm, the current position is set to the 1# tool magazine origin after the T40 claws are leveled. The setting method is: P2-08=271, P2-71=1, P2-08 is a special parameter write, 271 parameter represents the origin setting parameter, by setting the P2-71 value to 1, the drive will set the current position to the origin position, the tool magazine drive is powered off and restarted, that is, claw 1 is the tool magazine No. 1 position; through the above correction process, the micrometer can be calibrated The tool change point P4 of the tool magazine is corrected by handwheel adjustment. The operator can determine the optimal path for the tool from the spindle to the tool change point of the tool magazine, or from the tool change point of the tool magazine back to the spindle. This path is often an oblique line or curve, rather than a simple straight line path. This is to adapt to the non-standard layout of the tool claws in the chain tool magazine and avoid mechanical interference that may occur during the straight-line tool change process. Through the linked interpolation movement of the X-axis and Y-axis, the tool can accurately reach the tool change point with an oblique path to complete the tool exchange, and then return to the spindle with 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, a machine tool is controlled to run according to a tool withdrawal path until the tool to be withdrawn is removed, and a target installation position of the tool to be installed is obtained, including: determining a tool withdrawal program instruction for controlling a second moving axis and a third moving axis of the machine tool to move according to the tool withdrawal path, wherein the second moving axis and the third moving axis are both moving axes that move in a horizontal direction in the machine tool, and the moving directions of the second moving axis and the third moving axis are perpendicular; controlling the second moving axis and the third moving axis to move according to the tool withdrawal program instruction to complete the tool withdrawal operation of withdrawing the tool to be withdrawn; after determining that the tool to be withdrawn is removed, obtaining the target installation position of the tool to be installed.
[0060] Specifically, the interpolation program of the machine tool can be determined according to the tool withdrawal path generated by the tool change path determination model to determine the tool withdrawal program instructions for controlling the movement of the X-axis and the Y-axis, thereby controlling the X-axis and the Y-axis to move according to the program, thereby completing the operation of removing the tool to be removed.
[0061] In another specific embodiment of the present invention, a machine tool is controlled to operate according to an installation path to move the tool to be installed to a target installation position to complete a tool changing operation, including: determining installation program instructions for controlling the second moving axis and the third moving axis of the machine tool to move according to the installation path; controlling the second moving axis and the third moving axis to move according to the installation program instructions to move the tool to be installed to the target installation position to complete the tool changing operation.
[0062] Specifically, the interpolation program of the machine tool can be determined according to the installation path generated by the tool change path determination model to determine the installation program instructions for controlling the movement of the X-axis and the Y-axis, thereby controlling the X-axis and the Y-axis to move according to the program, thereby completing the operation of installing the tool to be installed on the machine tool.
[0063] Combine the following Figure 5 The tool changing process in the embodiment of the present invention is described in detail. Figure 5 is a schematic diagram of a tool changing process according to an embodiment of the present invention, such as Figure 3 and Figure 5As shown, use the three-piece set to determine the XY position of the 1# tool position. After obtaining the X / Y position, remove the three-piece set, put on the real tool to obtain the Z-axis tool change point and the spindle orientation angle. Assume that the X / Y positions of the tool change point are (X1, Y1) respectively, and the entry and exit directions of the 1# tool are at a 45° angle to the XY axis. XY linkage is required to enter and exit the tool claw, and the handwheel cannot be used for operation. Therefore, it is necessary to complete it through G code deviation compensation, and use the handwheel retraction function to control the speed; create a new interpolation program in the program list, and light up the handwheel simulation button (TEACH) in automatic mode, shake the handwheel spindle slowly to approach the tool claw, and let the spindle of the machine tool 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 running machine coordinates, and it moves to the X, Y position at a feed rate of 2000, that is, the position of the tool change point (408.255, -1377.410) M00 indicates program stop; G53.2 G90 G01 X308.255 Y-1277.410F2000, (X1-100, Y1+100), where G53.2 is the program running machine coordinates, and it moves to the X-100, Y+100 position at a feed rate of 2000, that is, the position of the tool change point outside the tool claw (308.255, -1277.410), M30 indicates program end; use a real knife to approach the tool claw to determine the tool change Z1 coordinate, and you can see it with your naked eyes (the upper and lower gaps between the tool claw and the tool handle are consistent); use the interpolation program handwheel The simulation function slowly enters the tool claw. One person holds the tool handle and rotates it from time to time. When the tool handle cannot be rotated, it means that the XY tool change point is set incorrectly. The other person is responsible for shaking the hand wheel and observing the XY axis load. The load should be as small as possible. It is necessary to manually find the fixed position of the tool handle and the tool claw to find the positioning angle of the spindle when changing the tool. If the tool claw can be smoothly entered, take the two spindle limit angles and calculate the average value to obtain the orientation angle S1, and write the orientation angle S1 into parameter 4077.
[0064] The three-piece set here refers to a set of tools used for tool positioning and calibration during machine tool operation, mainly including: 1) Tool measuring instrument (or tool presetter): used to measure the length, diameter and other geometric parameters of the tool before installing it on the machine tool to ensure the correct position of the tool on the machine tool, thereby improving the machining accuracy; 2) Tool setting rod or tool setting instrument: This type of tool is used to determine the position of the tool relative to the workpiece or the machine tool coordinate system on the machine tool. By slightly contacting the workpiece or using a sensor, the actual position of the tool tip can be determined, and then the coordinate parameters of the tool can be corrected; 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. The dial indicator or micrometer installed on the spindle can accurately measure the moving distance of the tool from the spindle to the tool magazine or from the tool magazine to the spindle to ensure the accuracy and safety of tool change.
[0065] In another optional embodiment of the present invention, the machine tool interpolation tool changing method also includes: after each time using the tool change path determination model to generate a corresponding tool change path according to the input starting position and ending position, optimizing using the input starting position and ending position to obtain an optimized tool change path determination model; updating the tool change path determination model to the optimized tool change path determination model.
[0066] Specifically, in the process of continuously using the tool change path determination model to plan the tool change path, the model can be continuously optimized using input and output data to improve the performance of the model.
[0067] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0068] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0069] According to an embodiment of the present invention, a machine tool interpolation tool changing device for implementing the above-mentioned machine tool interpolation tool changing method is also provided. Figure 6 Schematic diagram of a machine tool interpolation tool changing device according to an embodiment of the present invention. Figure 6 As shown, the device comprises: 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 machine tool interpolation tool changing device is described in detail below.
[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 in the machine tool.
[0071] The first determination unit 63 is used to input the current position as the starting position and the tool magazine tool changing position as the ending position into the tool changing path determination model, so as to use the tool changing path determination model to determine the tool withdrawal path for removing the tool to be removed from the machine tool, wherein the tool magazine tool changing position refers to the contact position between the machine tool and the tool magazine for tool change, and the tool changing path determination model is obtained by training with multiple sets of training data through machine learning, and each set of the 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, and the sample tool changing path is one of the following: a sample tool withdrawal path and a sample installation path.
[0072] The second acquisition unit 65 is used to control the machine tool to run according to the tool withdrawal path until the tool to be withdrawn is withdrawn, and then obtain 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 determination unit 67 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 determine the installation path for installing the tool to be installed on the machine tool using the tool change path determination model.
[0074] The control unit 69 is used to 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 changing operation, wherein the tool changing operation is the operation that needs to be completed as indicated by the tool changing signal.
[0075] It should be noted here that the above-mentioned first acquisition unit 61, first determination unit 63, second acquisition unit 65, second determination unit 67 and control unit 69 correspond to steps S202 to S210 in the above-mentioned embodiments, and the five units have the same instances and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the above-mentioned embodiments.
[0076] It can be seen from the above that in the scheme recorded in the above-mentioned embodiment of the present invention, the first acquisition unit can be used to acquire the current position of the tool to be removed in the machine tool when the tool change signal is detected, wherein the tool to be removed refers to the tool that needs to be removed in the machine tool; then the first determination unit 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 determination model, so as to use the tool change path determination model to determine the tool withdrawal path for removing the tool to be removed from the machine tool, 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 obtained by training using multiple sets of training data through machine learning, and each set of the multiple sets 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, and the sample tool change path is one of the following: a sample tool withdrawal path, a sample installation path; then the second acquisition unit is used to control The machine tool operates according to the tool withdrawal path until the tool to be withdrawn is withdrawn, and the target installation position of the tool to be installed is obtained, wherein 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 determination unit is used to input the tool magazine tool change position as the starting position and the target installation position as the end position into the tool change path determination model, so as to determine the installation path for installing the tool to be installed on the machine tool by using the tool change path determination model; finally, the control unit is used to control the machine tool to operate 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 indicated by the tool change signal, and the purpose of generating the corresponding tool change path by using the model to accurately change the tool when the tool change is needed is achieved, and the technical effect of calling the model or program to generate the tool change path to control the multi-axis of the machine tool to perform interpolation tool change is achieved, thereby improving the flexibility of tool change and avoiding possible risks of tool change.
[0077] Therefore, the technical solution provided by the above-mentioned embodiment of the present invention 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 the risk of collision with the machine tool workpiece or adjacent tools.
[0078] In an optional embodiment, the machine tool interpolation tool changing device also includes one of the following: a third determination unit, used to determine that a tool change signal is detected when it is detected that the type of the machine tool's machining program has changed before obtaining the current position of the tool to be removed in the machine tool, wherein different types of machining programs require the use of different types of tools to complete; a fourth determination unit, used to determine that a tool change signal is detected when it is detected that the wear degree of the tool currently in use in the machine tool reaches a wear threshold, and / or when it is detected that the cumulative usage time of the tool currently in use reaches a time threshold, wherein the tool currently in use refers to the tool currently installed in the machine tool; a fifth determination unit, used to determine that a tool change signal is detected when it is detected that the current moment is a preset tool change moment.
[0079] In an optional embodiment, the first acquisition unit includes: a first control module, which is used 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, which is used to control the first movable axis of the machine tool to move so as to move the tool to be removed to a preset safety position, wherein the preset safety position refers to a position where the distance between the tool and the current workpiece exceeds a distance threshold, the current workpiece refers to the workpiece to be processed placed on the workbench of the machine tool, and the first movable axis is a movable axis that moves in a vertical direction in the machine tool; a third control module, which is used to control the movement of the spindle when it is determined that the tool to be removed is in the preset safety position, so that the tool changing end of the spindle reaches the tool changing position of the tool magazine, wherein the tool changing end refers to the end of the spindle that contacts the tool magazine during tool changing; the first acquisition module is used to obtain the current position of the tool to be removed when the tool changing end of the spindle reaches the tool changing position of the tool magazine.
[0080] In an optional embodiment, the machine tool interpolation tool changing device also includes: an execution unit, which is used to perform a correction operation on the tool claw assembly in the tool magazine before controlling the machine tool to run according to the tool withdrawal path, so that the alignment of the tool claw assembly with the spindle in the machine tool during the tool changing process is higher than a preset alignment threshold, wherein the tool claw assembly is a component in the tool magazine for clamping the tool, and the tool changing process includes: a process of removing the tool to be withdrawn from the machine tool, and a process of installing the tool to be installed onto the machine tool.
[0081] In an optional embodiment, the second acquisition unit includes: a first determination module, which is used to determine the tool withdrawal program instructions for controlling the second moving axis and the third moving axis of the machine tool to move according to the tool withdrawal path, wherein the second moving axis and the third moving axis are moving axes that move in the horizontal direction in the machine tool, and the moving directions of the second moving axis and the third moving axis are perpendicular; a fourth control module, which is used to control the second moving axis and the third moving axis to move according to the tool withdrawal program instructions to complete the tool withdrawal operation of withdrawing the tool to be withdrawn; and a second acquisition module, which is used to obtain the target installation position of the tool to be installed after determining that the tool to be withdrawn is to be withdrawn.
[0082] In an optional embodiment, the control unit includes: a second determination module, used to determine the installation program instructions for controlling the second movable axis and the third movable axis of the machine tool to move according to the installation path; a fifth control module, used to control the second movable axis and the third movable axis to move according to the installation program instructions, so as to move the tool to be installed to the target installation position and complete the tool changing operation.
[0083] In an optional embodiment, the machine tool interpolation tool changing device also includes: an optimization unit, which is used to optimize the tool change path determination model using the input starting position and ending position each time after the tool change path determination model is used to generate the corresponding tool change path according to the input starting position and ending position, so as to obtain an optimized tool change path determination model; an updating unit, which is used to update the tool change path determination model to the optimized tool change path determination model.
[0084] According to another aspect of an embodiment of the present invention, a machine tool interpolation tool changing system is further provided. The machine tool interpolation tool changing system uses any one of the above-mentioned machine tool interpolation tool changing methods.
[0085] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided. The computer-readable storage medium includes a stored program, wherein the program executes any one of the above-mentioned machine tool interpolation tool changing methods.
[0086] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the communication devices in a communication device group.
[0087] Optionally, in the present embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: when a tool change signal is detected, obtaining the current position of a tool to be removed in the machine tool, wherein the tool to be removed refers to a tool to be removed in the machine tool; inputting the current position as the starting position and the tool magazine tool change position as the ending position into a tool change path determination model, so as to determine the tool withdrawal path for removing the tool to be removed from the machine tool by 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 obtained by training using multiple sets of training data by machine learning, and each of the multiple sets of training data includes: a sample starting position, a sample ending position, A sample tool change path corresponding to a sample starting position and a sample ending position, wherein the sample tool change path is one of the following: a sample tool withdrawal path and a sample installation path; the machine tool is controlled to run according to the tool withdrawal path until the tool to be withdrawn is withdrawn, and a target installation position of the tool to be installed is obtained, wherein the tool to be installed refers to a 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 to input 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; 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 the tool change operation is completed, wherein 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 codes for executing the following steps: upon detecting that a change has been made in the type of machining program of the machine tool, determining that a tool change signal has been detected, wherein different types of machining programs require the use of different types of tools to complete; upon detecting that the degree of wear of the tool currently in use in the machine tool has reached a wear threshold, and / or upon detecting that the cumulative usage time of the tool currently in use has reached a time threshold, determining that a tool change signal has been detected, wherein the tool currently in use refers to the tool currently installed in the machine tool; upon detecting that the current moment is a preset tool change moment, determining that a tool change signal has been detected.
[0089] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: when a 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 movable axis of the machine tool to move to move the tool to be removed to a preset safety position, wherein the preset safety position refers to a position where the distance from the currently processed workpiece exceeds a distance threshold, the currently processed workpiece refers to the workpiece to be processed placed on the workbench of the machine tool, and the first movable axis is a movable axis that moves in a vertical direction in the machine tool; when it is determined that the tool to be removed is in the preset safety position, controlling the spindle to move so that the tool changing end of the spindle reaches the tool changing position of the tool magazine, 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 changing position of the tool magazine, 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 codes for executing the following steps: performing a correction operation on a tool claw assembly in a tool magazine so that the alignment of the tool claw assembly with the spindle in a machine tool during a tool change is higher than a preset alignment threshold, wherein the tool claw assembly is a component in the tool magazine for clamping the tool, and the tool change process includes: a process of removing the tool to be removed from the machine tool, and a 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 codes for executing the following steps: determining a tool withdrawal program instruction for controlling the movement of a second moving axis and a third moving axis of the machine tool according to a tool withdrawal path, wherein the second moving axis and the third moving axis are moving axes that move in a horizontal direction in the machine tool, and the moving directions of the second moving axis and the third moving axis are perpendicular; controlling the second moving axis and the third moving axis to move according to the tool withdrawal program instruction to complete the tool withdrawal operation of withdrawing the tool to be withdrawn; after determining that the tool to be withdrawn is to be withdrawn, obtaining a target installation position of the tool to be installed.
[0092] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: determining the installation program instructions for controlling the second moving axis and the third moving axis of the machine tool to move according to the installation path; controlling the second moving axis and the third moving axis to move according to the installation program instructions to move the tool to be installed to the target installation position to complete the tool changing operation.
[0093] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: after each time the tool change path determination model is used to generate a corresponding tool change path according to the input starting position and ending position, optimization is performed using the input starting position and ending position to obtain an optimized tool change path determination model; and the tool change path determination model is updated to the optimized tool change path determination model.
[0094] According to another aspect of an embodiment of the present invention, a processor is further provided, and the processor is used to run a program, wherein when the program is run, any one of the above-mentioned machine tool interpolation tool changing methods is executed.
[0095] According to another aspect of an embodiment of the present invention, a computer program product is provided, comprising computer instructions, and when the computer instructions are executed by a processor, any one of the machine tool interpolation tool changing methods is executed.
[0096] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0097] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made 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. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0099] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0100] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0101] If the integrated unit is implemented in the form of 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, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0102] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A machine tool interpolation tool changing method, characterized in that: include: When a tool change signal is detected, the current position of a tool to be removed in the machine tool is obtained, wherein the tool to be removed refers to a tool to be removed in the machine tool; The current position is used as the starting position, and the tool magazine tool change position is used as the ending position to be input into the tool change path determination model, so as to use the tool change path determination model to determine the tool withdrawal path for withdrawing the tool to be withdrawn from the machine tool, 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 obtained by training using multiple sets of training data through machine learning, and each of the multiple sets 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, and the sample tool change path is one of the following: a sample tool withdrawal path, a sample installation path; Controlling the machine tool to run according to the tool withdrawal path until the tool to be withdrawn is withdrawn, and obtaining a 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; Inputting 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 determine the installation path of installing the tool to be installed on the machine tool by 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 to complete a tool change operation, wherein the tool change operation is an operation that needs to be completed as indicated by the tool change signal.
2. The machine tool interpolation tool changing method according to claim 1, characterized in that: Before obtaining the current position of the tool to be removed in the machine tool, one of the following is also included: In the case where it is detected that the type of the machining program of the machine tool has changed, determining that the tool change signal has been detected, wherein different types of the machining programs require different types of the tools to be used to complete them; When it is detected that the wear degree of the tool currently in use in the machine tool reaches a wear threshold, and / or when it is detected that the accumulated usage time of the tool currently in use reaches a time threshold, it is determined that the tool change signal is detected, wherein the tool currently in use refers to the tool currently installed in the machine tool; In the case where it is detected that the current moment is the preset tool-changing moment, it is determined that the tool-changing signal is detected.
3. The machine tool interpolation tool changing method according to claim 1, characterized in that: 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 so as to move the tool to be removed to a preset safety position, wherein the preset safety position refers to a position where the distance from the currently processed workpiece exceeds a distance threshold, the currently processed workpiece refers to a workpiece to be processed placed on a worktable of the machine tool, and the first moving axis is a moving axis in the machine tool that moves in a vertical direction; When it is determined that the tool to be removed is in a preset safe position, the spindle is controlled to move so that the tool changing end of the spindle reaches the tool changing position of the tool magazine, 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-changing position of the tool magazine, the current position of the tool to be removed is acquired.
4. The machine tool interpolation 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 correction operation is performed on the tool claw assembly in the tool magazine so that the alignment of the tool claw assembly with the spindle in the machine tool during the tool changing process is higher than a preset alignment threshold, wherein the tool claw assembly is a component in the tool magazine used to clamp the tool, and the tool changing process includes: a process of removing the tool to be removed from the machine tool, and a process of installing the tool to be installed onto the machine tool.
5. The machine tool interpolation tool changing method according to claim 1, characterized in that: Controlling the machine tool to run according to the tool withdrawal path until the tool to be withdrawn is withdrawn, and obtaining a target installation position of the tool to be installed, including: Determining a tool withdrawal program instruction for controlling a second movable axis and a third movable axis of the machine tool to move according to the tool withdrawal path, wherein the second movable axis and the third movable axis are movable axes that move in a horizontal direction in the machine tool, and the moving directions of the second movable axis and the third movable axis are perpendicular to each other; Controlling the second moving axis and the third moving axis to move according to the tool withdrawal program instruction to complete the tool withdrawal operation of withdrawing the tool to be withdrawn; After determining to remove the tool to be removed, the target installation position of the tool to be installed is obtained.
6. The machine tool interpolation tool changing method according to claim 1, characterized in that: Controlling the machine tool to run according to the installation path to move the tool to be installed to the target installation position to complete the tool change operation, including: Determining, according to the installation path, installation program instructions for controlling the second movable axis and the third movable axis of the machine tool to move; The second movable axis and the third movable axis are controlled to move according to the instructions of the installation program to move the tool to be installed to the target installation position to complete the tool changing operation.
7. The machine tool interpolation tool changing method according to claim 1, characterized in that: Also includes: After each time the tool change path determination model is used to generate a corresponding tool change path according to the input starting position and the input ending position, optimization is performed using the input starting position and the input ending 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.
8. A machine tool interpolation tool changing device, characterized in that: include: A first acquisition unit is used to acquire the current position of a tool to be removed in the machine tool when a tool change signal is detected, wherein the tool to be removed refers to a tool that needs to be removed in the machine tool; A first determination unit is used to input the current position as a starting position and the tool magazine tool change position as an ending position into a tool change path determination model, so as to use the tool change path determination model to determine a tool withdrawal path for withdrawing the tool to be withdrawn from the machine tool, wherein the tool magazine tool change position refers to a contact position between the machine tool and the tool magazine for tool change, and the tool change path determination model is obtained by training using multiple sets of training data through machine learning, and each of the multiple sets 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, and the sample tool change path is one of the following: a sample tool withdrawal path and a sample installation path; A second acquisition unit is used to control the machine tool to run according to the tool withdrawal path until the tool to be withdrawn is withdrawn, and then obtain a 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, configured 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 determine an installation path for installing the tool to be installed on the machine tool by using the tool change path determination model; A control unit is used to control the machine tool to run according to the installation path to move the tool to be installed to the target installation position to 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.
9. 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 tool changing method according to any one of claims 1 to 7.
10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by the processor, the machine tool interpolation tool changing method according to any one of claims 1 to 7 is executed.
Citation Information
Patent Citations
Optimized control method of servo motor based on servo tool rest controller
CN103801973A
Tool changing method and device for machine tool, storage medium and processor
CN110449958A
Automatic tool changing intelligent control system of machining center
CN114310421A
Automatic tool changing method, system and device of numerical control machine tool and storage medium
CN116475815A
Tool replacement method and equipment and computer storage medium
CN118650471A