Control method, device, processor and computer-readable storage medium for realizing efficient spindle positioning

By switching control modes, latch position information and planning motion paths in the spindle servo drive, the problems of spindle positioning efficiency and accuracy in the prior art are solved, and efficient and accurate positioning is achieved.

CN115629571BActive Publication Date: 2025-03-25SHANGHAI WEIHONG ELECTRONICS TECH +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211316031.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-26
Publication Date
2025-03-25
Estimated Expiration
2042-10-26

AI Technical Summary

Technical Problem

The prior art has problems with efficiency and accuracy in spindle positioning, making it difficult to achieve efficient and accurate positioning.

Method used

By switching the control mode of the spindle servo driver to the speed control mode, searching for the zero point reference signal and latching position information, calculating the target position, and smoothly switching to the position control mode, planning the motion path, and controlling the spindle to the target position.

Benefits of technology

It achieves the effect of short positioning time, high efficiency, coherent and accurate positioning, achieving efficient and accurate positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115629571B_ABST
    Figure CN115629571B_ABST
Patent Text Reader

Abstract

The present invention relates to a control method for realizing efficient spindle positioning, comprising the following steps: switching the control mode of the spindle servo driver to the speed control mode; searching for the zero reference signal, and latching the encoder position information at the moment of the zero signal; calculating the target position; smoothly switching the control mode of the spindle servo driver to the position control mode, planning the motion path, and controlling the spindle to move to the target position; positioning to the target position according to the calculated target position, maintaining the position loop control mode, and outputting a positioning completion signal. The present invention also relates to a corresponding control device, processor, and storage medium for realizing efficient spindle positioning. The control method, device, processor, and computer-readable storage medium for realizing efficient spindle positioning of the present invention are adopted, and the positioning time is short, the efficiency is high, the positioning action is coherent, and the positioning is precise. The positioning method based on the spindle servo driver can achieve the effect of efficient and accurate positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of numerically controlled machine tools, in particular to the field of spindle positioning, and specifically refers to a control method, device, processor and computer-readable storage medium thereof for realizing efficient spindle positioning. Background Art

[0002] The spindle positioning function is that the upper controller sends a positioning command, and the spindle servo driver stops the spindle at a certain position and keeps the position locked through the spindle motor encoder and other sensor signals. The spindle positioning function is used in machining center tool change control, fine boring and rigid tapping and other occasions. The efficient and accurate spindle positioning function can effectively improve the processing efficiency. Summary of the invention

[0003] The purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a control method, device, processor and computer-readable storage medium thereof that can achieve efficient spindle positioning with high efficiency, accuracy and efficiency.

[0004] In order to achieve the above-mentioned object, the control method, device, processor and computer-readable storage medium for realizing efficient spindle positioning of the present invention are as follows:

[0005] The control method, device, processor and computer-readable storage medium for realizing efficient spindle positioning are mainly characterized in that the method comprises the following steps:

[0006] (1) Switch the control mode of the spindle servo drive to speed control mode;

[0007] (2) Searching for the zero reference signal and latching the encoder position information at the moment of the zero signal;

[0008] (3) Calculate the target position;

[0009] (4) smoothly switching the control mode of the spindle servo drive to the position control mode, planning the motion path, and controlling the spindle to move to the target position;

[0010] (5) According to the calculated target position, the spindle decelerates to zero and is positioned to the target position, the position loop control mode is maintained, and a positioning completion signal is output.

[0011] Preferably, the step (1) specifically comprises the following steps:

[0012] (1.1) The spindle servo driver receives the positioning command from the upper controller, switches the control mode of the spindle driver to the speed control mode, and sets the target speed to the positioning speed parameter setting value;

[0013] (1.2) Determine the spindle speed and positioning speed. If the spindle speed is higher than the positioning speed, the spindle is in a deceleration state; if the spindle speed is lower than the positioning speed, the spindle is in an acceleration state.

[0014] Preferably, the step (3) specifically comprises the following steps:

[0015] (3.1) Calculate the movement distance from the current speed to zero;

[0016] (3.2) Latch the current spindle position and calculate the current spindle mechanical angle;

[0017] (3.3) Calculate the mechanical angle after moving distance s from the current position;

[0018] (3.4) Calculate the position after moving distance s from the current position;

[0019] (3.5) Calculate the target position.

[0020] Preferably, the movement distance from the current speed to zero is calculated in step (3.1), specifically:

