Tool magazine internal broken tool detection method and device, electronic equipment and storage medium

By calculating the time difference between the servo motor detection time and the teaching time, it is determined whether the tool is broken. This solves the problem of low efficiency in tool magazine breakage detection in the existing technology and realizes fast and effective tool breakage detection.

CN115741231BActive Publication Date: 2026-07-21ZHUHAI GREE INTELLIGENT EQUIP TECH RES INST CO LTD +2
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHUHAI GREE INTELLIGENT EQUIP TECH RES INST CO LTD
Filing Date
2022-11-14
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing methods for detecting broken tools inside tool magazines are insufficient for quickly identifying whether a tool is broken, resulting in low detection efficiency.

Method used

By obtaining the detection time of the servo motor on the tool under test as the target time, the difference time period between the target time and the preset teaching time is calculated, and the difference time period is compared with the preset time accuracy value to determine whether the tool has broken and issue an alarm message.

Benefits of technology

It improves the efficiency of tool breakage detection inside the tool magazine, avoids direct measurement of tool length, and achieves rapid tool breakage detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115741231B_ABST
    Figure CN115741231B_ABST
Patent Text Reader

Abstract

The application discloses a tool magazine internal broken tool detection method and device, electronic equipment and storage medium, and the method comprises the following steps: acquiring the detection time of a servo motor to a tool to be detected as a target time; acquiring the teaching time corresponding to the tool to be detected from a preset database, and acquiring the difference time period of the target time and the teaching time; if the difference time period is greater than a preset time precision value, it is determined that the tool to be detected is broken, and a warning information is sent. The application avoids direct measurement of the length of the tool, and is beneficial to improving the detection efficiency of the tool magazine internal broken tool.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cutting tool inspection technology, and in particular to a method, apparatus, electronic device, and storage medium for detecting broken tools inside a tool magazine. Background Technology

[0002] During machining, tool breakage can occur due to wear, stress fatigue, reaching the end of its service life, or improper operation. Tool failure not only leads to workpiece scrap and loss of expensive equipment but also directly affects the precision, efficiency, and economic benefits of machining. Therefore, tool breakage detection is essential. As a widely applicable and high-performance detection technology, tool breakage detection is widely used in various machining industries.

[0003] Existing methods for detecting broken tools inside tool magazines rely on directly identifying the tool's length before and after use, using the change in tool length to determine if the tool has broken. However, this method struggles to quickly identify the tool's length during machining, making it difficult to rapidly detect tool breakage and resulting in low detection efficiency for broken tools inside the tool magazine. Summary of the Invention

[0004] This invention provides a method, apparatus, electronic device, and storage medium for detecting broken tools inside a tool magazine, thereby improving the detection efficiency of broken tools inside the tool magazine.

[0005] In a first aspect, embodiments of the present invention provide a method for detecting broken tools inside a tool magazine, comprising:

[0006] The detection time of the servo motor on the tool to be inspected is obtained and used as the target time;

[0007] The teaching time corresponding to the tool to be tested is obtained from the preset database, and the time difference between the target time and the teaching time is obtained.

[0008] If the time difference is greater than the preset time accuracy value, it is determined that the tool to be tested has broken and an alarm message is issued.

[0009] Secondly, embodiments of the present invention provide a device for detecting broken tools inside a tool magazine, comprising:

[0010] The target time acquisition module is used to acquire the detection time of the servo motor on the tool to be inspected, and use it as the target time.

[0011] The difference time period acquisition module is used to obtain the teaching time corresponding to the tool to be tested from a preset database, and to obtain the difference time period between the target time and the teaching time.

[0012] The tool breakage determination module is used to determine that the tool under test has broken if the difference time period is greater than a preset time accuracy value, and to issue an alarm message.

[0013] Thirdly, embodiments of the present invention provide an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method for detecting broken tools inside the tool magazine described in the first aspect.

[0014] Fourthly, embodiments of the present invention also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to perform the tool breakage detection method inside the tool magazine described in the first aspect.

