Spindle orientation detection method, CNC machine tool, device, equipment and storage medium

By installing an orientation detection component on the end face of the CNC machine tool spindle box, electromagnetic waves are used to detect the actual orientation position of the spindle, thus solving the problem of inaccurate spindle orientation, ensuring the accuracy and safety of spindle orientation, and avoiding damage to the spindle and tool magazine.

CN117086694BActive Publication Date: 2025-10-31GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311144028.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-05
Publication Date
2025-10-31
Estimated Expiration
2043-09-05

AI Technical Summary

Technical Problem

During the spindle orientation process of CNC machine tools, electromagnetic interference may cause the actual orientation position of the spindle to be inconsistent with the required position, which may lead to damage to the tool magazine and spindle drawbar when the robot arm quickly changes tools.

Method used

An orientation detection component is installed on the end face of the spindle box of a CNC machine tool. By emitting electromagnetic waves to the tool and receiving the reflected waves, the actual orientation position of the spindle is determined, and orientation results are generated to ensure orientation accuracy, including distance change detection and rotation count recording.

Benefits of technology

To ensure the accuracy of spindle orientation, avoid damage to the spindle drawbar and tool magazine during rapid tool changes by the CNC machine tool robot, and improve the accuracy of orientation detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117086694B_ABST
    Figure CN117086694B_ABST
Patent Text Reader

Abstract

This application provides a spindle orientation detection method, CNC machine tool, device, equipment, and storage medium, belonging to the field of machining technology. The method includes: responding to a spindle orientation command, activating an orientation detection component, which is disposed on the end face of the spindle head of the CNC machine tool. The orientation detection component is used to emit electromagnetic waves to a tool mounted on the spindle, and the tool has a groove on its side; controlling the spindle driver to rotate the spindle to the target orientation position indicated by the spindle orientation command; determining the actual orientation position of the spindle based on the reflected electromagnetic waves received by the orientation detection component and generating an orientation result. This method can detect the position of the oriented spindle, ensuring the accuracy of spindle orientation, and can also avoid damage to the spindle drawbar and tool magazine during rapid tool changes by a robot arm on the CNC machine tool.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machining technology, and in particular to a spindle orientation detection method, CNC machine tool, device, equipment and storage medium. Background Technology

[0002] Currently, most CNC machining center spindles have spindle orientation capabilities, which can meet the needs of operations such as tool changing and boring. One method of spindle orientation control in CNC machining centers is that after receiving the orientation command from the CNC system, the spindle driver controls the spindle motor to complete the orientation through speed control mode. Then, the spindle encoder feeds back the spindle orientation reference position to the driver, which feeds back a signal indicating whether the spindle orientation is complete to the CNC system, and the CNC system displays the result.

[0003] During long-term operation and signal transmission of CNC machine tools, electromagnetic interference between cables can cause issues such as encoder feedback parameters and spindle driver orientation parameters to be completely consistent when the spindle orientation is completed, but the actual spindle orientation position does not match the spindle orientation position required for tool change, resulting in orientation angle offset and inaccuracy. Furthermore, because the encoder feedback signal received by the driver indicates successful spindle orientation, the system will control the next step of tool change to start, which may cause damage to the tool magazine and spindle drawbar during rapid tool change by the CNC machine tool robot. Summary of the Invention

[0004] This application provides a spindle orientation detection method, CNC machine tool, device, equipment, and storage medium, which can detect the position of a oriented spindle to ensure the accuracy of spindle orientation. The technical solution is as follows:

[0005] On one hand, embodiments of this application provide a spindle orientation detection method, including:

[0006] In response to a spindle orientation command, the orientation detection component is activated. The orientation detection component is disposed on the end face of the spindle box of the CNC machine tool. The orientation detection component is used to emit electromagnetic waves to the tool mounted on the spindle. The tool has a groove on its side.

[0007] The spindle driver is controlled to rotate the spindle to the target orientation position indicated by the spindle orientation command;

[0008] The actual orientation position of the spindle is determined based on the reflected electromagnetic waves received by the orientation detection component, and an orientation result is generated. The orientation result is used to indicate whether the orientation is successful or failed.