[0021] The movement distance from the current speed to zero is calculated according to the following formula:

[0022]

[0023] Among them, v is the current spindle speed, and a is the set deceleration parameter.

[0024] Preferably, the current spindle mechanical angle is calculated in step (3.2), specifically:

[0025] Calculate the current spindle mechanical angle according to the following formula:

[0026] θ1=Mod((p1-p0),SpindleLines);

[0027] Among them, Mod is the remainder algorithm, SpindleLines is the number of pulses for one spindle rotation, p1 is the current spindle position, and p0 is the encoder position information at the moment of the zero signal.

[0028] Preferably, the mechanical angle after moving a distance s from the current position is calculated in step (3.3), specifically:

[0029] The mechanical angle after moving distance s from the current position is calculated according to the following formula:

[0030] θ2=θ1+Mod(s, SpindleLines);

[0031] Among them, θ1 is the current spindle mechanical angle, Mod is the remainder algorithm, SpindleLines is the number of pulses for one spindle rotation, and s is the movement distance from the current speed to zero.

[0032] Preferably, the target position is calculated in step (3.5) as follows:

[0033] The target position is calculated according to the following formula:

[0034] p3=p2+(θ3-θ2);

[0035] Among them, θ3 is the target positioning angle, θ2 is the mechanical angle after moving a distance s from the current position, and p2 is the position after moving a distance s from the current position.

[0036] Preferably, the step (4) is specifically as follows:

[0037] The position speed command is calculated by the position command and the position loop gain, and the position command is multiplied by the speed feedforward gain and added to the position speed command to obtain the speed command output by the position loop;

[0038] The position command speed of the planned motion trajectory of the spindle servo driver is used as the dynamic limit value, and the speed command output by the position loop is dynamically limited by the dynamic limit value;

[0039] Switch the control mode of the spindle servo drive to the position control mode, plan the motion path, and control the spindle to move to the target position.

[0040] The main feature of the device for realizing efficient spindle positioning control is that the device comprises:

[0041] a processor configured to execute computer executable instructions;

[0042] The memory stores one or more computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the method for realizing efficient spindle positioning control are realized.

[0043] The main feature of the processor for realizing efficient spindle positioning control is that the processor is configured to execute computer executable instructions, and when the computer executable instructions are executed by the processor, the various steps of the above-mentioned method for realizing efficient spindle positioning control are realized.

[0044] The computer-readable storage medium has the main feature of storing a computer program thereon, and the computer program can be executed by a processor to implement the various steps of the above-mentioned method for achieving efficient spindle positioning control.

[0045] The control method, device, processor and computer-readable storage medium of the present invention for realizing efficient spindle positioning are adopted. The positioning time of the present invention is short, the efficiency is high, the positioning action is continuous and the positioning is precise. The positioning method of the present invention is based on the spindle servo driver to achieve the effect of efficient and accurate positioning. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a diagram of a positioning control method in which the spindle speed is greater than the positioning speed in the control method for realizing efficient spindle positioning of the present invention.

[0047] Figure 2 This is a diagram of a positioning control method in which the spindle speed is less than the positioning speed in the control method for realizing efficient spindle positioning of the present invention.

[0048] Figure 3 It is a positioning angle diagram of an embodiment of a control method for realizing efficient spindle positioning of the present invention.

[0049] Figure 4 It is a position control block diagram of the control method for realizing efficient spindle positioning of the present invention. DETAILED DESCRIPTION

[0050] In order to more clearly describe the technical content of the present invention, further description is given below in conjunction with specific embodiments.

[0051] The control method, device, processor and computer-readable storage medium for realizing efficient spindle positioning of the present invention include the following steps:

[0052] (1) Switch the control mode of the spindle servo drive to speed control mode;

[0053] (2) Searching for the zero reference signal and latching the encoder position information at the moment of the zero signal;

[0054] (3) Calculate the target position;

[0055] (4) smoothly switching the control mode of the spindle servo drive to the position control mode, planning the motion path, and controlling the spindle to move to the target position;

[0056] (5) According to the calculated target position, the spindle decelerates to zero and is positioned to the target position, the position loop control mode is maintained, and a positioning completion signal is output.

[0057] As a preferred embodiment of the present invention, the step (1) specifically comprises the following steps:

[0058] (1.1) The spindle servo driver receives the positioning command from the upper controller, switches the control mode of the spindle driver to the speed control mode, and sets the target speed to the positioning speed parameter setting value;

[0059] (1.2) Determine the spindle speed and positioning speed. If the spindle speed is higher than the positioning speed, the spindle is in a deceleration state; if the spindle speed is lower than the positioning speed, the spindle is in an acceleration state.

[0060] As a preferred embodiment of the present invention, the step (3) specifically comprises the following steps:

[0061] (3.1) Calculate the movement distance from the current speed to zero;

[0062] (3.2) Latch the current spindle position and calculate the current spindle mechanical angle;

[0063] (3.3) Calculate the mechanical angle after moving distance s from the current position;

[0064] (3.4) Calculate the position after moving distance s from the current position;

[0065] (3.5) Calculate the target position.

[0066] As a preferred embodiment of the present invention, the movement distance from the current speed to zero is calculated in step (3.1), specifically:

[0067] The movement distance from the current speed to zero is calculated according to the following formula:

[0068]

[0069] Among them, v is the current spindle speed, and a is the set deceleration parameter.

[0070] As a preferred embodiment of the present invention, the current spindle mechanical angle is calculated in step (3.2), specifically:

[0071] Calculate the current spindle mechanical angle according to the following formula:

[0072] θ1=Mod((p1-p0),SpindleLines);

[0073] Among them, Mod is the remainder algorithm, SpindleLines is the number of pulses for one spindle rotation, p1 is the current spindle position, and p0 is the encoder position information at the moment of the zero signal.

[0074] As a preferred embodiment of the present invention, the mechanical angle after moving a distance s from the current position in step (3.3) is calculated as follows:

[0075] The mechanical angle after moving distance s from the current position is calculated according to the following formula:

[0076] θ2=θ1+Mod(s, SpindleLines);

[0077] Among them, θ1 is the current spindle mechanical angle, Mod is the remainder algorithm, SpindleLines is the number of pulses for one spindle rotation, and s is the movement distance from the current speed to zero.

[0078] As a preferred embodiment of the present invention, the target position is calculated in step (3.5), specifically:

[0079] The target position is calculated according to the following formula:

[0080] p3=p2+(θ3-θ2);

[0081] Among them, θ3 is the target positioning angle, θ2 is the mechanical angle after moving a distance s from the current position, and p2 is the position after moving a distance s from the current position.

[0082] As a preferred embodiment of the present invention, the step (4) is specifically as follows:

[0083] The position speed command is calculated by the position command and the position loop gain, and the position command is multiplied by the speed feedforward gain and added to the position speed command to obtain the speed command output by the position loop;

[0084] The position command speed of the planned motion trajectory of the spindle servo driver is used as the dynamic limit value, and the speed command output by the position loop is dynamically limited by the dynamic limit value;

[0085] Switch the control mode of the spindle servo drive to the position control mode, plan the motion path, and control the spindle to move to the target position.

[0086] The device for realizing efficient spindle positioning control of the present invention, wherein the device comprises:

[0087] a processor configured to execute computer executable instructions;

[0088] The memory stores one or more computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the method for realizing efficient spindle positioning control are realized.

[0089] The processor of the present invention is used to realize the control of efficient spindle positioning, wherein the processor is configured to execute computer executable instructions, and when the computer executable instructions are executed by the processor, the various steps of the above-mentioned method for realizing the control of efficient spindle positioning are realized.

[0090] The computer-readable storage medium of the present invention stores a computer program thereon, and the computer program can be executed by a processor to implement the various steps of the above-mentioned method for achieving efficient spindle positioning control.

[0091] In a specific implementation manner of the present invention, a control technology for spindle positioning is involved, and a complete spindle positioning control technology solution is provided.

[0092] The present invention discloses the technical content of how to plan the motion trajectory so that the spindle can efficiently move to the target positioning angle. The present invention has continuous action. When the spindle receives the positioning instruction during high-speed motion, the spindle decelerates to zero speed, that is, it is positioned at the target angle; there is no need to decelerate to zero speed first and then perform the positioning motion action. The present invention also discloses the technical content of how to smoothly switch between the speed mode and the position mode to ensure that the spindle speed does not jump during the control mode switching process.

[0093] The purpose of the present invention is achieved by the following measures:

[0094] Step 1: Switch the control mode of the spindle servo driver to speed control mode;