[0015] This invention provides a method, apparatus, electronic device, and storage medium for detecting broken tools inside a tool magazine. The method includes: acquiring the detection time of a servo motor on the tool to be tested as a target time; acquiring the teaching time corresponding to the tool to be tested from a preset database, and acquiring a time difference between the target time and the teaching time; if the time difference is greater than a preset time accuracy value, determining that the tool to be tested has broken, and issuing an alarm message. This invention, by acquiring the detection time and teaching time of the tool to be tested, acquiring the time difference between the two, and comparing the time difference with a preset time accuracy value, determines whether the tool has broken, avoiding direct measurement of the tool length and improving the detection efficiency of broken tools inside the tool magazine. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 A flowchart illustrating the method for detecting broken tools inside a tool magazine according to an embodiment of the present invention;

[0018] Figure 2 yes Figure 1 A flowchart illustrating a specific implementation method prior to step S1;

[0019] Figure 3 yes Figure 2 A flowchart illustrating a specific implementation of step S03;

[0020] Figure 4 yes Figure 1 A flowchart illustrating another specific implementation method prior to step S1;

[0021] Figure 5 A schematic diagram illustrating the lever position setting of a servo motor according to an embodiment of the present invention;

[0022] Figure 6 yes Figure 1 A flowchart illustrating a specific implementation method of step S1;

[0023] Figure 7 yes Figure 1 A flowchart illustrating a specific implementation method following step S2;

[0024] Figure 8 A schematic block diagram of a tool breakage detection device inside a tool magazine provided in an embodiment of the present invention;

[0025] Figure 9 A schematic block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

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

[0027] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0028] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0029] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0030] Please see Figures 1 to 9 , Figure 1 A flowchart illustrating the method for detecting broken tools inside a tool magazine according to an embodiment of the present invention; Figure 2 yes Figure 1 A flowchart illustrating a specific implementation method prior to step S1; Figure 3 yes Figure 2 A flowchart illustrating a specific implementation of step S03; Figure 4 yes Figure 1 A flowchart illustrating another specific implementation method prior to step S1; Figure 5 A schematic diagram illustrating the lever position setting of a servo motor according to an embodiment of the present invention; Figure 6 yes Figure 1 A flowchart illustrating a specific implementation method of step S1; Figure 7 yes Figure 1 A flowchart illustrating a specific implementation method following step S2; Figure 8 A schematic block diagram of a tool breakage detection device inside a tool magazine provided in an embodiment of the present invention; Figure 9 This is a schematic block diagram of an electronic device provided in an embodiment of the present invention. The method for detecting broken tools inside a tool magazine provided in this embodiment of the present invention is applied in an electronic device.

[0031] S1: Obtain the detection time of the servo motor on the tool to be inspected, and use it as the target time.

[0032] Specifically, this application's embodiment is a method for detecting broken tools inside the tool magazine of a CNC system. The CNC system is a control system with an integrated control panel, comprising all CNC system components (digital controller, programmable controller, and human-machine interface). The target time refers to the time taken for the servo motor to travel from its origin at the lever's origin until it touches the tip of the tool to be tested, and the servo motor torque reaches a preset value.

[0033] In one embodiment, pre-test preparations are required before starting the broken tool detection. Specifically, this involves: installing the servo motor inside the tool magazine, calibrating the tool holder of the tool disc, ensuring the lever is aligned with the center of the tool holder without significant deviation, calibrating the mechanical position, setting the servo motor speed and preset accuracy value of the broken tool device, and inputting these values ​​into the detection system. Finally, placing the broken tool device's lever below the longest tool and setting the lever's origin. At this point, the broken tool device is fully installed, and testing can begin.

[0034] Please see Figure 2 , Figure 2 A specific implementation prior to S1 is shown and described in detail below:

[0035] S01: Obtain sample tools corresponding to multiple types of untested tools and tools to be tested, and use the sample tools as target teaching tools.

[0036] S02: Based on the target taught tool, obtain the preset accuracy value of the undetected tool.

[0037] S03: Obtain the detection time of the servo motor on the target teaching tool to obtain the teaching time.

[0038] S04: Store the preset accuracy value and teaching time in the preset database.