[0009] Optionally, determining the actual orientation position of the main shaft and generating an orientation result based on the reflected electromagnetic waves received by the orientation detection component includes:

[0010] The distance between the orientation detection component and the cutting tool is determined based on the reflected electromagnetic waves received by the orientation detection component;

[0011] The actual orientation position is determined based on the periodic changes in the distance, and the orientation result is generated.

[0012] Optionally, the spindle driver is also used to record the number of rotations of the spindle;

[0013] Determining the actual orientation position and generating the orientation result based on the periodic changes in the distance includes:

[0014] The number of times the main axis passes through the target orientation position is determined based on the number of cycles of the distance change;

[0015] In response to the spindle passing through the target orientation position a number of times match the number of rotations recorded by the spindle driver, an orientation result indicating successful orientation is generated.

[0016] In response to a discrepancy between the number of times the spindle passes the target orientation position and the number of rotations recorded by the spindle driver, an orientation result indicating orientation failure is generated.

[0017] Optionally, after determining the actual orientation position of the spindle based on the reflected electromagnetic waves received by the orientation detection component and generating the orientation result, the method further includes:

[0018] The positional deviation between the actual orientation position and the target orientation position is determined based on the signal length of the last change cycle.

[0019] In response to the position deviation being less than the deviation threshold, detection information indicating that the orientation position error detection is qualified is generated;

[0020] In response to the position deviation being greater than the deviation threshold, detection information indicating that the orientation position error detection is unqualified is generated.

[0021] Optionally, controlling the spindle drive to rotate the spindle to the target orientation position indicated by the spindle orientation command includes:

[0022] Based on the pulse value corresponding to the current position of the spindle and the pulse value corresponding to the target orientation position, the rotation angle required for the spindle to rotate to the target orientation position in different directions is determined, wherein the rotation direction includes clockwise and counterclockwise directions;

[0023] The spindle driver is controlled to rotate the spindle in the target rotation direction to the target orientation position, wherein the rotation angle corresponding to the target rotation direction is less than or equal to the rotation angle corresponding to another rotation direction.

[0024] Optionally, the orientation detection component is provided with a housing including an electrically controlled door;

[0025] The activation of the orientation detection component in response to the spindle orientation command includes:

[0026] In response to the spindle orientation command, the electrically controlled door is opened via the electrically controlled door lock and the orientation detection component is activated;

[0027] After determining the actual orientation position of the spindle based on the reflected electromagnetic waves received by the orientation detection component and generating the orientation result, the method further includes:

[0028] The electrically controlled door is closed by the electrically controlled door lock.

[0029] On the other hand, this application embodiment provides a CNC machine tool, wherein an orientation detection component is provided on the end face of the spindle box of the CNC machine tool;

[0030] The computer numerical control (CNC) system of the CNC machine tool is used to activate the orientation detection component after receiving the spindle orientation command, and control the spindle driver to rotate the spindle to the orientation position indicated by the spindle orientation command;

[0031] A cutting tool is mounted on the spindle, and a groove is provided on the side of the cutting tool;

[0032] The orientation detection component is used to emit electromagnetic waves to the cutting tool, and determine the actual orientation position of the spindle based on the reflected electromagnetic waves and generate an orientation result, which is used to indicate whether the orientation is successful or failed.

[0033] Optionally, the orientation detection component is provided with a housing including an electrically controlled door;

[0034] The CNC system is also used to respond to the spindle orientation command by opening the electrically controlled door and activating the orientation detection component via an electrically controlled door lock, and closing the electrically controlled door via the electrically controlled door lock after obtaining the orientation result.

[0035] On the other hand, embodiments of this application provide a spindle orientation detection device, including:

[0036] The component activation module is used to activate the orientation detection component in response to the spindle orientation command. The orientation detection component is disposed on the end face of the spindle box of the CNC machine tool. The orientation detection component is used to emit electromagnetic waves to the tool mounted on the spindle. The tool has a groove on its side.

[0037] The control module is used to control the spindle driver to rotate the spindle to the target orientation position indicated by the spindle orientation command;

