Full-pulse control method for servo main shaft in numerical control system
By adopting the full pulse control method of servo spindle in the CNC system, the problems of inconvenient operation and inefficiency of traditional CNC machine tools are solved, and the effects of simplifying operation, simplifying programming and improving machining efficiency are achieved.
Patent Information
- Application Number
- CN202510000179.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-04-15
AI Technical Summary
Traditional CNC machine tools have problems such as inconvenient operation and inefficiency in spindle position and speed switching operations, especially in the process of high-speed rotation and precise positioning, which leads to complex and inefficient manual operation.
The full pulse control method of the servo spindle in the CNC system is adopted, and the position and state switching process is performed by reading the feedback data of the spindle encoder, and pulse control is realized in manual and automatic modes, ensuring that the spindle switches to the lower-enabled state after stopping movement, and coordinate calibration is performed to achieve full pulse control.
The manual operation and programming process is simplified, the machining efficiency is improved, the time required for position and speed switching is reduced, and the need for efficient machining is met. Especially in the rapid machining of turning workpieces, the machining time can be adjusted to more than ten seconds or less.
Smart Images

Figure CN119828601A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of numerical control systems, and in particular to a full-pulse control method for a servo spindle in a numerical control system. Background Art
[0002] Spindle control is an essential part of CNC machine tool processing. The spindle drives the workpiece to rotate, the pallet moves, and the tool performs cutting on the workpiece surface.
[0003] During the processing of a workpiece, the spindle may rotate forward, reverse, stop, rotate at high speed, rotate at low speed, quickly position, position slowly and precisely, and the spindle may be linked with other axes for processing, such as thread processing, tapping operation, and turning processing.
[0004] In the traditional working mode, the spindle position and speed switching operations are required to complete the cutting action under high-speed rotation and the precise positioning in the position mode. This mode completes the mode switching by switching the position mode and speed mode separately. In the existing mode, during manual operation, the position mode and speed mode need to be operated separately by switching buttons. When the operation sequence is wrong, the system will have an alarm, and the alarm information needs to be switched and reset to eliminate it before re-operation, which is very inconvenient and inefficient.
[0005] Based on this, it is necessary to propose a solution to overcome the defects of the current existing technology. Summary of the invention
[0006] The purpose of the present invention is to overcome the above-mentioned shortcomings of the prior art and provide a full pulse control method for a servo spindle in a numerical control system.
[0007] In order to achieve the above object, the full pulse control method of the servo spindle in the numerical control system of the present invention is as follows:
[0008] The full pulse control method of the servo spindle in the numerical control system has the following main features:
[0009] (1) After the machine tool is powered on, the CNC system reads the spindle encoder feedback data and performs spindle position and state switching processing;
[0010] (2) The CNC system enters the manual / handwheel mode and performs pulse control processing in this mode;
[0011] (3) The CNC system enters the automatic / MDI mode and performs pulse control processing in this mode;
[0012] (4) Execute the above operations. After detecting and confirming that the spindle has stopped moving, the spindle is switched to the lower enabling state, and the spindle encoder feedback data is read to calibrate the spindle coordinates, thereby realizing full pulse control.
[0013] Preferably, the step (1) is specifically as follows:
[0014] After the machine tool is powered on, the CNC system reads the spindle encoder feedback data, calculates the current spindle coordinates, switches the current spindle mode to the position mode, and switches the spindle state to the down enable state.
[0015] Preferably, when the spindle is in a lower enabled state, the spindle coordinates are calibrated by feedback data from the spindle encoder.
[0016] Preferably, the step (2) is specifically as follows:
[0017] The CNC system enters the manual / handwheel mode, and the program starts. When the spindle is driven to move, if the spindle is in the upper enabled state, the spindle moves directly through pulse output; if the spindle is in the lower enabled state, the spindle is first enabled and then moves through pulse output; when the spindle movement drive is completed, wait for a certain time delay, and when it is confirmed that the spindle has stopped moving, the spindle is switched to the lower enabled state.
[0018] Preferably, the step (3) is specifically as follows:
[0019] The CNC system enters the automatic / MDI mode and the program starts. When the execution instruction is not related to the spindle movement, the spindle does not respond and the program executes normally. When the execution instruction is related to the spindle movement, if the spindle is currently in the up enable state, the spindle moves normally according to the pulse output. If the spindle is currently in the down enable state, it is first switched to the up enable state and then moves normally according to the pulse output.
[0020] Preferably, the step (4) is specifically as follows:
[0021] When the automatic / MDI mode program is executed or a reset or emergency stop operation is performed, if it is detected and confirmed that the spindle has stopped moving, the spindle is switched to the lower enabling state, and the spindle encoder feedback data is read at the same time to calibrate the spindle coordinates.
[0022] Preferably, the single-turn value and multi-turn value data fed back by the spindle encoder are used to calculate the spindle coordinate position after the machine tool is turned on.
[0023] Preferably, the numerical control system controls the rotation of the spindle through the position mode.
[0024] The full pulse control method of the servo spindle in the numerical control system of the present invention is adopted. Through the full pulse mode of the spindle, the spindle function control mode is changed, which can simplify manual operation, simplify programming, and improve processing efficiency. In the new mode, the system will perform conversion processing inside, and automatically convert the mode after the button is triggered, which is convenient for operation and improves efficiency. At the same time, the programming method is also simplified, eliminating some special instructions, and can directly perform positioning, rotation and other operations without considering waiting. Program programming is convenient. Its work efficiency is improved, and position and speed switching usually means additional operations such as waiting, delay, and zero return. In the case where the existing processing efficiency requirements are getting higher and higher, the processing of a turning workpiece can be adjusted to more than ten seconds or less than ten seconds. These delays will lead to low efficiency and cannot meet on-site needs. The technical solution can meet this requirement and has certain practical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 The present invention is a flow chart of the full pulse action processing of the full pulse control method of the servo spindle in the numerical control system. DETAILED DESCRIPTION
[0026] In order to more clearly describe the technical content of the present invention, further description is given below in conjunction with specific embodiments.
[0027] Before describing in detail embodiments according to the present invention, it should be noted that, hereinafter, the terms "comprises", "includes" or any other variations are intended to cover non-exclusive inclusion, whereby a process, method, article or apparatus comprising a series of elements includes not only these elements, but also other elements not explicitly listed or inherent to such process, method, article or apparatus.
[0028] See also Figure 1 As shown, the full pulse control method of the servo spindle in the numerical control system, wherein the method comprises the following steps:
[0029] (1) After the machine tool is powered on, the CNC system reads the spindle encoder feedback data and performs spindle position and state switching processing;
[0030] (2) The CNC system enters the manual / handwheel mode and performs pulse control processing in this mode;
[0031] (3) The CNC system enters the automatic / MDI mode and performs pulse control processing in this mode;
[0032] (4) Execute the above operations. After detecting and confirming that the spindle has stopped moving, the spindle is switched to the lower enabling state, and the spindle encoder feedback data is read to calibrate the spindle coordinates, thereby realizing full pulse control.
[0033] As a preferred embodiment of the present invention, the step (1) is specifically:
[0034] After the machine tool is powered on, the CNC system reads the spindle encoder feedback data, calculates the current spindle coordinates, switches the current spindle mode to the position mode, and switches the spindle state to the down enable state.
[0035] As a preferred embodiment of the present invention, when the spindle is in the lower enabled state, the spindle coordinates are calibrated by the spindle encoder feedback data.
[0036] As a preferred embodiment of the present invention, the step (2) is specifically as follows:
[0037] The CNC system enters the manual / handwheel mode, and the program starts. When the spindle is driven to move, if the spindle is in the upper enabled state, the spindle moves directly through pulse output; if the spindle is in the lower enabled state, the spindle is first enabled and then moves through pulse output; when the spindle movement drive is completed, wait for a certain time delay, and when it is confirmed that the spindle has stopped moving, the spindle is switched to the lower enabled state.
[0038] As a preferred embodiment of the present invention, the step (3) is specifically as follows:
[0039] The CNC system enters the automatic / MDI mode and the program starts. When the execution instruction is not related to the spindle movement, the spindle does not respond and the program executes normally. When the execution instruction is related to the spindle movement, if the spindle is currently in the up enable state, the spindle moves normally according to the pulse output. If the spindle is currently in the down enable state, it is first switched to the up enable state and then moves normally according to the pulse output.
[0040] As a preferred embodiment of the present invention, the step (4) is specifically as follows:
[0041] When the automatic / MDI mode program is executed or a reset or emergency stop operation is performed, if it is detected and confirmed that the spindle has stopped moving, the spindle is switched to the lower enabling state, and the spindle encoder feedback data is read at the same time to calibrate the spindle coordinates.
[0042] As a preferred embodiment of the present invention, the single-turn value and multi-turn value data fed back by the spindle encoder are used to calculate the spindle coordinate position after the machine tool is turned on.
[0043] As a preferred embodiment of the present invention, the numerical control system controls the rotation of the spindle through the position mode.
[0044] The following will further explain in detail how to implement each function of this technical solution:
[0045] 1. After powering on, enable the spindle and enter position control mode. If it is a bus spindle with a single-turn encoder, obtain the current position. In other cases, set the current position as 0.
[0046] 2. When the spindle rotates forward or reverse, the spindle controls its rotation through pulse output.
[0047] 3. After the spindle stops, you can enter the position control mode and directly locate the spindle position.
[0048] 4. Reset, program execution, etc., and then enable. Before enabling, check whether the spindle has stopped. At this time, the minimum speed detection value needs to be set by parameters to prevent the spindle from swinging left and right after stopping when the rigidity is too large. The system thinks that the spindle has not stopped. After enabling, you can turn the spindle by hand to facilitate the loading and unloading of workpieces. Enable again when processing again.
[0049] 5. After power-on, the C-axis must be able to move without an alarm when moved manually / with the handwheel. If the coordinates are incorrect, a prompt will be given.
[0050] 6. In manual / handwheel mode, the C axis will not be enabled when the X / Z axis is moved by manual buttons and handwheel movement. The C axis will only be enabled when the C axis is moved manually or by handwheel. However, in manual / handwheel mode, the C axis will be enabled when the X / Z axis is moved by command execution (press cycle start).
[0051] 7. Under the vehicle command function, the operation logic of the four commands G48 / G68 / full pulse G250 / non-full pulse G250 is as follows:
[0052] a. G68 is the vehicle synchronization command in the C-axis position mode, where the C-axis rotates following the Y / A axis. In the position mode, the number of pulses that the C-axis needs to send in the current cycle = the number of pulses that the Y / A axis needs to send in the current cycle * ratio.
[0053] b. The G48 instruction is the vehicle synchronization instruction in the C-axis speed mode, in which the Y / A axis rotates with the C-axis with an angle offset. The Y / A axis will move after detecting the C-axis zero signal. Before the speed reaches the set speed, the number of pulses that the Y / A axis needs to send in the current cycle = the number of pulses in the previous cycle fed back by the C-axis encoder * ratio. After reaching the set speed, the number of pulses that the Y / A axis needs to send in the current cycle = the C-axis encoder feedback speed x ratio.
[0054] c. Non-full pulse G250 is the same as G48 instruction, but the programming instruction format is different. After modification, it is G250 PQR, where R is C-axis positioning.
[0055] d. Full pulse G250 instruction, the instruction format is the same as non-full pulse G250, the difference is that after the C-axis zero point is detected until the Y / A-axis speed accelerates to the set speed, the number of pulses that the Y / A-axis needs to send in the current cycle = the number of pulses sent by the C-axis in the current cycle * ratio, and the speed reaches the set value.
[0056] This method can realize full pulse control of the spindle, reduce the time required for the spindle to frequently switch between speed mode and position mode during processing, improve processing efficiency, and will not affect the user's processing and loading and unloading operations.
[0057] By combining the newly added machining instruction G250, the machining efficiency of workpieces can be greatly improved.
[0058] The G250 instruction is a full-pulse turning control instruction. The turning function is realized by rotating the Y / A axis following the C axis. Taking the Y-axis following as an example, the spindle is in the rotating state before the instruction is executed. When the instruction starts to execute, the Y-axis starts to run. The number of pulses required to be sent in its cycle = the number of pulses required to be sent in the current cycle of the C-axis * the ratio. During the acceleration of the Y-axis, the actual number of pulses sent is calculated according to the number of pulses sent and the acceleration. When the acceleration is completed, the actual number of pulses sent in its cycle = the number of pulses required to be sent in the current cycle of the C-axis * the ratio. At this time, the actual cutting of the workpiece for turning processing begins.
[0059] After processing, execute G251 command to cancel Y / A axis following.
[0060] The G250 command format is G250 P_Q_R_; where P is the number of cutters, Q is the number of squares, and R is the offset angle.
[0061] The G251 command format is: G251.
[0062] In actual application, after the spindle is enabled, it can be manually rotated to clamp the workpiece, and after being enabled, it is in position control state.
[0063] The full pulse G250 instruction is modified to cancel the first step of positioning Y0 when executing the G250 instruction. R is changed to the absolute position of Y-axis positioning. When R is not programmed, when the G250 instruction is executed, Y turns directly when the C-axis zero point is detected, and the second cut is not considered at this time. When R is programmed, when the G250 instruction is executed, Y turns directly when the C-axis zero point is detected, and then the coordinates of Y that need to be offset are calculated based on the coordinates of the Y axis before executing G250 and the coordinates of R to complete the angle offset. For example, if Y=45 before executing G250, and G250R180 is executed, it needs to be deflected 180-48=135.
[0064] The G250 command format is G250 P_Q_R; where P is the number of tools, Q is the number of squares, and R is the offset angle. Taking the Y axis as the following axis as an example, when executing, the Y axis first locates to the position specified by R. Then the Y axis rotates until the Y axis speed reaches the following spindle speed * ratio. The ratio is calculated from the values of P and Q. Before executing G251 to cancel the following, the Y axis continues to rotate with the spindle.
[0065] The M05 instruction in the file input is enabled after execution, and the M05 instruction in the compound instruction does not consider the enable operation. Add a flag judgment in the structure of the M instruction.
[0066] When all compound instructions including C-axis movement instructions start decoding, a re-decoding judgment flag is added to determine whether enabling and re-decoding are required during interpolation, and the flag is added to the syntax structure and interpolation structure.
[0067] The system re-decodes the judgment after reading the next segment of data in the interpolation task. When the re-decode judgment flag is valid and there are instructions such as G68 that move the C-axis position, and there are C-axis movements in G00 and G01 instructions, if the current C-axis is in the down-enabled state, it will be enabled first and then re-decoded from the current line.
[0068] Compound instructions mean that one instruction will be decoded into multiple instructions during decoding. For example, to write a document, you need to create a document, write a file, and save the document. When writing instructions, there is only one write document instruction, but when decoding, three instructions will be executed.
[0069] When the drive coordinate value is invalid during startup, the invalid coordinate prompt is triggered when executing the C-axis position command.
[0070] When M05 of program MDI is executed, the enabling operation is executed.
[0071] When M03 and M04 are executed, if the execution is in the lower enable state, the upper enable state will be executed and the code will be re-decoded from the current line.
[0072] The M03 / M04 / M05 instructions are spindle forward / reverse / stop instructions in spindle speed mode, and here are spindle forward / reverse / stop instructions in position mode. It is understood that when the position movement instruction is supported, if it is in the down-enable state, it will be enabled and the tool path coordinate movement will be replanned according to the latest coordinates.
[0073] Supports enabling after the program is finished and reset in automatic mode. (Both program interface MDI and non-program interface MDI modes do not support enabling after the program is finished).
[0074] 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.
[0075] It should be understood that each part of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution device.
[0076] A person of ordinary skill in the art may understand that all or part of the steps of the method for implementing the above-mentioned embodiment may be completed by instructing the relevant hardware through a program, and the 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.
[0077] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0078] In the description of this specification, the description with reference to the terms "an embodiment", "some embodiments", "example", "specific example", or "embodiment" 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.
[0079] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
[0080] The full pulse control method of the servo spindle in the numerical control system of the present invention is adopted. Through the full pulse mode of the spindle, the spindle function control mode is changed, which can simplify manual operation, simplify programming, and improve processing efficiency. In the new mode, the system will perform conversion processing inside, and automatically convert the mode after the button is triggered, which is convenient for operation and improves efficiency. At the same time, the programming method is also simplified, eliminating some special instructions, and can directly perform positioning, rotation and other operations without considering waiting. Program programming is convenient. Its work efficiency is improved, and position and speed switching usually means additional operations such as waiting, delay, and zero return. In the case where the existing processing efficiency requirements are getting higher and higher, the processing of a turning workpiece can be adjusted to more than ten seconds or less than ten seconds. These delays will lead to low efficiency and cannot meet on-site needs. The technical solution can meet this requirement and has certain practical value.
[0081] 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 full pulse control method for a servo spindle in a numerical control system, characterized in that: The method comprises the following steps: (1) After the machine tool is powered on, the CNC system reads the spindle encoder feedback data and performs spindle position and state switching processing; (2) The CNC system enters the manual / handwheel mode and performs pulse control processing in this mode; (3) The CNC system enters the automatic / MDI mode and performs pulse control processing in this mode; (4) Execute the above operations. After detecting and confirming that the spindle has stopped moving, the spindle is switched to the lower enabling state, and the spindle encoder feedback data is read to calibrate the spindle coordinates, thereby realizing full pulse control.
2. The full pulse control method of the servo spindle in the numerical control system according to claim 1 is characterized in that: The step (1) is specifically as follows: After the machine tool is powered on, the CNC system reads the spindle encoder feedback data, calculates the current spindle coordinates, switches the current spindle mode to the position mode, and switches the spindle state to the down enable state.
3. The full pulse control method of the servo spindle in the numerical control system according to claim 2 is characterized in that: When the spindle is in the lower enabled state, the spindle coordinates are calibrated through the spindle encoder feedback data.
4. The full pulse control method of the servo spindle in the numerical control system according to claim 2 is characterized in that: The step (2) is specifically as follows: The CNC system enters the manual / handwheel mode, and the program starts. When the spindle is driven to move, if the spindle is in the upper enabled state, the spindle moves directly through pulse output; if the spindle is in the lower enabled state, the spindle is first enabled and then moves through pulse output; when the spindle movement drive is completed, wait for a certain time delay, and when it is confirmed that the spindle has stopped moving, the spindle is switched to the lower enabled state.
5. The full pulse control method of the servo spindle in the numerical control system according to claim 2, characterized in that: The step (3) is specifically as follows: The CNC system enters the automatic / MDI mode and the program starts. When the execution instruction is not related to the spindle movement, the spindle does not respond and the program executes normally. When the execution instruction is related to the spindle movement, if the spindle is currently in the up enable state, the spindle moves normally according to the pulse output. If the spindle is currently in the down enable state, it is first switched to the up enable state and then moves normally according to the pulse output.
6. The full pulse control method of the servo spindle in the numerical control system according to claim 5, characterized in that: The step (4) is specifically as follows: When the automatic / MDI mode program is executed or a reset or emergency stop operation is performed, if it is detected and confirmed that the spindle has stopped moving, the spindle is switched to the lower enabling state, and the spindle encoder feedback data is read at the same time to calibrate the spindle coordinates.
7. The full pulse control method of the servo spindle in the numerical control system according to claim 2, characterized in that: The single-turn value and multi-turn value data fed back by the spindle encoder are used to calculate the spindle coordinate position after the tool machine is turned on.
8. The full pulse control method of the servo spindle in the numerical control system according to claim 2, characterized in that: The numerical control system controls the rotation of the spindle through the position mode.