[0039] In this embodiment, each type of tool has its corresponding original length, resulting in different accuracy values ​​required for tool breakage detection of different types of tools. Furthermore, each type of tool has a different detection time. Therefore, this embodiment acquires sample tools corresponding to multiple types of undetected tools and tools to be detected, and uses these sample tools as target teaching tools. Then, based on the target teaching tool, the preset accuracy value of the undetected tool is obtained, thereby obtaining the preset accuracy value for each type of tool. The detection time of the servo motor on the target teaching tool is then obtained to obtain the teaching time, which is finally stored in a preset database. Further, different servo motor speeds can be set according to different tool types and stored accordingly in the preset database, making it convenient to directly call the corresponding accuracy value when tool breakage detection is needed later, thus improving the efficiency of tool breakage detection. Here, the sample tool refers to a tool with its initial length when it leaves the factory.

[0040] Please see Figure 3 , Figure 3 A specific implementation of step S03 is shown below:

[0041] S031: Obtain the first teaching instruction, wherein the first teaching instruction includes the teaching tool number.

[0042] S032: Execute the first teaching instruction, obtain the target teaching tool corresponding to the teaching tool number, and drive the servo motor to rotate through the servo driver based on the first teaching instruction, and obtain the current time point of the servo motor at the origin of the lever as the first teaching time point.

[0043] S033: When the servo motor touches the tip of the teaching tool and the torque of the servo motor reaches the set value, the first teaching feedback information is obtained, and the second teaching time point is obtained based on the first teaching feedback information.

[0044] S034: Generate teaching time based on the difference between the second teaching time point and the first teaching time point.

[0045] The teach pendant tool refers to the tool with its initial length as it was when it left the factory. The teach time refers to the time taken for the servo motor to start from the origin of the lever and reach the tip of the teach pendant tool when the servo motor torque reaches the preset value.

[0046] The first teach instruction is an instruction that requires testing the teach tool. For example, the first teach instruction is M600Tx (where x represents the teach tool number).

[0047] Specifically, since the first teaching instruction includes the teaching tool number, executing the first teaching instruction allows for detection of the corresponding teaching tool. The servo driver drives the servo motor to rotate, causing the servo motor lever to rotate. When the servo motor lever touches the tip of the teaching tool, the servo motor current changes. When the current reaches a certain value, the motor quickly rebounds. Therefore, the magnitude of the servo motor current determines whether the tip has been touched and whether the servo motor torque has reached a preset value. The current magnitude of the servo motor is obtained as the first teaching feedback information, and the current time is obtained as the second teaching time point. The second teaching time point is subtracted from the first teaching time point to obtain the teaching time.

[0048] It should be noted that the setting value should be set according to the actual situation, and no limitation is made here. The origin of the lever is set to the same position when teaching the tool and testing the tool.

[0049] Please see Figure 4 , Figure 4 A specific implementation method prior to step S1 is shown below in detail:

[0050] S1A: Obtain the tool type corresponding to the tool to be tested.

[0051] S1B: Retrieves the preset accuracy value and servo motor speed corresponding to the tool type from the preset database.

[0052] S1C: Based on the servo motor speed, convert the preset accuracy value into a preset time accuracy value.

[0053] Specifically, since the tool magazine may contain different types of tools, each with different lengths and widths, the detection time will vary. Therefore, in this embodiment, the tool type corresponding to the tool to be detected is first obtained. Since preset accuracy values ​​and servo motor speeds have been set for each type of tool before detection and are stored in a preset database, the preset accuracy value and servo motor speed corresponding to the tool type are obtained from the preset database. Then, based on the servo motor speed, the preset accuracy value is converted into a preset time accuracy value.

[0054] Please see Figure 5 , Figure 5 This is a schematic diagram illustrating the lever position setting of a servo motor according to an embodiment of the present invention.

[0055] exist Figure 5The left side is a sketch. If the length of the paddle touches the blade tip within the allowable precision range, it can be imagined as the diagram on the right. △s = s1 - s2 = vt1 - vt2 = v(t1 - t2), meaning the required precision value △s = servo motor speed value v multiplied by the difference between the detected value t1 and the taught value t2. Since the precision value and the servo motor speed value are already set, the preset precision value can be converted into a preset time precision value: △t = △s / v.

[0056] Please see Figure 6 , Figure 6 A specific implementation of step S1 is shown below:

[0057] S11: Obtain the second teaching instruction, wherein the second teaching instruction includes the tool number.

[0058] S12: Execute the second teaching instruction, obtain the tool to be tested corresponding to the tool number, and drive the servo motor to rotate through the servo driver, and obtain the current time point of the servo motor at the origin of the lever as the first target time point.