[0095] Step 2: Search for the zero reference signal and latch the position information;

[0096] Step 3: Calculate the target position;

[0097] Step 4: The control mode of the spindle servo drive is smoothly switched to the position control mode, the motion path is planned, and the spindle is controlled to move to the target position;

[0098] Step 5: The spindle stops at the target position and outputs a positioning completion signal.

[0099] The present invention takes the main shaft mechanical transmission ratio of 1:1 as an example, combined with Figures 1 to 3 , describe the specific implementation method:

[0100] Step 1: Switch the control mode of the spindle servo driver to speed control mode;

[0101] After the spindle servo driver receives the positioning command from the host controller, no matter what control mode the spindle driver is in, it switches to the speed control mode, and the target speed is the positioning speed parameter setting value. Figure 1 As shown in the figure, the spindle speed is higher than the positioning speed, and the spindle is in a deceleration state; Figure 2 As shown, the spindle speed is lower than the positioning speed, and the spindle is in an accelerated state. Figure 1 For example.

[0102] Step 2: Search for the reference zero signal and latch the position information;

[0103] like Figure 1 As shown in the figure, when the spindle speed reaches the positioning speed, it starts to search for the zero reference signal and latches the encoder position information p0 at the moment of the zero signal. The zero reference signal is the encoder Z signal or the external photoelectric switch signal. The zero signal appears once every time the spindle rotates one circle, which is the starting reference point of the positioning angle.

[0104] Step 3: Calculate the target position;

[0105] like Figure 3 As shown, calculate the movement distance s from the current spindle speed to deceleration to zero:

[0106]

[0107] Among them, v is the current spindle speed, and a is the set deceleration parameter.

[0108] Latch the current spindle position p1 and calculate the current spindle mechanical angle θ1:

[0109] θ1=Mod((p1-p0),SpindleLines);

[0110] Mod is the modulus algorithm; SpindleLines is the number of pulses for one rotation of the spindle.

[0111] The mechanical angle θ2 after moving a distance s from the current position:

[0112] θ2=θ1+Mod(s, SpindleLines);

[0113] The position p2 after moving distance s from the current position:

[0114] p2=p1+s;

[0115] Assuming θ3 is the target positioning angle, calculate the target position p3:

[0116] p3=p2+(θ3-θ2);

[0117] θ1~θ3 are all spindle encoder units, with the zero point signal as reference, and the value range is 0~SpindleLines-1. The angle value at the zero point reference signal is 0.

[0118] Step 4: The control mode of the spindle servo drive is smoothly switched to the position control mode, the motion path is planned, and the spindle is controlled to move to the target position.

[0119] During the spindle movement, the control mode of the spindle servo drive is smoothly switched to the position control mode, and there is no speed jump during the switching process. Figure 4As shown, the speed feedforward gain is set to 100%, and the speed command output by the position loop is dynamically limited.

[0120] Among them, speed feedforward means that the position speed command is calculated by the position command, and the value multiplied by the speed feedforward gain is added to the speed command output by the position control;

[0121] The dynamic limit value is the position command speed of the spindle servo driver's planned motion trajectory. Its initial value is the current spindle speed, and the target speed is the positioning speed.

[0122] During the spindle movement, if the speed control mode is switched directly to the position control mode, the speed command will inevitably jump and cause spindle vibration. After the above processing, the speed command is switched smoothly and the spindle runs smoothly.

[0123] Step 5: The spindle stops at the target position and outputs a positioning completion signal;

[0124] According to the target position calculated in step 4, when the spindle decelerates to zero, it is positioned to the target position; the position loop control mode is maintained, and a positioning completion signal is output.

[0125] The mechanical transmission ratio of the spindle in the embodiment of the present invention is 1:1, and the present invention is applicable to any other mechanical transmission ratio.

[0126] The specific implementation scheme of this embodiment can refer to the relevant description in the above embodiment, which will not be repeated here.

[0127] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0128] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" refers to at least two.

[0129] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0130] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution device. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0131] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the corresponding program may be stored in a computer-readable storage medium, which, when executed, includes one of the steps of the method embodiment or a combination thereof.

[0132] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0133] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0134] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0135] The control method, device, processor and computer-readable storage medium of the present invention for realizing efficient spindle positioning are adopted. The positioning time of the present invention is short, the efficiency is high, the positioning action is continuous and the positioning is precise. The positioning method of the present invention is based on the spindle servo driver to achieve the effect of efficient and accurate positioning.