[0038] The detection module is used to determine the actual orientation position of the main shaft based on the reflected electromagnetic waves received by the orientation detection component and generate an orientation result, which is used to indicate whether the orientation is successful or failed.

[0039] On the other hand, embodiments of this application provide an electronic device, which includes a memory and a processor; the memory stores a computer program, which, when executed by the processor, implements the methods described above.

[0040] On the other hand, embodiments of this application provide a computer-readable storage medium storing a computer program that is loaded and executed by a processor to implement the methods described above.

[0041] The technical solution provided in this application includes at least the following beneficial effects:

[0042] The spindle orientation detection method, CNC machine tool, device, equipment, and storage medium provided in this application, by setting an orientation detection component on the end face of the CNC machine tool spindle box, detects the actual orientation position of the spindle based on the electromagnetic waves emitted and received by the orientation detection component towards the tool. This allows for the detection of the position of the oriented spindle, ensuring the accuracy of spindle orientation. It also avoids damage to the spindle drawbar and tool magazine during rapid tool changes by the robot arm on the CNC machine tool. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below.

[0044] Figure 1 This is a flowchart of a spindle orientation detection method provided in an exemplary embodiment of this application;

[0045] Figure 2 This is a flowchart of a spindle orientation detection method provided in another exemplary embodiment of this application;

[0046] Figure 3 This is a flowchart of a spindle orientation detection method provided in another exemplary embodiment of this application;

[0047] Figure 4 This is a schematic diagram of a portion of the structure of a CNC machine tool provided in an exemplary embodiment of this application;

[0048] Figure 5This is a structural block diagram of a spindle orientation detection device provided in an exemplary embodiment of this application;

[0049] Figure 6 This is a structural block diagram of an electronic device provided in an exemplary embodiment of this application. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0051] Please refer to Figure 1 The diagram illustrates a flowchart of a spindle orientation detection method provided in an exemplary embodiment of this application. The method includes the following steps:

[0052] Step 101: In response to the spindle orientation command, the orientation detection component is activated. The orientation detection component is set on the end face of the spindle box of the CNC machine tool. The orientation detection component is used to emit electromagnetic waves to the tool mounted on the spindle. The tool has a groove on its side.

[0053] In one possible implementation, the CNC machine tool is executed by a Computer Numerical Control (CNC) system. The spindle orientation command can be generated by the CNC system based on a computer program in automatic operation mode, or it can be generated based on user operation in manual mode.

[0054] Upon receiving the spindle orientation command, the equipment activates the orientation detection component before commencing spindle orientation. This component is mounted on the fixed end face of the CNC machine tool spindle, with the cutting tool mounted on its rotatable portion. During orientation, the spindle controls the tool's rotation via its rotatable portion, while the orientation detection component remains stationary and continuously emits electromagnetic waves towards the tool. The distance between the component and the tool is determined by reflecting these electromagnetic waves.

[0055] Step 102: Control the spindle driver to rotate the spindle to the target orientation position indicated by the spindle orientation command.

[0056] When the spindle rotates, it drives the tool to rotate. Because there is a groove on the side of the tool, the distance between the orientation detection component and the groove is greater than the distance between the component and the outer surface of the tool. During the rotation of the tool, when the groove passes through an angle relative to the orientation detection component, it will cause a change in distance. Thus, the electronic equipment can determine the rotation of the tool and the spindle, as well as the actual orientation position after the rotation stops, based on the change in the distance signal.

[0057] Step 103: Determine the actual orientation position of the spindle based on the reflected electromagnetic waves received by the orientation detection component and generate an orientation result. The orientation result is used to indicate whether the orientation was successful or failed.

[0058] The electronic device determines the actual orientation position of the main shaft based on the reflected electromagnetic waves received by the orientation detection component. By comparing the actual orientation position with the target orientation position, it determines whether the orientation is successful or unsuccessful.

[0059] In one possible implementation, the electronic device displays the orientation result on a screen and provides an alarm prompt (e.g., a voice alarm or plays an alarm ringing sound) in the event of orientation failure.

