Tool-to-tool method, electronic device, and storage medium
By automatically replacing the tool with a new one when the tool breaks or malfunctions, and using a reference tool to re-set the new tool and associated tools, the problem of tool changing affecting machining efficiency and quality is solved, and a highly efficient and stable machining process is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONGFUJIN PRECISION ELECTRONICS ZHENGZHOU
- Filing Date
- 2021-03-12
- Publication Date
- 2026-07-24
Smart Images

Figure CN115070505B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of numerical control technology, and in particular to a tool setting method, electronic device, and storage medium. Background Technology
[0002] With the intelligent development of industrial technology, CNC technology has been widely applied in factory manufacturing. Cutting tools are used for cutting processes in mechanical manufacturing, typically mounted on CNC machine tools for machining products. However, during machining, tool breakage is common, requiring the product to be removed for tool replacement. After replacement, the product is then repositioned on the machine tool, impacting machining efficiency. Furthermore, after tool replacement, uneven wear on previously associated tools can lead to defects such as steps in subsequent machining processes, affecting product quality. Summary of the Invention
[0003] In view of this, it is necessary to provide a tool setting method, electronic device and storage medium that can automatically re-set the associated tools without removing the product when changing tools.
[0004] This application provides a tool setting method, including:
[0005] When a tool used by an electronic device to process a product breaks, the tool is replaced with a new tool, and the recorded tool length is cleared to zero.
[0006] Set the reference tool to be re-set;
[0007] Determine whether the tool that caused the tool breakage abnormality has an associated tool;
[0008] When it is determined that the tool that caused the tool breakage abnormality has an associated tool, the tool length recorded for the associated tool of the tool that caused the tool breakage abnormality will be cleared to zero.
[0009] The reference tool to be re-set is switched and installed onto the spindle of the electronic device. The tool setting face is used as a reference plane of the product to re-set the tool, and the tool length of the reference tool is recorded.
[0010] The tool with a recorded tool length of zero is switched and installed onto the spindle. The tool is then set based on the reference tool setting surface, and the tool length of the tool with a recorded tool length of zero is recorded based on the reference tool setting surface.
[0011] The new tool length of the new tool and / or the associated tool is determined by adding the difference between the initial tool length of the reference tool and the tool length of the re-tool, where the tool length is recorded as zero, to the tool length obtained based on the reference tool length face.
[0012] Optionally, the step of determining whether the tool that caused the tool breakage abnormality has an associated tool includes:
[0013] When the tool that causes the tool breakage abnormality is one of multiple tools that are simultaneously machining the product, it is determined that the tool that caused the tool breakage abnormality has an associated tool; or
[0014] When the tool that causes the tool breakage abnormality is not one of a plurality of tools that are working simultaneously to process the product, it is determined that the tool that causes the tool breakage abnormality does not have an associated tool.
[0015] Optionally, the step of re-setting the reference tool using any plane of the product as a reference surface and recording the tool length of the re-set reference tool includes:
[0016] Select any plane on the product as a reference surface to re-set the reference tool;
[0017] The tool length for resetting the reference tool is determined based on the Z value of the reference tool in the working coordinate system of the electronic device, and the tool length for resetting the reference tool based on the reference tool setting surface is stored in the memory of the electronic device.
[0018] Optionally, the step of setting the tool with a zero tool length based on the reference tool setting surface and recording the tool length of the tool with a zero tool length based on the reference tool setting surface includes:
[0019] When resetting the tool using the reference tool, the reference tool setting face is set with the tool having a tool length of zero;
[0020] The tool setting length of the tool with zero tool length is determined in the working coordinate system based on the Z value of the reference tool setting surface, and the tool setting length of the tool with zero tool length based on the reference tool setting surface is stored in the memory.
[0021] Optionally, the method further includes:
[0022] Determine whether the blade length of each tool on the recorded electronic device is zero according to the number sequence;
[0023] When it is determined that the tool length corresponding to the current number is zero, the tool corresponding to the current number is switched and installed on the spindle, and the tool is set based on the reference tool setting surface, and the tool length of the tool corresponding to the current number based on the reference tool setting surface is recorded.
[0024] Optionally, the method further includes:
[0025] When it is determined that the tool length of the tool corresponding to the current number is zero, it is determined whether the tool is a tool that needs to be re-set.
[0026] When it is determined that the tool corresponding to the current number is a tool that needs to be re-set, the tool with a recorded tool length of zero is switched and installed on the spindle, and the tool with a tool length of zero is set based on the reference tool setting face.
[0027] Optionally, the method further includes:
[0028] An alarm message is output when it is determined that the tool length of all the tools corresponding to the records with the numbers is not zero.
[0029] Optionally, the method further includes:
[0030] The lifespan of the new tool is reset to zero, and the new tool length of the new tool and / or associated tools is set as the tool length protection variable;
[0031] Before the new tool and / or associated tool continue to process the product, it is determined whether the tool length of the new tool and / or associated tool recorded in the memory is the same as the tool length protection variable;
[0032] When it is determined that the tool length of the new tool and / or associated tool recorded in the memory is the same as the tool length protection variable, it is determined that the new tool and / or associated tool can continue to process the product; or
[0033] If the tool length of the new tool and / or associated tool recorded in the memory is different from the tool length protection variable, it is determined that the new tool and / or associated tool cannot continue to process the product.
[0034] This application also provides an electronic device, including:
[0035] Processor; and
[0036] The memory stores multiple program modules, which are loaded and executed by the processor to perform the tool setting method described above.
[0037] This application also provides a computer-readable storage medium having at least one computer instruction stored thereon, the instruction being executed by a processor using the above-described tool setting method.
[0038] The aforementioned tool setting method, electronic device, and storage medium eliminate the need to remove the product during tool change and can automatically re-set the associated tools, effectively improving product processing efficiency and quality. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0040] Figure 1-2 This is a partial perspective view of the electronic device provided in the preferred embodiment of this application.
[0041] Figure 3 This is a flowchart of a tool setting method provided in one embodiment of this application.
[0042] Figure 4 This is a schematic diagram of a tool-processed product provided in a preferred embodiment of this application.
[0043] Figure 5-6 This is a flowchart of a tool setting method provided in another embodiment of this application.
[0044] Figure 7 This is a schematic diagram of the structure of the electronic device provided in a preferred embodiment of this application.
[0045] Explanation of main component symbols
[0046] Electronic device 1
[0047] Processor 10
[0048] Memory 20
[0049] Computer Program 30
[0050] Knife 101
[0051] Tool setting device 102
[0052] Spindle 103
[0053] Detection device 104
[0054] Product 2
[0055] Surface 201
[0056] Corner area 202
[0057] The following detailed description, in conjunction with the accompanying drawings, will further illustrate this application. Detailed Implementation
[0058] To better understand the above-mentioned objectives, features, and advantages of this application, the application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0059] Numerous specific details are set forth in the following description to provide a thorough understanding of this application. The described embodiments are merely some, not all, of the embodiments described herein. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
[0061] Please see Figure 1-2 Figures 7 and 8 show partial perspective views of an electronic device provided in a preferred embodiment of this application.
[0062] The tool setting method in this application is applied in an electronic device 1, which can be a CNC machine tool with a tool setting program installed. In one embodiment, the electronic device 1 is equipped with a plurality of tools 101, a tool setting device 102, a spindle 103, and a detection device 104. Figure 1 The tool 101 in the text is the new tool A that has been replaced. Figure 2 The tool in the reference tool is B.
[0063] In one embodiment, the cutting tool 101 is used to cut the product 2. The tool setting device 102 is a tool setting bar, used to assist in tool setting of the cutting tool 101. The spindle 103 is used to drive the cutting tool 101 to move, for example, translate or rotate, under the control of the electronic device 1. The detection device 104 is an infrared broken tool detector. In other embodiments, the tool setting device 102 may also be an infrared tool setter, integrating tool setting and broken tool detection functions.
[0064] Please see Figure 3 The diagram shown is a flowchart of a tool setting method according to an embodiment of this application. The order of steps in the flowchart can be changed, and some steps can be omitted, depending on different requirements.
[0065] In one embodiment, during the processing of product 2, the size of each processing tool 101 is detected in real time by the detection device 104 to determine whether the detected tool size is the same as the preset size.
[0066] In one embodiment, the size of the cutting tool 101 is its area, and the preset size is the area of the cutting tool 101 when it is not worn. When the cutting tool 101 is processing the product 2, the detection device 104 is controlled to emit infrared light along the surface of the cutting tool 101 to detect its area. It is determined whether the detected cutting tool area is the same as the preset cutting tool area, thereby determining whether the detected cutting tool size is the same as the preset size. If it is determined that the detected cutting tool size is the same as the preset size, it is confirmed that the cutting tool 101 has not experienced a breakage abnormality.
[0067] In one embodiment, when it is determined that the detected tool size is different from a preset size, the tool 101 is confirmed to have a tool breakage abnormality. In another embodiment, when the tool 101 breaks, the detected tool area will be different from the preset tool area, thereby confirming that the tool 101 has a tool breakage abnormality.
[0068] S301, when the tool 101 breaks, the tool 101 is replaced with a new tool, and the recorded tool length of the tool 101 is cleared to zero.
[0069] In one embodiment, before the electronic device 1 processes the product 2, at least one cutting tool 101 for processing the product 2 is determined, and the determined at least one cutting tool 101 is set. The initial setting tool length and corresponding number of the at least one cutting tool 101 are recorded in the memory of the electronic device 1. The initial setting tool length is the tool length of the at least one cutting tool 101 in the Z-axis of the working coordinate system of the electronic device 1 when the electronic device 1 performs tool setting based on an initial reference plane. If the cutting tool 101 used to process the product experiences a tool breakage, the cutting tool 101 is replaced with a new cutting tool 101, and the tool length of the cutting tool 101 corresponding to the broken tool number recorded in the memory is cleared to zero.
[0070] S302, Set the reference tool to be re-set.
[0071] In one embodiment, the initial preset number of reference tools is one. Another tool 101 with a number different from the tool 101 that caused the tool breakage abnormality is re-preset as the reference tool, and the re-preset reference tool is set as the reference tool to be re-set.
[0072] In other embodiments, the initial preset number of reference tools can be multiple, such as two. If one of the multiple reference tools experiences a tool breakage abnormality, the reference tool that did not experience a tool breakage abnormality can be set as the reference tool to be re-set.
[0073] S303, determine whether the tool 101 that caused the tool breakage abnormality has an associated tool.
[0074] In one embodiment, multiple cutting tools 101 that need to work simultaneously to process the product 2 are pre-defined as interconnected tools. For example, please refer to... Figure 4 As shown, when machining the surface 201 of the product 2, there may be corner areas 202 on the surface 201 that cannot be machined by a single tool. In this case, it is necessary to set up two tools A and C to work simultaneously to machine the product 2. Tool A machined the surface 201, and tool C machined the corner areas 202. The two tools A and C are related tools.
[0075] In one embodiment, when a breakage occurs in one of a plurality of interconnected cutting tools 101, the other cutting tools among the plurality of interconnected cutting tools 101 are the associated cutting tools of the cutting tool 101 that caused the breakage. That is, when the cutting tool 101 that caused the breakage is one of the plurality of interconnected cutting tools, it is determined that the cutting tool 101 that caused the breakage has associated cutting tools, and the process proceeds to S304. When the cutting tool 101 that caused the breakage is not one of the plurality of interconnected cutting tools, it is determined that the cutting tool 101 that caused the breakage does not have associated cutting tools, and the process proceeds to S305.
[0076] S304, the tool length of the tool associated with the tool 101 that caused the tool breakage abnormality is cleared to zero.
[0077] In one embodiment, the number of the associated tool is determined, and the initial tool length of the associated tool recorded in the memory is cleared to zero according to the determined number of the associated tool.
[0078] S305, the reference tool to be re-set is switched and installed on the spindle 103 of the electronic device 1, and the tool setting face is used as a reference to re-set the reference tool, and the tool length of the re-set reference tool is recorded.
[0079] In one embodiment, after the reference tool to be re-set is switched and installed on the spindle 103, the reference tool is defined within the working coordinate system of the electronic device 1.
[0080] In one embodiment, after the reference tool to be re-set is switched and installed on the spindle 103, any plane on the product 2 is selected as the reference tool setting surface, and the reference tool is set based on the tool setting device 102, i.e., the tool setting bar. The tool length for re-setting is determined according to the Z value of the reference tool in the working coordinate system, and the tool length of the reference tool re-set based on the reference tool setting surface is stored in the memory. Taking a Fanuc system variable as an example, after the reference tool is switched and installed on the spindle 103, the current Z value of the working coordinate system is assigned to the variable #10 = #5023 - d, where variable #5023 is the current Z value of the working coordinate system, d is the diameter of the tool setting bar, and #10 is the tool length of the reference tool for re-setting.
[0081] S306, the tool 101 with a recorded tool length of zero is switched and installed onto the spindle 103, the tool 101 with a tool length of zero is calibrated based on the reference tool calibrating face, and the tool length of the tool 101 with a tool length of zero is recorded based on the reference tool calibrating face.
[0082] In one embodiment, the tool length of each recorded tool 101 is determined sequentially according to its number. Tool number variable #1 is set to 1, and the tool length of tool 101 with number 1 recorded in the memory is first checked. If the tool length of tool 101 with number 1 is found to be zero, the tool 101 corresponding to the current number is switched and installed onto the spindle 103. Then, tool number variable #1 is set to 2, and the tool length of tool 101 with number 2 recorded in the memory is checked. If the tool length of tool 101 with number 2 is found to be zero, the tool 101 corresponding to the current number is switched and installed onto the spindle 103. Following this process, the value of tool number variable #1 is accumulated, and the tool length of subsequent numbered tools 101 is checked sequentially.
[0083] In one embodiment, after the tool 101 corresponding to the current number is switched and installed on the spindle 103, it is determined whether the current number is the same as the actual number of the tool 101. The tool 101 is provided with a barcode or QR code, which can be scanned by a scanning device (not shown) on the electronic device 1 to obtain the actual number of the tool 101 installed on the spindle 103. If it is determined that the current number is the same as the actual number of the tool 101, the tool setting is re-performed based on the reference tool setting face. If it is determined that the current number is different from the actual number of the tool 101, an alarm message is output, and the electronic device 1 stops the tool setting operation. In this way, tool setting is only performed when the logically determined tool number matches the actual tool number, thereby achieving a foolproof function.
[0084] In one embodiment, since the recorded tool length of the tool 101 corresponding to the current number is zero, the tool 101 is either a new tool that has been replaced or an associated tool of a tool that experienced a tool breakage abnormality. Using the reference tool setting surface (i.e., the tool setting surface determined based on any plane of the product 2) when re-setting the reference tool, and employing the tool setting device 102 (i.e., the tool setting bar), the new tool is initially set, or the associated tool is re-set. The tool setting length is determined based on the Z-value of the tool 101 corresponding to the current number in the working coordinate system, and the tool length of the tool 101 corresponding to the current number set based on the reference tool setting surface is stored in the memory. Taking the FANUC system variable as an example, after switching the tool 101 corresponding to the current number to the spindle 103, the current Z value of the working coordinate system is assigned to the variable #[11000+#1]=#5023-d, where the variable #5023 is the current Z value of the working coordinate system, d is the diameter of the tool setting bar, and #[11000+#1] is the tool setting length of the tool 101 corresponding to the current number based on the reference tool setting surface.
[0085] S307, the difference between the initial tool setting length of the reference tool and the tool setting length of the re-tool setting is added to the value obtained by the tool setting length of the tool 101 with a recorded tool length of zero based on the reference tool setting face, and the new tool length of the new tool and / or associated tool is determined.
[0086] In one embodiment, the tool 101 with a tool length of zero, i.e., the new tool and / or the associated tool, has a new tool length that is the tool length of the tool 101 corresponding to the current number based on the initial reference plane. Assuming the initial tool length of the reference tool is B, the tool length of the reference tool after re-setting is b, and the tool length of the tool 101 with a tool length of zero based on the reference tool setting plane is a, then the new tool length A of the new tool and / or the associated tool is A = a + (bB).
[0087] In one embodiment, the new tool length of the new tool and / or associated tool is stored in the memory.
[0088] Please see Figure 5-6 The diagram shown is a flowchart of a tool setting method according to another embodiment of this application. The order of steps in the flowchart can be changed, and some steps can be omitted, depending on different requirements.
[0089] In one embodiment, during the processing of product 2, the size of each processing tool 101 is detected in real time by the detection device 104 to determine whether the detected tool size is the same as the preset size.
[0090] In one embodiment, the size of the cutting tool 101 is its area, and the preset size is the area of the cutting tool 101 when it is not worn. When the cutting tool 101 is processing the product 2, the detection device 104 is controlled to emit infrared light along the surface of the cutting tool 101 to detect its area. It is determined whether the detected cutting tool area is the same as the preset cutting tool area, thereby determining whether the detected cutting tool size is the same as the preset size. If it is determined that the detected cutting tool size is the same as the preset size, it is confirmed that the cutting tool 101 has not experienced a breakage abnormality.
[0091] In one embodiment, when it is determined that the detected tool size is different from a preset size, the tool 101 is confirmed to have a tool breakage abnormality. In another embodiment, when the tool 101 breaks, the detected tool area will be different from the preset tool area, thereby confirming that the tool 101 has a tool breakage abnormality.
[0092] S401, when the tool 101 breaks, the tool 101 is replaced with a new tool, and the recorded tool length of the tool 101 is cleared to zero.
[0093] In one embodiment, before the electronic device 1 processes the product 2, at least one cutting tool 101 for processing the product 2 is determined, and the determined at least one cutting tool 101 is set. The initial setting tool length and corresponding number of the at least one cutting tool 101 are recorded in the memory of the electronic device 1. The initial setting tool length is the tool length of the at least one cutting tool 101 in the Z-axis of the working coordinate system of the electronic device 1 when the electronic device 1 performs tool setting based on an initial reference plane. If the cutting tool 101 used to process the product experiences a tool breakage, the cutting tool 101 is replaced with a new cutting tool 101, and the tool length of the cutting tool 101 corresponding to the broken tool number recorded in the memory is cleared to zero.
[0094] S402, determine whether the tool 101 that caused the tool breakage abnormality is a preset reference tool.
[0095] In one embodiment, before the electronic device 1 processes the product 2, at least one reference tool is selected from a plurality of tools 101 mounted on the electronic device 1, and the at least one reference tool is set. The initial setting tool length and corresponding number of the at least one reference tool are recorded in the memory of the electronic device 1. The initial setting tool length is the tool length of the at least one reference tool in the Z-axis of the working coordinate system of the electronic device 1 when the electronic device 1 performs tool setting based on an initial reference plane.
[0096] In one embodiment, the at least one reference tool may be one of the tools 101 used to process the product 2, or it may not be a tool used to process the product 2. When a tool 101 experiences a tool breakage abnormality, the number of the tool 101 is determined and compared with the number of the at least one reference tool. If the number of the tool 101 is the same as the number of the at least one reference tool, the tool 101 that experienced the tool breakage abnormality is determined to be a preset reference tool, and the process proceeds to S402. If the number of the tool 101 is different from the number of the at least one reference tool, the tool 101 that experienced the tool breakage abnormality is determined to be not a preset reference tool, and the process proceeds to S403.
[0097] S403 sets the reference tool to be re-set.
[0098] In one embodiment, the initial preset number of reference tools is one. Another tool 101 with a number different from the tool 101 that caused the tool breakage abnormality is re-preset as the reference tool, and the re-preset reference tool is set as the reference tool to be re-set.
[0099] In other embodiments, the initial preset number of reference tools can be multiple, such as two. If one of the multiple reference tools experiences a tool breakage abnormality, the reference tool that did not experience a tool breakage abnormality can be set as the reference tool to be re-set.
[0100] S404, determine whether the tool 101 that caused the tool breakage abnormality has an associated tool.
[0101] In one embodiment, multiple cutting tools 101 that need to work simultaneously to process the product 2 are pre-defined as interconnected tools. For example, please refer to... Figure 4 As shown, when machining the surface 201 of the product 2, there may be corner areas 202 on the surface 201 that cannot be machined by a single tool. In this case, it is necessary to set up two tools A and C to work simultaneously to machine the product 2. Tool A machined the surface 201, and tool C machined the corner areas 202. The two tools A and C are related tools.
[0102] In one embodiment, when a breakage occurs in one of a plurality of interconnected cutting tools 101, the other cutting tools among the plurality of interconnected cutting tools 101 are the associated cutting tools of the cutting tool 101 that caused the breakage. That is, when the cutting tool 101 that caused the breakage is one of the plurality of interconnected cutting tools, it is determined whether the cutting tool 101 that caused the breakage has associated cutting tools, and the process proceeds to S404. When the cutting tool 101 that caused the breakage is not one of the plurality of interconnected cutting tools, it is determined that the cutting tool 101 that caused the breakage does not have associated cutting tools, and the process proceeds to S405.
[0103] S405, the tool length of the associated tool record of the tool 101 that caused the tool breakage abnormality is cleared to zero.
[0104] In one embodiment, the number of the associated tool is determined, and the initial tool length of the associated tool recorded in the memory is cleared to zero according to the determined number of the associated tool.
[0105] S406, the reference tool to be re-set is switched and installed onto the spindle 103 of the electronic device 1.
[0106] In one embodiment, after the reference tool to be re-set is switched and installed on the spindle 103, the reference tool is defined within the working coordinate system of the electronic device 1.
[0107] S407, using any plane of the product 2 as a reference, the tool setting face is re-set on the reference tool, and the tool length of the re-set reference tool is recorded.
[0108] In one embodiment, after the reference tool to be re-set is switched and installed on the spindle 103, any plane on the product 2 is selected as the reference tool setting surface, and the reference tool is set based on the tool setting device 102, i.e., the tool setting bar. The tool length for re-setting is determined according to the Z value of the reference tool in the working coordinate system, and the tool length of the reference tool re-set based on the reference tool setting surface is stored in the memory. Taking a Fanuc system variable as an example, after the reference tool is switched and installed on the spindle 103, the current Z value of the working coordinate system is assigned to the variable #10 = #5023 - d, where variable #5023 is the current Z value of the working coordinate system, d is the diameter of the tool setting bar, and #10 is the tool length of the reference tool for re-setting.
[0109] S408, determine whether the recorded tool length of the tool 101 is zero according to the number sequence.
[0110] In one embodiment, the tool number variable #1 is set to 1. First, it is determined whether the tool length of tool 101 with number 1 recorded in the memory is zero. If the tool length of tool 101 with number 1 is determined to be zero, the process proceeds to S409. Then, the tool number variable #1 is set to 2, and it is determined whether the tool length of tool 101 with number 2 recorded in the memory is zero. If the tool length of tool 101 with number 2 is determined to be zero, the process proceeds to S409. According to the above process, the value of tool number variable #1 is accumulated, and the tool length of tool 101 corresponding to subsequent numbers is determined one by one.
[0111] S409, when it is determined that the tool length of the tool 101 recorded with the current number is zero, determine whether the tool 101 is a tool that needs to be re-set.
[0112] In one embodiment, during actual machining, some numbers do not correspond to any tool, and the tool length corresponding to these numbers is zero in the memory. However, since there is no corresponding tool, they are not used for tool setting. A variable number 1 is assigned to the numbers that do not correspond to any tool. When the variable number set for the current number is 1, it is determined that the current number does not correspond to any tool, that is, the tool 101 with a zero tool length corresponding to the current number does not actually exist in the memory. Therefore, it is determined that the recorded tool 101 with a zero tool length does not need to be re-set, and the process returns to S408, and the tool number variable is incremented by one. When the variable number set for the current number is not 1, it is determined that the current number corresponds to a tool, that is, the tool 101 with a zero tool length corresponding to the current number exists in the memory. Therefore, it is determined that the recorded tool 101 with a zero tool length is the tool that needs to be re-set, and the process proceeds to S410.
[0113] S410, the tool 101 corresponding to the current number is switched and installed on the spindle 103, the tool 101 is re-set based on the reference tool setting face, and the tool setting length of the tool 101 corresponding to the current number is recorded.
[0114] In one embodiment, after the tool 101 corresponding to the current number is switched and installed on the spindle 103, it is determined whether the current number is the same as the actual number of the tool 101. The tool 101 is provided with a barcode or QR code, which can be scanned by a scanning device (not shown) on the electronic device 1 to obtain the actual number of the tool 101 installed on the spindle 103. If it is determined that the current number is the same as the actual number of the tool 101, the tool setting is re-performed on the tool 101 based on the reference tool setting face. If it is determined that the current number is different from the actual number of the tool 101, an alarm message is output, and the electronic device 1 stops the tool setting operation.
[0115] In one embodiment, since the recorded tool length of the tool 101 corresponding to the current number in the memory is zero, the tool 101 is either a new tool that has been replaced or an associated tool of a tool that has experienced a tool breakage abnormality. Using the reference tool setting surface (i.e., the reference tool setting surface determined based on any plane of the product 2) when re-setting the reference tool, and employing the tool setting device 102 (i.e., the tool setting bar), the new tool is initially set, or the associated tool is re-set. The tool setting length is determined based on the Z value of the tool 101 corresponding to the current number in the working coordinate system, and the tool length of the tool 101 corresponding to the current number set based on the reference tool setting surface is stored in the memory. Taking the FANUC system variable as an example, after switching the tool 101 corresponding to the current number to the spindle 103, the current Z value of the working coordinate system is assigned to the variable #[11000+#1]=#5023-d, where the variable #5023 is the current Z value of the working coordinate system, d is the diameter of the tool setting bar, and #[11000+#1] is the tool setting length of the tool 101 corresponding to the current number based on the reference tool setting surface.
[0116] S411, the difference between the initial tool setting length of the reference tool and the tool setting length of the re-tool setting is added to the value obtained by the tool setting length of the tool 101 corresponding to the current number based on the reference tool setting surface to determine the new tool length of the new tool and / or associated tool.
[0117] In one embodiment, the new tool length of the tool 101 corresponding to the current number, i.e., the new tool and / or the associated tool, is the tool length of the tool 101 corresponding to the current number based on the initial reference plane. Assuming the initial tool length of the reference tool is B, the tool length of the reference tool after re-setting is b, and the tool length of the tool 101 corresponding to the current number based on the reference tool setting plane is a, then the new tool length A of the new tool and / or the associated tool is A = a + (bB).
[0118] In one embodiment, the new tool length of the new tool and / or associated tool is stored in the memory.
[0119] S412, when it is determined that the tool length of the tool 101 in all the corresponding records is not zero, an alarm message is output.
[0120] In one embodiment, when the tool 101 experiences a tool breakage abnormality, and it is determined that the tool length of all recorded tools 101 with corresponding numbers is not zero, it indicates that the tool length of the tool 101 that experienced the tool breakage abnormality recorded in the memory has not been cleared to zero. Therefore, it is impossible to perform tool setting on the new tool and associated tools after replacement. The alarm information is then output to remind the user that the tool length of the tool 101 that experienced the tool breakage abnormality has not been cleared to zero.
[0121] In one embodiment, the alarm information can be displayed on a screen, and the alarm information includes the text "The broken knife's length has not been zeroed". In other embodiments, the alarm information can also be output through a speaker, in which case the alarm information includes the voice message "The broken knife's length has not been zeroed".
[0122] S413, reset the lifespan of the new tool to zero, and set the tool length of the tool 101 based on the reference tool setting face as the tool length protection variable.
[0123] In one embodiment, when a tool that has broken is replaced with a new tool, its lifespan should be recalculated, so the lifespan of the new tool is reset to zero.
[0124] In one embodiment, before the new tool and associated tool continue processing the product 2, it is determined whether the tool lengths of the new tool and associated tool recorded in the memory are the same as the tool length protection variable. If the tool lengths of the new tool and associated tool recorded in the memory are the same as the tool length protection variable, it indicates that the new tool and associated tool have completed tool setting, and it is determined that the new tool and associated tool can continue processing the product 2. If the tool lengths of the new tool and associated tool recorded in the memory are different from the tool length protection variable, it indicates that the tool setting of the new tool and associated tool is abnormal, and it is determined that the new tool and associated tool cannot continue processing the product 2, thereby achieving system error prevention and ensuring processing accuracy.
[0125] In one embodiment, if it is determined that the new tool and associated tool can no longer process the product 2, an alarm message is output through the display screen or speaker.
[0126] The tool setting method provided in this application allows for tool setting of a new tool after replacement based on a new reference face selected on the product plane when a tool breaks. This eliminates the need to remove the product, effectively improving processing efficiency. Furthermore, it can automatically re-set associated tools. During the re-setting process, the same tool setting reference as the new tool is used, thus preventing defects such as steps in the processed product due to differences in wear between the old and new tools, effectively improving the processing quality.
[0127] Please see Figure 7 The diagram shown is a structural schematic of an electronic device provided in a preferred embodiment of this application.
[0128] The electronic device 1 further includes, but is not limited to, a processor 10, a memory 20, and a computer program 30 stored in the memory 20 and executable on the processor 10. For example, the computer program 30 is a tool setting program. When the processor 10 executes the computer program 30, it implements the steps in the tool setting method, for example... Figure 3 The steps S301 to S307 shown are as follows: Figure 5-6 The steps S401 to S413 are shown.
[0129] For example, the computer program 30 may be divided into one or more modules / units, which are stored in the memory 20 and executed by the processor 10 to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 30 in the electronic device 1.
[0130] Those skilled in the art will understand that the schematic diagram is merely an example of electronic device 1 and does not constitute a limitation on electronic device 1. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 1 may also include input / output devices, network access devices, buses, etc.
[0131] The processor 10 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor 10 may be any conventional processor. The processor 10 is the control center of the electronic device 1, connecting various parts of the electronic device 1 through various interfaces and lines.
[0132] The memory 20 can be used to store the computer program 30 and / or modules / units. The processor 10 implements various functions of the electronic device 1 by running or executing the computer program and / or modules / units stored in the memory 20 and calling the data stored in the memory 20. The memory 20 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device 1 (such as audio data, telephone book, etc.). In addition, the memory 20 may include volatile and non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other storage devices.
[0133] If the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), or a random access memory (RAM).
[0134] The tool setting method, electronic device, and storage medium provided in this application can replace abnormal tools without removing the product, effectively improving the product's processing efficiency. Furthermore, it can automatically re-set associated tools. During the re-setting process of associated tools, the same tool setting benchmark as the new tool is used, so that the processed product will not have step defects due to the difference in wear between the old tool and the new tool, thus effectively improving the product's processing quality.
[0135] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within this application. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in the apparatus claims may also be implemented by the same unit or device in software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any particular order.
[0136] The above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.
Claims
1. A tool setting method, characterized in that, The method includes: When a tool used by an electronic device to process a product breaks, the tool is replaced with a new tool, and the recorded tool length is cleared to zero. Set the reference tool to be re-set; Determine whether the tool that caused the tool breakage abnormality has an associated tool, wherein the associated tool is a tool that processes the product while working simultaneously with the tool that caused the tool breakage abnormality; When it is determined that the tool that caused the tool breakage abnormality has the associated tool, the tool length recorded for the associated tool of the tool that caused the tool breakage abnormality is cleared to zero. The reference tool to be re-set is switched and installed onto the spindle of the electronic device. The tool setting face is used as a reference plane of the product to re-set the tool, and the tool length of the reference tool is recorded. The tool with a recorded tool length of zero is switched and installed onto the spindle. The tool is then set based on the reference tool setting surface, and the tool length of the tool with a recorded tool length of zero is recorded based on the reference tool setting surface. The new tool length of the new tool and / or the associated tool is determined by adding the difference between the initial tool length of the reference tool and the tool length of the re-tool, where the tool length is recorded as zero, to the tool length obtained based on the reference tool length face.
2. The tool setting method as described in claim 1, characterized in that, The step of determining whether the tool that caused the tool breakage abnormality has an associated tool includes: When the tool that causes the tool breakage abnormality is one of multiple tools that are simultaneously machining the product, it is determined that the tool that caused the tool breakage abnormality has an associated tool; or When the tool that causes the tool breakage abnormality is not one of a plurality of tools that are working simultaneously to process the product, it is determined that the tool that causes the tool breakage abnormality does not have an associated tool.
3. The tool setting method as described in claim 1, characterized in that, The step of re-setting the reference tool using any plane of the product as a reference and recording the tool length of the re-set reference tool includes: Select any plane on the product as a reference surface to re-set the reference tool; The tool length for resetting the reference tool is determined based on the Z value of the reference tool in the working coordinate system of the electronic device, and the tool length for resetting the reference tool based on the reference tool setting surface is stored in the memory of the electronic device.
4. The tool setting method as described in claim 3, characterized in that, The step of setting the tool with a tool length of zero based on the reference tool setting surface and recording the tool length of the tool with a tool length of zero based on the reference tool setting surface includes: When resetting the tool using the reference tool, the reference tool setting face is set with the tool having a tool length of zero; The tool setting length of the tool with zero tool length is determined in the working coordinate system based on the Z value of the reference tool setting surface, and the tool setting length of the tool with zero tool length based on the reference tool setting surface is stored in the memory.
5. The tool setting method as described in claim 1, characterized in that, The method further includes: Determine whether the blade length of each cutter on the recorded electronic device is zero according to the number sequence; When it is determined that the tool length corresponding to the current number is zero, the tool corresponding to the current number is switched and installed on the spindle, and the tool is set based on the reference tool setting surface, and the tool length of the tool corresponding to the current number based on the reference tool setting surface is recorded.
6. The tool setting method as described in claim 1, characterized in that, The method further includes: When it is determined that the tool length of the tool corresponding to the current number is zero, it is determined whether the tool is a tool that needs to be re-set. When it is determined that the tool corresponding to the current number is a tool that needs to be re-set, the tool with a recorded tool length of zero is switched and installed on the spindle, and the tool with a tool length of zero is set based on the reference tool setting face.
7. The tool setting method as described in claim 1, characterized in that, The method further includes: An alarm message is output when it is determined that the tool length of all the tools corresponding to the records with the numbers is not zero.
8. The tool setting method as described in claim 1, characterized in that, The method further includes: The lifespan of the new tool is reset to zero, and the new tool length of the new tool and / or associated tools is set as the tool length protection variable; Before the new tool and / or associated tool continue to process the product, it is determined whether the tool length of the new tool and / or associated tool recorded in the memory of the electronic device is the same as the tool length protection variable; When it is determined that the tool length of the new tool and / or associated tool recorded in the memory is the same as the tool length protection variable, it is determined that the new tool and / or associated tool will continue to process the product; or If the tool length of the new tool and / or associated tool recorded in the memory is different from the tool length protection variable, it is determined that the new tool and / or associated tool cannot continue to process the product.
9. An electronic device, characterized in that, The electronic device includes: Processor; and A memory storing a plurality of program modules, which are loaded by the processor and executed as the tool setting method as described in any one of claims 1 to 8.
10. A computer-readable storage medium having stored thereon at least one computer instruction, characterized in that, The instructions are loaded by the processor and executed as the tool setting method as described in any one of claims 1 to 8.