[0059] S13: When the servo motor touches the tip of the tool to be tested and the torque of the servo motor reaches the set value, the first detection feedback information is obtained, and the second target time point is obtained based on the first detection feedback information.

[0060] S14: Generate the target time based on the difference between the second target time point and the first target time point.

[0061] Specifically, the second teaching instruction refers to the instruction that requires testing the tool to be tested. For example, the second teaching instruction is M600Ty (where y represents the tool number).

[0062] Specifically, since the second teaching instruction includes the tool number, executing the second teaching instruction allows for detection of the corresponding tool to be tested. The servo driver drives the servo motor to rotate, and the current time point of the servo motor at the origin of the lever is obtained as the first target time point. Because the servo driver drives the servo motor to rotate, it causes the lever of the servo motor to rotate. When the lever of the servo motor touches the tip of the tool to be tested, the current of the servo motor will change. When the current reaches a certain value, the motor will quickly rebound. Therefore, the magnitude of the servo motor current is used to determine whether the tool tip has been touched. If it is determined that the tool tip has been touched and the torque of the servo motor reaches a preset value, the current magnitude of the servo motor is obtained as the first detection feedback information, and the current time is obtained as the second target time point. The second target time point is subtracted from the first target time point to obtain the target time.

[0063] It should be noted that the servo motor speed is the same during the testing of both the teach pendant and the tool under test.

[0064] S2: Obtain the teaching time corresponding to the tool to be tested from the preset database, and obtain the time difference between the target time and the teaching time.

[0065] Specifically, the difference time period is obtained by subtracting the teaching time from the target time.

[0066] Please see Figure 7 , Figure 7 A specific implementation method following step S2 is shown below:

[0067] S2A: Compare the time interval of the difference with a preset threshold.

[0068] The preset thresholds include a first threshold, a second threshold, and a third threshold.

[0069] S2B: When the difference time period is within the first threshold, the tool to be tested is determined to be at level one wear.

[0070] S2C: When the difference time period is within the second threshold, the tool to be tested is determined to be at level two wear.

[0071] S2D: When the difference time period is within the third threshold, the tool to be tested is determined to be of level three wear.

[0072] Specifically, since the servo motor speeds are the same during the testing of both the teaching tool and the tool under test, the length difference between the two tools can be determined by multiplying the time difference period by the servo motor speed. Therefore, the degree of wear on the tool under test is determined by the magnitude of the time difference period. In this embodiment, preset thresholds are used, including a first threshold, a second threshold, and a third threshold, each corresponding to a degree of tool wear. The time difference period is compared with the preset thresholds. When the time difference period falls within the first threshold, the tool under test is determined to have level one wear; when it falls within the second threshold, it is determined to have level two wear; and when it falls within the third threshold, it is determined to have level three wear. Level one, level two, and level three wear represent the degree of tool wear, with the severity of wear increasing from level one to level three. Furthermore, the thresholds and wear levels can be set differently depending on the actual situation, rather than just three thresholds and three levels of wear.

[0073] It should be noted that the preset threshold, first threshold, second threshold, and third threshold are set according to the actual situation, and are not limited here. The third threshold is greater than the first and second thresholds, and the second threshold is greater than the first threshold.

[0074] S3: If the time difference exceeds the preset time accuracy value, it is determined that the tool to be tested has broken and an alarm message is issued.

[0075] Specifically, if the wear of the tool is significant, it can be determined that the tool has broken. Since this application embodiment has set precision values ​​according to different tool types, these precision values ​​can be converted into corresponding preset time precision values. Therefore, the difference time period is compared with the preset time precision value. If the difference time period is greater than the preset time precision value, it is determined that the tool under test has broken, and an alarm message is issued; if the difference time period is less than the preset time precision value, it is determined that the tool under test has not broken, and no alarm message needs to be issued. The alarm message can be issued via an alarm light. If it is determined that the tool has broken, the alarm light flashes; otherwise, the alarm light does not flash.