[0060] In summary, the spindle orientation detection method provided in this application, by setting an orientation detection component on the end face of the CNC machine tool spindle box, detects the actual orientation position of the spindle based on the electromagnetic waves emitted and received by the orientation detection component towards the tool. This allows for the detection of the position of the oriented spindle, ensuring the accuracy of spindle orientation. Furthermore, it avoids damage to the spindle drawbar and tool magazine during rapid tool changes by the robot arm on the CNC machine tool.

[0061] Please refer to Figure 2 The diagram illustrates a flowchart of a spindle orientation detection method provided in another exemplary embodiment of this application. The method includes the following steps:

[0062] Step 201: In response to the spindle orientation command, the orientation detection component is activated. The orientation detection component is set on the end face of the spindle box of the CNC machine tool. The orientation detection component is used to emit electromagnetic waves to the tool mounted on the spindle. The tool has a groove on its side.

[0063] The specific implementation of step 201 can be referred to step 101 above, and will not be repeated here in the embodiments of this application.

[0064] Step 202: Based on the pulse value corresponding to the current position of the spindle and the pulse value corresponding to the target orientation position, determine the rotation angle required for the spindle to rotate to the target orientation position in different directions.

[0065] The rotation direction includes clockwise and counterclockwise directions.

[0066] In CNC machine tools, a pulse is a signal used to control the operation of the motor. The main function of pulses in CNC machine tools is to control the motor, and each different motor movement mode corresponds to a specific pulse signal. For example, the rotation of the spindle requires a periodic pulse signal for control.

[0067] In one possible implementation, the spindle encoder feeds back the pulse value of the spindle at its previous stop position before orientation, i.e., the pulse value corresponding to the current position. By comparing the pulse value corresponding to the current position with the pulse value corresponding to the target orientation position, the rotation angle required for the spindle to rotate to the target orientation position in different directions can be determined. For example, clockwise rotation to the target orientation position requires a 60° rotation, while counterclockwise rotation requires a 300° rotation.

[0068] Step 203: Control the spindle driver to rotate the spindle in the target rotation direction and rotate the spindle to the target orientation position.

[0069] Wherein, the rotation angle corresponding to the target rotation direction is less than or equal to the rotation angle corresponding to the other rotation direction.

[0070] To improve orientation efficiency, electronic devices need to choose a direction with a smaller rotation angle for orientation, such as the clockwise direction in the example of step 202.

[0071] Step 204: Determine the distance between the orientation detection component and the tool based on the reflected electromagnetic waves received by the orientation detection component.

[0072] The orientation detection component is mounted on the end face of the spindle box of a CNC machine tool, with the cutting tool mounted on the spindle. During orientation, the spindle controls the rotation of the cutting tool, while the orientation detection component remains stationary and continuously emits electromagnetic waves towards the cutting tool. The distance between the component and the cutting tool can be determined based on the reflected electromagnetic waves.

[0073] Step 205: Determine the actual orientation location based on the periodic changes in distance and generate the orientation result.

[0074] Because the tool has a groove on its side, the distance between the orientation detection component and the groove is greater than the distance between the component and the outer surface of the tool. During tool rotation, as the groove passes through an angle relative to the orientation detection component, a change in distance occurs. Each rotation of the tool results in a signal fluctuation. The electronic device can determine the signal period based on the signal waveform.

[0075] Specifically, when orientation requires multiple rotations, the spindle driver is also used to record the number of spindle rotations. Step 205 includes the following steps:

[0076] Step 205a: Determine the number of times the main axis passes through the target orientation position based on the number of distance change cycles.

[0077] Step 205b: In response to the spindle passing the target orientation position a number of times match the number of rotations recorded by the spindle driver, an orientation result is generated to indicate successful orientation.

[0078] Step 205c: In response to the discrepancy between the number of times the spindle passes the target orientation position and the number of rotations recorded by the spindle driver, an orientation result is generated to indicate orientation failure.

[0079] As the tool rotates, the distance changes when the groove passes through the angle opposite to the orientation detection component, and periodic changes occur during multiple rotations. Therefore, the electronic equipment can determine the number of times the spindle stops at the target orientation position through filtering and periodic grouping.