[0136] In this specification, the present invention has been described with reference to specific embodiments thereof. However, it is apparent that various modifications and variations may be made without departing from the spirit and scope of the present invention. Therefore, the specification and drawings should be regarded as illustrative rather than restrictive.

Claims

1. A control method for realizing efficient spindle positioning, characterized in that: The method comprises the following steps: (1) Switch the control mode of the spindle servo drive to speed control mode; (2) Searching for the zero reference signal and latching the encoder position information at the moment of the zero signal; (3) Calculate the target position; (4) smoothly switching the control mode of the spindle servo drive to the position control mode, planning the motion path, and controlling the spindle to move to the target position; (5) According to the calculated target position, the spindle decelerates to zero, that is, it is positioned to the target position, the position loop control mode is maintained, and a positioning completion signal is output; The step (3) specifically comprises the following steps: (3.1) Calculate the movement distance from the current speed to zero; (3.2) Latch the current spindle position and calculate the current spindle mechanical angle; (3.3) Calculate the mechanical angle after moving distance s from the current position; (3.4) Calculate the position after moving distance s from the current position; (3.5) Calculate the target position; The step (4) is specifically as follows: The position speed command is calculated by the position command and the position loop gain, and the position command is multiplied by the speed feedforward gain and added to the position speed command to obtain the speed command output by the position loop; The position command speed of the planned motion trajectory of the spindle servo driver is used as the dynamic limit value, and the speed command output by the position loop is dynamically limited by the dynamic limit value; Switch the control mode of the spindle servo drive to the position control mode, plan the motion path, and control the spindle to move to the target position; The current spindle mechanical angle is calculated in step (3.2), specifically: Calculate the current spindle mechanical angle according to the following formula: θ1=Mod((p1-p0),SpindleLines); Among them, Mod is the remainder algorithm, SpindleLines is the number of pulses for one spindle rotation, p1 is the current spindle position, and p0 is the encoder position information at the zero signal moment; The mechanical angle after moving a distance s from the current position in step (3.3) is calculated as follows: The mechanical angle after moving distance s from the current position is calculated according to the following formula: θ2=θ1+Mod(s, SpindleLines); Among them, θ1 is the current spindle mechanical angle, Mod is the modulus algorithm, SpindleLines is the number of pulses for one spindle rotation, and s is the movement distance from the current speed to zero; The target position is calculated in step (3.5), specifically: The target position is calculated according to the following formula: p3=p2+(θ3-θ2); Among them, θ3 is the target positioning angle, θ2 is the mechanical angle after moving a distance s from the current position, and p2 is the position after moving a distance s from the current position; θ1~θ3 are all spindle encoder units, with the zero point signal as reference, and the value range is 0~SpindleLines-1. The angle value at the zero point reference signal is 0.

2. The control method for realizing efficient spindle positioning according to claim 1, characterized in that: The step (1) specifically comprises the following steps: (1.1) The spindle servo driver receives the positioning command from the upper controller, switches the control mode of the spindle driver to the speed control mode, and sets the target speed to the positioning speed parameter setting value; (1.2) Determine the spindle speed and positioning speed. If the spindle speed is higher than the positioning speed, the spindle is in a deceleration state; if the spindle speed is lower than the positioning speed, the spindle is in an acceleration state.

3. The control method for realizing efficient spindle positioning according to claim 1, characterized in that: The calculation of the movement distance from the current speed to zero in step (3.1) is specifically: The movement distance from the current speed to zero is calculated according to the following formula: Among them, v is the current spindle speed, and a is the set deceleration parameter.

4. A device for achieving efficient spindle positioning control, characterized in that: The device comprises: a processor configured to execute computer-executable instructions; A memory stores one or more computer executable instructions, and when the computer executable instructions are executed by the processor, the various steps of the control method for realizing efficient spindle positioning described in any one of claims 1 to 3 are implemented.

5. A processor for realizing efficient spindle positioning control, characterized in that: The processor is configured to execute computer executable instructions. When the computer executable instructions are executed by the processor, the various steps of the control method for realizing efficient spindle positioning described in any one of claims 1 to 3 are implemented.

6. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program can be executed by a processor to implement the various steps of the control method for realizing efficient spindle positioning according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • High-precision and high-dynamic-response accurate stop control method for main shaft of servo motor

    CN113206627A