[0076] In this embodiment, the detection time of the servo motor on the tool to be tested is obtained as the target time; the teaching time corresponding to the tool to be tested is obtained from a preset database, and the time difference between the target time and the teaching time is obtained; if the time difference is greater than a preset time accuracy value, it is determined that the tool to be tested has broken, and an alarm message is issued. This embodiment of the invention obtains the detection time and teaching time of the tool to be tested, then obtains the time difference between the two, and compares the time difference with a preset time accuracy value to determine whether the tool has broken. This avoids direct measurement of the tool length and improves the detection efficiency of broken tools inside the tool magazine.

[0077] This invention also provides a device for detecting broken tools inside a tool magazine, which is used to perform any embodiment of the aforementioned method for detecting broken tools inside a tool magazine. Specifically, please refer to... Figure 8 , Figure 8 This is a schematic block diagram of a tool breakage detection device inside a tool magazine provided in an embodiment of the present invention.

[0078] Among them, such as Figure 8 As shown, the tool breakage detection device 5 inside the tool magazine includes a target time acquisition module 51, a difference time period acquisition module 52, and a tool breakage determination module 53.

[0079] The target time acquisition module 51 is used to acquire the detection time of the servo motor on the tool to be inspected, and use it as the target time;

[0080] The difference time period acquisition module 52 is used to obtain the teaching time corresponding to the tool to be tested from the preset database, and to obtain the difference time period between the target time and the teaching time.

[0081] The tool breakage determination module 53 is used to determine that the tool under test has broken if the difference time period is greater than the preset time accuracy value, and to issue an alarm message.

[0082] Furthermore, prior to the target time acquisition module, the device also includes:

[0083] The tool type acquisition module is used to acquire the tool type corresponding to the tool to be detected.

[0084] The servo motor speed acquisition module is used to obtain the preset accuracy value and servo motor speed corresponding to the tool type from the preset database;

[0085] The preset time accuracy value conversion module is used to convert preset accuracy values ​​into preset time accuracy values ​​based on the servo motor speed.

[0086] Furthermore, prior to the target time acquisition module, the device also includes:

[0087] The target teaching tool acquisition module is used to acquire sample tools corresponding to multiple types of undetected tools and tools to be detected, and to use the sample tools as target teaching tools.

[0088] The accuracy value acquisition module is used to acquire the preset accuracy value of the untested tool based on the target taught tool;

[0089] The teaching time acquisition module is used to acquire the detection time of the servo motor on the target teaching tool and obtain the teaching time.

[0090] The data storage module is used to store the preset accuracy value and teaching time in a preset database.

[0091] Furthermore, the teaching time acquisition module includes:

[0092] The first teaching instruction acquisition unit is used to acquire a first teaching instruction, wherein the first teaching instruction includes a teaching tool number;

[0093] The first teaching time point generation unit is used to execute the first teaching instruction, obtain the target teaching tool corresponding to the teaching tool number, and drive the servo motor to rotate through the servo driver based on the first teaching instruction, and obtain the current time point of the servo motor at the origin of the lever as the first teaching time point;

[0094] The second teaching time point generation unit is used to obtain the first teaching feedback information when the servo motor touches the tip of the teaching tool and the torque of the servo motor reaches the set value, and to obtain the second teaching time point based on the first teaching feedback information.

[0095] The teaching time generation unit is used to generate teaching time based on the difference between the second teaching time point and the first teaching time point.

[0096] Furthermore, the target time acquisition module 51 includes:

[0097] The second teaching instruction acquisition unit is used to acquire a second teaching instruction, wherein the second teaching instruction includes a tool number;

[0098] The first target time point acquisition unit is used to execute the second teaching instruction, acquire the tool to be tested corresponding to the tool number, drive the servo motor to rotate through the servo driver, and acquire the current time point of the servo motor at the origin of the lever as the first target time point;

[0099] The second target time point acquisition unit is used to acquire first detection feedback information when the servo motor touches the tip of the tool to be detected and the torque of the servo motor reaches a set value, and acquire the second target time point based on the first detection feedback information.

[0100] The target time generation unit is used to generate a target time based on the difference between the second target time point and the first target time point.

[0101] Furthermore, the difference time period acquisition module 52 also includes:

[0102] The threshold comparison module is used to compare the difference time period with preset thresholds, which include a first threshold, a second threshold, and a third threshold.

[0103] The Level 1 Loss Determination Module is used to determine that the tool to be tested is at Level 1 loss when the difference time period is within the first threshold.