[0080] If the number of times the spindle passes the target orientation position matches the number of rotations recorded by the spindle driver, then the orientation is considered successful, and the required number of rotations for the spindle orientation command has been achieved; otherwise, the orientation fails.

[0081] Step 206: Determine the positional deviation between the actual orientation position and the target orientation position based on the signal length of the last change cycle.

[0082] Even with the correct number of rotations, there may still be a certain angular deviation between the actual orientation position and the target orientation position. In one possible implementation, if the orientation is successful (i.e., the number of rotations is correct), the electronic device can also detect the angular deviation of the actual orientation position using an orientation detection component.

[0083] Indicatively, in the periodic changes of the results detected by the orientation detection component, assuming the signal length when the groove position is detected is 'a', the target orientation position should be at a signal length of a / 2. By comparing the signal length at the actual orientation position with a / 2 of the target orientation position, the relative error value, i.e., the position deviation, can be obtained.

[0084] Step 207: In response to the position deviation being less than or equal to the deviation threshold, generate detection information to indicate that the orientation position error detection is qualified.

[0085] If the position deviation is less than the deviation threshold, the position error detection is within the acceptable range, and the electronic device outputs a qualified detection message.

[0086] Step 208: In response to the position deviation being greater than the deviation threshold, generate detection information to indicate that the orientation position error detection is unqualified.

[0087] If the position deviation is greater than the deviation threshold, the position error is unqualified, and the electronic device will output a position error unqualified message and issue an alarm.

[0088] In this embodiment, the actual orientation position of the spindle is detected by the electromagnetic waves emitted and received by the orientation detection component towards the tool. This allows for the detection of the orientation position of the spindle after orientation has been completed, ensuring the accuracy of spindle orientation. Furthermore, the orientation detection component is used to detect the angular deviation of the actual orientation position, further improving the accuracy of orientation detection.

[0089] In one possible implementation, the orientation detection component is provided with a housing containing an electrically controlled door, and step 101 specifically includes the following steps:

[0090] Step four: In response to the spindle orientation command, the electric door is opened via the electric door lock and the orientation detection component is activated.

[0091] After step 103, the method provided in this application embodiment further includes the following steps:

[0092] Step 5: Close the electrically controlled door using the electrically controlled door lock.

[0093] To protect the orientation detection component, the component is provided with a housing containing an electrically controlled door. During non-orientation detection, the electrically controlled door is closed, and the internal structure of the orientation detection component is enclosed within the housing to prevent accidental damage from cutting tools.

[0094] In combination with the above embodiments, Figure 3 The flowchart of a spindle orientation detection method is shown:

[0095] When the CNC system executes a spindle orientation command in automatic mode or inputs a spindle orientation command in manual mode, the CNC system transmits a signal to the driver to perform the spindle orientation operation. Before executing the spindle orientation command, the CNC system first activates the orientation detection component (electrically controlled door open, orientation detection component operating normally).

[0096] The spindle driver should compare the actual number of pulses at the spindle orientation position with the number of pulses at any stop position of the spindle before orientation. Specifically, the spindle driver compares the pulse values ​​before spindle orientation fed back by the spindle encoder with the spindle orientation position pulse values ​​set by the system to obtain the rotation angles of the spindle in different directions (clockwise and counterclockwise): the rotation angle of the spindle rotating clockwise to the spindle orientation position is A, and the rotation angle of the spindle rotating counterclockwise to the spindle orientation position is B. The spindle driver selects the spindle rotation direction with the smaller angle between A and B as the spindle orientation rotation direction for spindle orientation.

[0097] After selecting the spindle orientation direction, the spindle driver needs to complete the spindle orientation in the shortest possible time. The driver rotation angle must be the same as one of the selected angles A and B, and the spindle must stop at the set position. When encountering multiple rotations, the driver needs to record the number of rotations C and feed it back to the CNC system.

[0098] The orientation detection component detects the number of times the spindle stops at the correct position (D) and sends the result back to the CNC system. The CNC system then determines whether the spindle orientation is successful; if the number of stops (C) and D are equal, the spindle is considered successfully oriented. Otherwise, the system sends an orientation alarm.