[0104] The secondary loss determination module is used to determine that the tool to be tested is at secondary loss when the difference time period is within the second threshold.

[0105] The Level 3 Loss Detection Module is used to determine that the tool to be tested is at Level 3 loss when the difference time period is within the third threshold.

[0106] In this embodiment, the detection time of the servo motor on the tool to be tested is obtained as the target time; the teaching time corresponding to the tool to be tested is obtained from a preset database, and the time difference between the target time and the teaching time is obtained; if the time difference is greater than a preset time accuracy value, it is determined that the tool to be tested has broken, and an alarm message is issued. This embodiment of the invention obtains the detection time and teaching time of the tool to be tested, then obtains the time difference between the two, and compares the time difference with a preset time accuracy value to determine whether the tool has broken. This avoids direct measurement of the tool length and improves the detection efficiency of broken tools inside the tool magazine.

[0107] The aforementioned tool breakage detection device inside the tool magazine can be implemented as a computer program, which can, for example, Figure 9 It runs on the electronic device shown.

[0108] Please see Figure 9 , Figure 9 This is a schematic block diagram of an electronic device provided in an embodiment of the present invention. The electronic device 500 includes a processor 502, a memory, and a network interface 505 connected via a device bus 501, wherein the memory may include a storage medium 503 and internal memory 504.

[0109] The storage medium 503 can store the operating device 5031 and the computer program 5032. When the computer program 5032 is executed, it causes the processor 502 to execute a method for detecting broken tools inside the tool magazine.

[0110] The processor 502 provides computing and control capabilities to support the operation of the entire electronic device 500.

[0111] The internal memory 504 provides an environment for the operation of the computer program 5032 in the storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a method for detecting broken tools inside the tool magazine.

[0112] This network interface 505 is used for network communication, such as providing data transmission. Those skilled in the art will understand that... Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the electronic device 500 to which the present invention is applied. The specific electronic device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0113] The processor 502 is used to run the computer program 5032 stored in the memory to implement the method for detecting broken tools inside the tool magazine disclosed in the embodiments of the present invention.

[0114] Those skilled in the art will understand that Figure 9 The embodiments of the electronic devices shown do not constitute a limitation on the specific configuration of the electronic devices. In other embodiments, the electronic devices may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. For example, in some embodiments, the electronic devices may include only memory and a processor. In such embodiments, the structure and function of the memory and processor are different from those shown. Figure 9 The embodiments shown are consistent and will not be repeated here.

[0115] It should be understood that, in this embodiment of the invention, the processor 502 may be a Central Processing Unit (CPU), or it may be 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 any conventional processor.

[0116] In another embodiment of the present invention, a computer-readable storage medium is provided. This computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when executed by a processor, the computer program implements the method for detecting broken tools inside a tool magazine disclosed in this embodiment of the invention.

[0117] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention.

[0118] In the embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Units with the same function may be grouped into one unit. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, or may be electrical, mechanical, or other forms of connection.

[0119] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.

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

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

[0122] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for detecting broken tools inside a tool magazine, characterized in that, include: Acquire sample tools corresponding to multiple types of undetected tools and tools to be detected, and use the sample tools as target teaching tools; Based on the target teaching tool, the preset accuracy value of the undetected tool is obtained, wherein different servo motor speeds are set according to different tool types, and the corresponding servo motor speeds are stored in a preset database; The detection time of the servo motor on the target teaching tool is obtained to obtain the teaching time; The preset accuracy value and the teaching time are stored in the preset database; The detection time of the servo motor on the tool to be inspected is obtained and used as the target time; The teaching time corresponding to the tool to be tested is obtained from the preset database, and the time difference between the target time and the teaching time is obtained. If the time interval of the difference is greater than the preset time accuracy value, it is determined that the tool to be tested has broken and an alarm message is issued. The step of obtaining the detection time of the servo motor for the tool to be inspected, as the target time, includes: Obtain a second teaching instruction, wherein the second teaching instruction includes a tool number; Execute the second teaching instruction to obtain the tool to be tested corresponding to the tool number, and drive the servo motor to rotate through the servo driver to obtain the current time point of the servo motor at the origin of the lever as the first target time point; When the servo motor touches the tip of the tool to be tested and the torque of the servo motor reaches a set value, first detection feedback information is obtained, and a second target time point is obtained based on the first detection feedback information. The target time is generated based on the difference between the second target time point and the first target time point.