[0099] The orientation detection component also has a spindle orientation position error analysis function. It can only output qualified information when the position error detection is within the qualified range; otherwise, it will output an unqualified position error alarm to the CNC control system for alarm prompt.

[0100] Please refer to Figure 4 This illustration shows a schematic diagram of a CNC machine tool spindle portion provided in an exemplary embodiment of this application. An orientation detection component 2 is disposed on the spindle head end face 1 of the CNC machine tool. The CNC system of the CNC machine tool is used to activate the orientation detection component 2 upon receiving a spindle orientation command, and to control the spindle driver to rotate the spindle to the orientation position indicated by the spindle orientation command. A tool 3 is mounted on the spindle, and a groove is provided on the side of the tool 3. The orientation detection component 2 is used to emit electromagnetic waves to the tool 3, and to determine the actual orientation position of the spindle based on the reflected electromagnetic waves and generate an orientation result, which is used to indicate whether the orientation was successful or failed.

[0101] After receiving a spindle orientation command, the CNC machine tool activates the orientation detection component before starting the spindle orientation process. This component is mounted on the fixed end face of the CNC machine tool spindle, with the cutting tool mounted on its rotatable portion. During orientation, the spindle controls the tool's rotation via the rotatable portion, while the orientation detection component remains stationary and continuously emits electromagnetic waves towards the tool. The distance between the component and the tool is determined by reflecting these electromagnetic waves. The spindle's rotation drives the tool's rotation. Because the tool has grooves on its side, the distance between the orientation detection component and these grooves is greater than the distance between the component and the tool's outer surface. As the tool rotates, the distance changes when the grooves pass through an angle relative to the orientation detection component. The electronic equipment can then determine the rotation of the tool and spindle, as well as the actual orientation position after rotation stops, based on these changes in distance signal. The CNC machine tool determines the actual orientation position of the spindle based on the reflected electromagnetic waves received by the orientation detection component. By comparing the actual orientation position with the target orientation position, it determines whether the orientation was successful or not.

[0102] The specific targeted detection process can be referred to in the above method embodiments, and will not be repeated here in the embodiments of this application.

[0103] Optional, such as Figure 4 As shown, the orientation detection component 2 is equipped with a housing containing an electrically controlled door. The CNC system also responds to spindle orientation commands by opening the electrically controlled door and activating the orientation detection component 2 via the electrically controlled door lock 4, and closing the electrically controlled door via the electrically controlled door lock 4 after obtaining the orientation results. The orientation detection component 2 consists of a housing and an internal detection unit 5. The housing is equipped with an electrically controlled door, which is closed during non-orientation detection. The detection unit 5 of the orientation detection component 2 is enclosed within the housing to prevent accidental damage from the cutting tool.

[0104] Please refer to Figure 5 The diagram illustrates a structural block diagram of a spindle orientation detection device provided in an exemplary embodiment of this application. The device includes:

[0105] The component activation module 501 is used to activate the orientation detection component in response to the spindle orientation command. The orientation detection component is disposed on the end face of the spindle box of the CNC machine tool. The orientation detection component is used to emit electromagnetic waves to the tool mounted on the spindle. The tool has a groove on its side.

[0106] Control module 502 is used to control the spindle driver to rotate the spindle to the target orientation position indicated by the spindle orientation command;

[0107] The detection module 503 is used to determine the actual orientation position of the main shaft based on the reflected electromagnetic waves received by the orientation detection component and generate an orientation result, which is used to indicate whether the orientation is successful or failed.

[0108] Optionally, the detection module 503 is further configured to:

[0109] The distance between the orientation detection component and the cutting tool is determined based on the reflected electromagnetic waves received by the orientation detection component;

[0110] The actual orientation position is determined based on the periodic changes in the distance, and the orientation result is generated.

[0111] Optionally, the spindle driver is also used to record the number of rotations of the spindle;

[0112] The detection module 503 is also used for:

[0113] The number of times the main axis passes through the target orientation position is determined based on the number of cycles of the distance change;

[0114] In response to the spindle passing through the target orientation position a number of times match the number of rotations recorded by the spindle driver, an orientation result indicating successful orientation is generated.