2. The method for detecting broken tools inside the tool magazine according to claim 1, characterized in that, Before obtaining the detection time of the servo motor on the tool to be inspected as the target time, the method further includes: Obtain the tool type corresponding to the tool to be detected; Retrieve the preset accuracy value and servo motor speed corresponding to the tool type from the preset database; Based on the servo motor speed, the preset accuracy value is converted into the preset time accuracy value.

3. The method for detecting broken tools inside the tool magazine according to claim 1, characterized in that, The step of obtaining the detection time of the servo motor on the target teaching tool and obtaining the teaching time includes: Obtain a first teaching instruction, wherein the first teaching instruction includes a teaching tool number; Execute the first teaching instruction, obtain the target teaching tool corresponding to the teaching tool number, and based on the first teaching instruction, drive the servo motor to rotate through the servo driver, and obtain the current time point of the servo motor at the origin of the lever as the first teaching time point; When the servo motor touches the tip of the teaching tool and the torque of the servo motor reaches a set value, the first teaching feedback information is obtained, and the second teaching time point is obtained based on the first teaching feedback information. The teaching time is generated based on the difference between the second teaching time point and the first teaching time point.

4. The method for detecting broken tools inside a tool magazine according to any one of claims 1 to 3, characterized in that, After obtaining the teaching time corresponding to the tool to be tested from a preset database and obtaining the time difference between the target time and the teaching time, the method further includes: The difference time period is compared with a preset threshold, which includes a first threshold, a second threshold, and a third threshold. When the time interval of the difference is within the first threshold, the tool to be tested is determined to be at level one wear. When the time interval of the difference is within the second threshold, the tool to be tested is determined to be at level two wear. When the time interval of the difference is within the third threshold, the tool to be tested is determined to be at level three wear.

5. A device for detecting broken tools inside a tool magazine, characterized in that, include: The target teaching tool acquisition module is used to acquire sample tools corresponding to multiple types of undetected tools and tools to be detected, and to use the sample tools as target teaching tools. The accuracy value acquisition module is used to acquire the preset accuracy value of the undetected tool based on the target teaching tool, wherein different servo motor speeds are set according to different tool types, and the corresponding servo motor speeds are stored in a preset database. The teaching time acquisition module is used to acquire the detection time of the servo motor on the target teaching tool, and obtain the teaching time. A data storage module is used to store the preset accuracy value and the teaching time in the preset database; The target time acquisition module is used to acquire the detection time of the servo motor on the tool to be inspected, and use it as the target time. The difference time period acquisition module is used to obtain the teaching time corresponding to the tool to be tested from a preset database, and to obtain the difference time period between the target time and the teaching time. The tool breakage determination module is used to determine that the tool under test has broken if the difference time period is greater than a preset time accuracy value, and to issue an alarm message. The target time acquisition module includes: The second teaching instruction acquisition unit is used to acquire a second teaching instruction, wherein the second teaching instruction includes a tool number; The first target time point acquisition unit is used to execute the second teaching instruction, acquire the tool to be tested corresponding to the tool number, drive the servo motor to rotate through the servo driver, and acquire the current time point of the servo motor at the origin of the lever as the first target time point; The second target time point acquisition unit is used to acquire first detection feedback information when the servo motor touches the tip of the tool to be detected and the torque of the servo motor reaches a set value, and acquire a second target time point based on the first detection feedback information. The target time generation unit is used to generate the target time based on the difference between the second target time point and the first target time point.

6. The tool breakage detection device inside the tool magazine according to claim 5, characterized in that, Prior to the target time acquisition module, the device further includes: The tool type acquisition module is used to acquire the tool type corresponding to the tool to be detected; The servo motor speed acquisition module is used to acquire the preset accuracy value and servo motor speed corresponding to the tool type from the preset database. The preset time accuracy value conversion module is used to convert the preset accuracy value into the preset time accuracy value based on the servo motor speed.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method for detecting broken tools inside the tool magazine as described in any one of claims 1 to 4.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the method for detecting broken tools inside the tool magazine as described in any one of claims 1 to 4.