[0115] In response to a discrepancy between the number of times the spindle passes the target orientation position and the number of rotations recorded by the spindle driver, an orientation result indicating orientation failure is generated.

[0116] Optionally, the device further includes:

[0117] The determination module is used to determine the positional deviation between the actual orientation position and the target orientation position based on the signal length of the last change cycle;

[0118] A generation module is used to generate detection information indicating that the orientation position error detection is qualified in response to the position deviation being less than or equal to a deviation threshold.

[0119] The generation module is further configured to generate detection information indicating that the orientation position error detection is unqualified in response to the position deviation being greater than the deviation threshold.

[0120] Optionally, the control module 502 is further configured to:

[0121] Based on the pulse value corresponding to the current position of the spindle and the pulse value corresponding to the target orientation position, the rotation angle required for the spindle to rotate to the target orientation position in different directions is determined, wherein the rotation direction includes clockwise and counterclockwise directions;

[0122] The spindle driver is controlled to rotate the spindle in the target rotation direction to the target orientation position, wherein the rotation angle corresponding to the target rotation direction is less than or equal to the rotation angle corresponding to another rotation direction.

[0123] Optionally, the orientation detection component is provided with a housing including an electrically controlled door;

[0124] The component activation module 501 is further configured to:

[0125] In response to the spindle orientation command, the electrically controlled door is opened via the electrically controlled door lock and the orientation detection component is activated;

[0126] The device further includes:

[0127] The component closing module is used to close the electrically controlled door via the electrically controlled door lock.

[0128] This application provides an electronic device; Figure 6 This is a schematic diagram of the composition structure of the electronic device provided in the embodiments of this application, such as... Figure 6As shown, the electronic device 600 includes: a processor 601, at least one communication bus 602, a user interface 603, at least one external communication interface 604, and a memory 605. The communication bus 602 is configured to enable communication between these components. The user interface 603 may include a display screen, and the external communication interface 604 may include standard wired and wireless interfaces. The processor 601 is configured to execute a program stored in the memory for a spindle orientation detection method to implement the steps of the method provided in the above embodiments.

[0129] This application also provides a computer-readable storage medium storing a computer program, which is loaded and executed by a processor to implement the methods described in the above embodiments.

[0130] This application also provides a computer program product that runs on a processor of a computer device, causing the computer device to perform the methods described in the above embodiments.

[0131] It should be noted that the descriptions of the storage medium, electronic device, and remote control embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0132] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0133] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, object, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, object, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, object, or apparatus that includes that element.

[0134] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0135] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0136] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0137] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.

[0138] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to the prior art, 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 controller to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0139] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A spindle orientation detection method, characterized in that, The method includes: In response to a spindle orientation command, the orientation detection component is activated. The orientation detection component is disposed on the end face of the spindle box of the CNC machine tool. The orientation detection component is used to emit electromagnetic waves to the tool mounted on the spindle. The tool has a groove on its side. The spindle driver is controlled to rotate the spindle to the target orientation position indicated by the spindle orientation command; The actual orientation position of the main shaft is determined based on the reflected electromagnetic waves received by the orientation detection component, and an orientation result is generated. The orientation result is used to indicate whether the orientation is successful or failed. The step of determining the actual orientation position of the spindle and generating an orientation result based on the reflected electromagnetic waves received by the orientation detection component includes: The distance between the orientation detection component and the cutting tool is determined based on the reflected electromagnetic waves received by the orientation detection component; The actual orientation location is determined based on the periodic changes in the distance, and the orientation result is generated. The spindle driver is also used to record the number of rotations of the spindle; Determining the actual orientation position and generating the orientation result based on the periodic changes in the distance includes: The number of times the main axis passes through the target orientation position is determined based on the number of cycles of the distance change; In response to the spindle passing through the target orientation position a number of times match the number of rotations recorded by the spindle driver, an orientation result indicating successful orientation is generated. In response to a discrepancy between the number of times the spindle passes the target orientation position and the number of rotations recorded by the spindle driver, an orientation result indicating orientation failure is generated.

2. The method according to claim 1, characterized in that, After determining the actual orientation position of the spindle based on the reflected electromagnetic waves received by the orientation detection component and generating the orientation result, the method further includes: The positional deviation between the actual orientation position and the target orientation position is determined based on the signal length of the last change cycle. In response to the position deviation being less than or equal to a deviation threshold, detection information is generated to indicate that the orientation position error detection is qualified; In response to the position deviation being greater than the deviation threshold, detection information is generated to indicate that the orientation position error detection is unqualified.

3. The method according to any one of claims 1 to 2, characterized in that, The control spindle driver rotates the spindle to the target orientation position indicated by the spindle orientation command, including: Based on the pulse value corresponding to the current position of the spindle and the pulse value corresponding to the target orientation position, the rotation angle required for the spindle to rotate to the target orientation position in different directions is determined, wherein the rotation direction includes clockwise and counterclockwise directions; The spindle driver is controlled to rotate the spindle in the target rotation direction to the target orientation position, wherein the rotation angle corresponding to the target rotation direction is less than or equal to the rotation angle corresponding to another rotation direction.

4. The method according to any one of claims 1 to 2, characterized in that, The orientation detection component is provided with a housing containing an electrically controlled door; The activation of the orientation detection component in response to the spindle orientation command includes: In response to the spindle orientation command, the electrically controlled door is opened via the electrically controlled door lock and the orientation detection component is activated; After determining the actual orientation position of the spindle based on the reflected electromagnetic waves received by the orientation detection component and generating the orientation result, the method further includes: The electrically controlled door is closed by the electrically controlled door lock.

5. A CNC machine tool, characterized in that, For performing the method as described in any one of claims 1-4, the CNC machine tool has an orientation detection component provided on the end face of the spindle box; The computer numerical control (CNC) system of the CNC machine tool is used to activate the orientation detection component after receiving the spindle orientation command, and control the spindle driver to rotate the spindle to the orientation position indicated by the spindle orientation command; A cutting tool is mounted on the spindle, and a groove is provided on the side of the cutting tool; The orientation detection component is used to emit electromagnetic waves to the cutting tool, and determine the actual orientation position of the spindle based on the reflected electromagnetic waves and generate an orientation result, which is used to indicate whether the orientation is successful or failed.

6. The CNC machine tool according to claim 5, characterized in that, The orientation detection component is provided with a housing containing an electrically controlled door; The CNC system is also used to respond to the spindle orientation command by opening the electrically controlled door and activating the orientation detection component via an electrically controlled door lock, and closing the electrically controlled door via the electrically controlled door lock after obtaining the orientation result.

7. A spindle orientation detection device, characterized in that, The device includes: The component activation module is used to activate the orientation detection component in response to the spindle orientation command. The orientation detection component is disposed on the end face of the spindle box of the CNC machine tool. The orientation detection component is used to emit electromagnetic waves to the tool mounted on the spindle. The tool has a groove on its side. The control module is used to control the spindle driver to rotate the spindle to the target orientation position indicated by the spindle orientation command; The detection module is used to determine the actual orientation position of the main shaft based on the reflected electromagnetic waves received by the orientation detection component and generate an orientation result, which is used to indicate whether the orientation is successful or failed. The detection module is also used for: The distance between the orientation detection component and the cutting tool is determined based on the reflected electromagnetic waves received by the orientation detection component; The actual orientation location is determined based on the periodic changes in the distance, and the orientation result is generated. The spindle driver is also used to record the number of rotations of the spindle; The detection module is also used for: The number of times the main axis passes through the target orientation position is determined based on the number of cycles of the distance change; In response to the spindle passing through the target orientation position a number of times match the number of rotations recorded by the spindle driver, an orientation result indicating successful orientation is generated. In response to a discrepancy between the number of times the spindle passes the target orientation position and the number of rotations recorded by the spindle driver, an orientation result indicating orientation failure is generated.

8. An electronic device, characterized in that, It includes a memory and a processor; the memory stores a computer program that, when executed by the processor, implements the method as described in any one of claims 1 to 4.

9. A computer-readable storage medium, characterized in that, The system contains a computer program that is loaded and executed by a processor to implement the method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Control system for stopping spindle at predetermined rotational position

    US4359676A