Numerical control machine tool and rigid tapping control method, device and storage medium thereof

By using a master-slave coupling control method, the feed rate is adjusted using encoder data from the spindle motor and the Z-axis motor, which solves the problem of poor synchronization between the spindle motor and the Z-axis motor of the CNC machine tool, improves tapping accuracy and reduces depth error.

CN116586698BActive Publication Date: 2026-02-24GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310516081.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-09
Publication Date
2026-02-24
Estimated Expiration
2043-05-09

AI Technical Summary

Technical Problem

Due to poor synchronization between the spindle motor and the Z-axis motor of the CNC machine tool, the Z-axis motor has low accuracy in following the spindle motor's movement, resulting in a large tapping depth error.

Method used

A master-slave coupling control method is adopted. By acquiring encoder data from the spindle motor and Z-axis motor, the feed rate of the spindle motor and Z-axis motor is adjusted in real time. This master-slave coupling control method improves the synchronization between the spindle motor and Z-axis motor.

Benefits of technology

It improves the accuracy of the Z-axis motor in following the spindle motor's movement and reduces tapping depth error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116586698B_ABST
    Figure CN116586698B_ABST
Patent Text Reader

Abstract

The application discloses a rigid tapping control method and device of a numerical control machine tool, the numerical control machine tool and a storage medium, and the method comprises the following steps: based on the starting angle of tapping of a tap of the numerical control machine tool, the encoder data of a spindle motor and the encoder data of a Z-axis motor are acquired, the forward movement process of the spindle motor driving the Z-axis motor is controlled by master-slave coupling control, the spindle motor drives the Z-axis motor to move forward to perform rigid tapping; after the Z-axis motor reaches the set tapping depth and the spindle motor and the Z-axis motor are both stopped, the encoder data of the spindle motor and the encoder data of the Z-axis motor are acquired again, the reverse movement process of the spindle motor driving the Z-axis motor is controlled by master-slave coupling control, and the spindle motor drives the Z-axis motor to move reversely to perform tapping exit. According to the scheme, the rotation amount of the spindle motor and the feeding amount of the Z-axis motor are determined by using the master-slave coupling control method when tapping and tapping exit, and the master-slave synchronization is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of CNC machine tool technology, specifically relating to a rigid tapping control method, device, CNC machine tool, and storage medium for CNC machine tools, and particularly to a rigid tapping master-slave coupling control method, device, CNC machine tool, and storage medium for CNC machine tools. Background Technology

[0002] Tapping refers to using a certain torque to screw a tap into a hole to be drilled to create an internal thread. Rigid tapping, also known as synchronous feed tapping, involves mounting the tap on the spindle of a CNC machine tool. Through the coordination between the Z-axis and the spindle motor, the tap is positioned on the workpiece's machining coordinates. The tap is then driven into the workpiece, and once it reaches the tapping position, the tap is unscrewed by the reverse movement of the Z-axis and the spindle motor, leaving an internal thread on the workpiece. However, due to poor synchronization between the spindle motor and the Z-axis motor during tapping, the accuracy of the Z-axis motor following the spindle motor's movement is low, and the tapping depth error is large.

[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The purpose of this invention is to provide a rigid tapping control method, device, CNC machine tool, and storage medium for CNC machine tools. This addresses the problem of low accuracy in the Z-axis motor following the spindle motor and large tapping depth error during rigid tapping using a CNC machine tool, caused by poor synchronization between the spindle motor and Z-axis motor. The invention achieves this by employing a master-slave coupling control method to determine the spindle motor's rotation and Z-axis motor's feed rate during both tapping and tapping exit. This improves the synchronization between the spindle motor and Z-axis motor, thereby increasing the accuracy of the Z-axis motor following the spindle motor and reducing the tapping depth error.

[0005] This invention provides a rigid tapping control method for a CNC machine tool, wherein the CNC machine tool has a spindle motor and a Z-axis motor; the rigid tapping control method for the CNC machine tool includes: when rigid tapping of a workpiece is required, controlling the spindle motor to drive the Z-axis motor to reach a set R-plane, and determining the tap machining start angle of the CNC machine tool; after the spindle motor drives the Z-axis motor to reach the set R-plane, when it is necessary to control the spindle motor to drive the Z-axis motor to move forward for rigid tapping, acquiring encoder data of the spindle motor and encoder data of the Z-axis motor; based on the tap machining start angle of the CNC machine tool, controlling the spindle motor to drive the Z-axis motor to move forward for rigid tapping; during the process of controlling the spindle motor to drive the Z-axis motor to move forward for rigid tapping, according to the acquired encoder data of the spindle motor and... The encoder data of the Z-axis motor is used to perform master-slave coupling control on the forward motion process of the spindle motor driving the Z-axis motor. When the spindle motor drives the Z-axis motor to perform rigid tapping to the set tapping depth, if it is necessary to control the spindle motor to drive the Z-axis motor to reverse and exit the tapping process, the encoder data of the spindle motor and the Z-axis motor are acquired again. After the Z-axis motor reaches the set tapping depth and both the spindle motor and the Z-axis motor stop, the spindle motor is controlled to drive the Z-axis motor to reverse and exit the tapping process. During the process of controlling the spindle motor to drive the Z-axis motor to reverse and exit the tapping process, the master-slave coupling control is performed on the reverse motion process of the spindle motor driving the Z-axis motor based on the newly acquired encoder data of the spindle motor and the Z-axis motor.

[0006] In some embodiments, when rigid tapping is required on a workpiece to be tapped, controlling the spindle motor to drive the Z-axis motor to reach a set R-plane and determining the tapping start angle of the CNC machine tool includes: upon receiving a tapping command for tapping the workpiece to be tapped, determining the set tapping information carried by the tapping command; the set tapping information includes: the set speed of the spindle motor, the feed speed of the Z-axis motor, the set tapping depth, and the set R-plane; based on the set speed of the spindle motor and the feed speed of the Z-axis motor, controlling the spindle motor to drive the Z-axis motor to reach the set R-plane; after the Z-axis motor reaches the set R-plane and both the spindle motor and the Z-axis motor stop, orienting the spindle motor to determine the tapping start angle of the CNC machine tool, so as to control the spindle motor to drive the Z-axis motor to move forward for rigid tapping based on the tapping start angle of the CNC machine tool.

[0007] In some embodiments, during the process of controlling the spindle motor to drive the Z-axis motor in forward motion for rigid tapping, master-slave coupling control is performed on the forward motion process of the spindle motor driving the Z-axis motor based on the acquired encoder data of the spindle motor and the Z-axis motor. This includes: determining the total distance the spindle motor needs to move when driving the Z-axis motor in forward motion for rigid tapping based on the set speed of the spindle motor, the feed speed of the Z-axis motor, and the set tapping depth, and recording this as the total forward motion distance of the spindle motor; controlling the forward motion of the spindle motor according to the total forward motion distance; and determining the feed amount of the Z-axis motor based on the encoder data of the spindle motor during the forward motion of the spindle motor. The Z-axis motor is controlled to move downwards according to its feed rate. During the downward movement of the Z-axis motor, the synchronization error between the main spindle motor and the Z-axis motor is determined based on the encoder data of the main spindle motor and the Z-axis motor. Based on the synchronization error, the rotation amount of the main spindle motor in the current cycle is determined. Based on the rotation amount of the main spindle motor in the current cycle, the feed rate of the Z-axis motor in the current cycle is determined. Based on the rotation amount of the main spindle motor in the current cycle, the main spindle motor is controlled to continue moving forward. The Z-axis motor is then controlled to continue moving downwards according to its feed rate in the current cycle. This cycle is repeated until the main spindle motor drives the Z-axis motor to move forward, performing rigid tapping to the set tapping depth.

[0008] In some embodiments, during the process of controlling the spindle motor to drive the Z-axis motor to reverse and exit the tapping operation, master-slave coupling control is performed on the reverse movement of the spindle motor and the Z-axis motor based on the encoder data of the spindle motor and the Z-axis motor, which are acquired again. This includes: determining the total distance the spindle motor needs to move when the spindle motor drives the Z-axis motor to reverse for rigid tapping based on the set speed of the spindle motor, the feed speed of the Z-axis motor, and the set tapping depth, and recording this as the total reverse movement distance of the spindle motor; and controlling the spindle motor to reverse according to the total reverse movement distance of the spindle motor; during the forward movement of the spindle motor, determining the encoder data of the Z-axis motor... The feed rate is determined; and the Z-axis motor is controlled to move upward according to the feed rate of the Z-axis motor; during the upward movement of the Z-axis motor, the synchronization error between the main spindle motor and the Z-axis motor is determined based on the encoder data of the main spindle motor and the Z-axis motor; based on the synchronization error between the main spindle motor and the Z-axis motor, the rotation amount of the main spindle motor in the current cycle is determined; and based on the rotation amount of the main spindle motor in the current cycle, the feed rate of the Z-axis motor in the current cycle is determined; based on the rotation amount of the main spindle motor in the current cycle, the main spindle motor is controlled to continue moving in the reverse direction; and based on the feed rate of the Z-axis motor in the current cycle, the Z-axis motor is controlled to continue moving upward; this cycle is repeated until the main spindle motor drives the Z-axis motor to move in the reverse direction to exit the tapping process and complete the tapping.

[0009] In conjunction with the above method, another aspect of the present invention provides a rigid tapping control device, wherein the CNC machine tool has a spindle motor and a Z-axis motor; the rigid tapping control device of the CNC machine tool includes: a control unit configured to control the spindle motor to drive the Z-axis motor to a set R-plane when rigid tapping of a workpiece to be tapped is required, and to determine the tapping start angle of the CNC machine tool; an acquisition unit configured to acquire encoder data of the spindle motor and encoder data of the Z-axis motor after the spindle motor drives the Z-axis motor to the set R-plane, when rigid tapping is required by controlling the spindle motor to drive the Z-axis motor to move forward, and to acquire encoder data of the spindle motor and encoder data of the Z-axis motor; the control unit configured to control the spindle motor to drive the Z-axis motor to move forward for rigid tapping based on the tapping start angle of the CNC machine tool; during the process of controlling the spindle motor to drive the Z-axis motor to move forward for rigid tapping, the acquired spindle motor encoder data is used to determine the Z-axis motor encoder data. The encoder data and the encoder data of the Z-axis motor are used to perform master-slave coupling control on the forward motion process of the spindle motor driving the Z-axis motor. The acquisition unit is further configured to acquire the encoder data of the spindle motor and the encoder data of the Z-axis motor again when the spindle motor drives the Z-axis motor to perform rigid tapping to the set tapping depth, and when it is necessary to control the spindle motor to drive the Z-axis motor to move in reverse to exit tapping. The control unit is further configured to control the spindle motor to drive the Z-axis motor to move in reverse to exit tapping after the Z-axis motor reaches the set tapping depth and both the spindle motor and the Z-axis motor stop. During the process of controlling the spindle motor to drive the Z-axis motor to move in reverse to exit tapping, the master-slave coupling control is performed on the reverse motion process of the spindle motor driving the Z-axis motor based on the newly acquired encoder data of the spindle motor and the encoder data of the Z-axis motor.

[0010] In some embodiments, when rigid tapping is required on a workpiece to be tapped, the control unit controls the spindle motor to drive the Z-axis motor to a set R-plane and determines the tapping start angle of the CNC machine tool. This includes: upon receiving a tapping command for tapping the workpiece, determining the set tapping information carried by the tapping command; the set tapping information includes: the set speed of the spindle motor, the feed speed of the Z-axis motor, the set tapping depth, and the set R-plane; based on the set speed of the spindle motor and the feed speed of the Z-axis motor, controlling the spindle motor to drive the Z-axis motor to the set R-plane; after the Z-axis motor reaches the set R-plane and both the spindle motor and the Z-axis motor stop, orienting the spindle motor to determine the tapping start angle of the CNC machine tool, and based on the tapping start angle of the CNC machine tool, controlling the spindle motor to drive the Z-axis motor to move forward for rigid tapping.

[0011] In some embodiments, during the process of controlling the spindle motor to drive the Z-axis motor in forward motion for rigid tapping, the control unit performs master-slave coupling control on the forward motion process of the spindle motor driving the Z-axis motor based on the acquired encoder data of the spindle motor and the Z-axis motor. This includes: determining the total distance the spindle motor needs to move when driving the Z-axis motor in forward motion for rigid tapping based on the set speed of the spindle motor, the feed speed of the Z-axis motor, and the set tapping depth, and recording this as the total forward motion distance of the spindle motor; controlling the forward motion of the spindle motor according to the total forward motion distance; and determining the feed speed of the Z-axis motor based on the encoder data of the spindle motor during the forward motion of the spindle motor. The feed rate of the Z-axis motor is measured, and the Z-axis motor is controlled to move downwards according to the feed rate of the Z-axis motor. During the downward movement of the Z-axis motor, the synchronization error between the main spindle motor and the Z-axis motor is determined based on the encoder data of the main spindle motor and the Z-axis motor. Based on the synchronization error between the main spindle motor and the Z-axis motor, the rotation amount of the main spindle motor in the current cycle is determined. Based on the rotation amount of the main spindle motor in the current cycle, the feed rate of the Z-axis motor in the current cycle is determined. Based on the rotation amount of the main spindle motor in the current cycle, the main spindle motor is controlled to continue moving forward. Based on the feed rate of the Z-axis motor in the current cycle, the Z-axis motor is controlled to continue moving downwards. This cycle is repeated until the main spindle motor drives the Z-axis motor to move forward to perform rigid tapping to reach the set tapping depth.

[0012] In some embodiments, the control unit, during the process of controlling the spindle motor to drive the Z-axis motor to reverse for tapping exit, performs master-slave coupling control on the reverse movement of the spindle motor and the Z-axis motor based on the encoder data of the spindle motor and the Z-axis motor acquired again. This includes: determining the total distance the spindle motor needs to move when the spindle motor drives the Z-axis motor to reverse for rigid tapping based on the set speed of the spindle motor, the feed speed of the Z-axis motor, and the set tapping depth, and recording this as the total reverse movement distance of the spindle motor; controlling the spindle motor to reverse according to the total reverse movement distance; and during the forward movement of the spindle motor, determining the Z-axis... The feed amount of the Z-axis motor is controlled; and the Z-axis motor is controlled to move upward according to the feed amount of the Z-axis motor; during the upward movement of the Z-axis motor, the synchronization error between the main spindle motor and the Z-axis motor is determined based on the encoder data of the main spindle motor and the encoder data of the Z-axis motor; based on the synchronization error between the main spindle motor and the Z-axis motor, the rotation amount of the main spindle motor in the current cycle is determined; and based on the rotation amount of the main spindle motor in the current cycle, the feed amount of the Z-axis motor in the current cycle is determined; based on the rotation amount of the main spindle motor in the current cycle, the main spindle motor is controlled to continue moving in the reverse direction; and the Z-axis motor is controlled to continue moving upward according to the feed amount of the Z-axis motor in the current cycle; this cycle is repeated until the main spindle motor drives the Z-axis motor to move in the reverse direction to exit the tapping process and complete the tapping.

[0013] In conjunction with the above-mentioned device, the present invention further provides a CNC machine tool, including: the rigid tapping control device described above.

[0014] In conjunction with the above method, the present invention further provides a storage medium comprising a stored program, wherein, when the program is executed, it controls the device containing the storage medium to perform the rigid tapping control method described above.

[0015] Therefore, the solution of this invention addresses the tapping process and tapping exit process of a CNC machine tool. During the tapping process, after the spindle motor drives the Z-axis motor to reach the machining plane of the workpiece, the spindle motor is oriented and the starting angle of the tap is determined. Based on the feedback data of the actual position of the spindle motor and the Z-axis motor at this time, the synchronization error between the spindle motor and the Z-axis motor is determined. Based on this synchronization error, the rotation amount of the spindle motor and the feed amount of the Z-axis motor are determined. Tapping is performed based on the determined rotation amount of the spindle motor and the feed amount of the Z-axis motor. After tapping reaches the specified depth of the workpiece and the spindle motor and Z-axis motor have stopped, the spindle motor and Z-axis motor are controlled to... The Z-axis motor reverses its movement to exit the tapping process. During this exit, the synchronization error between the spindle motor and the Z-axis motor is determined based on feedback data of their actual positions. This synchronization error is then used to determine the spindle motor's rotation and the Z-axis motor's feed rate. The tapping exit is then performed based on these determined rotation and feed rates. Therefore, by employing a master-slave coupling control method to determine the spindle motor's rotation and Z-axis motor's feed rate during both tapping and exiting the tapping process, the synchronization between the spindle motor and the Z-axis motor is improved. This, in turn, enhances the accuracy of the Z-axis motor's movement in following the spindle motor's motion and reduces the tapping depth error.

[0016] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention.

[0017] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating an embodiment of the rigid tapping control method of the present invention;

[0019] Figure 2 This is a flowchart illustrating an embodiment of the method of the present invention, which controls the spindle motor to drive the Z-axis motor to reach a set R plane and determines the starting angle of tap machining on the CNC machine tool.

[0020] Figure 3 This is a schematic flowchart of an embodiment of the method of the present invention for master-slave coupling control of the forward motion process of the spindle motor driving the Z-axis motor;

[0021] Figure 4 This is a schematic flowchart of an embodiment of the method of the present invention for master-slave coupling control of the reverse motion process of the spindle motor driving the Z-axis motor;

[0022] Figure 5This is a schematic diagram of a structure of an embodiment of the rigid tapping control device of the present invention;

[0023] Figure 6 This is a flowchart illustrating an embodiment of the master-slave coupling control method for rigid tapping according to the present invention;

[0024] Figure 7 This is a flowchart illustrating a specific embodiment of the master-slave coupling control method for rigid tapping according to the present invention.

[0025] Referring to the accompanying drawings, the reference numerals in the embodiments of the present invention are as follows:

[0026] 102 - Acquisition unit; 104 - Control unit. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0028] Considering that rigid tapping is a fundamental function of CNC machine tools, and since the spindle's rapid response requirements are not as high as those of the feed axes, the spindle motor's rapid response capability is not as large as that of the Z-axis. This is reflected in the response curve, meaning the spindle's response delay is greater than that of the Z-axis. Therefore, the relevant solutions use a Z-axis motor that follows the spindle motor to reduce machining errors caused by the asynchrony between the spindle and Z-axis movements. Since the spindle's rotation is calculated by acquiring feedback data, based on the thread pitch, the Z-axis moves one thread pitch length for every spindle revolution, and the Z-axis moves a corresponding distance for every spindle angle per cycle. Because the spindle moves ahead of the feed axis, the acquired spindle feedback data has a significant delay. When driving the Z-axis, under load, this leads to a delay between the output and the actual movement. Under the influence of multiple delays, the spindle and Z-axis movements are easily completely out of sync, resulting in larger thread errors after tapping, and also increasing the risk of tool breakage and workpiece damage. Due to various delays, the spindle and Z-axis move asynchronously, and there is no synchronization adjustment mechanism. Therefore, after the spindle has moved a given distance, the distance the Z-axis has moved, i.e., the tapping depth, will have a certain error.

[0029] The CNC system (i.e., the control system of a CNC machine tool) sends position or speed commands to the motor driver, which then drives the motor. Due to factors such as motor load, communication cycle, and electromagnetic characteristics, there is a certain time difference between the CNC system assigning a motor position and the motor actually reaching that position. Regarding the impact of motor load on motor response delay, for example, under the same torque, the greater the motor load, the greater the motor's inertia. When the CNC system assigns a position to the motor, it takes a longer time for the motor to overcome inertia and reach the given position. The impact of communication cycle on motor response delay is illustrated below: When the CNC system assigns a position to the motor, it needs to transmit the position data to the servo driver via a communication protocol. The servo driver then controls the motor's operation. Different communication cycles result in different time differences in transmitting the position data to the servo driver. Regarding electromagnetic characteristics, when a servo motor controls another motor, it first establishes a rotating magnetic field to drive the motor rotor. Since changes in the electromagnetic field are not abrupt but require a process, this leads to a certain time lag between the servo driver driving the motor to rotate. Because the spindle's rapid response requirements are not as high as those of the feed axis, the spindle motor's delay is relatively large in the design. During rigid tapping, the spindle motor needs to obtain the spindle feed amount based on parameters such as tap pitch, spindle set speed, and tapping depth, combined with an acceleration / deceleration algorithm, and transmit this information to the spindle to drive its movement. After the spindle motor moves, it acquires data from the spindle motor encoder and controls the Z-axis motor based on this encoder data. This method is called master-slave control. Since master-slave control uses the spindle motor's encoder data to control the Z-axis motor, although... The spindle motor has a relatively large delay, but master-slave control uses data from the spindle motor encoder—the actual position feedback value of the spindle motor—to control the Z-axis motor. The synchronization error originates from the Z-axis motor's delay, which is relatively small. Therefore, for open-loop control, the synchronization error stems from the overlapping influence of the large delay of the spindle motor and the small delay of the Z-axis motor. While this method is better than traditional open-loop control, synchronization can still be further improved by adjusting the spindle setpoint based on the synchronization error feedback from the spindle and Z-axis encoders. In open-loop control, the CNC system calculates the speed or position of the spindle and Z-axis motors based on the tapping pitch and sends this information to the spindle and Z-axis motors to initiate their movement.

[0030] Therefore, in order to further improve the accuracy of the Z-axis motor following the spindle motor and reduce the tapping depth error, the present invention proposes a rigid tapping control method for CNC machine tools. Specifically, it is a rigid tapping master-slave coupling control method for CNC machine tools. Based on the master-slave control of the spindle motor and the Z-axis motor, the feed rate of the spindle is adjusted in reverse according to the synchronization difference between the spindle motor and the Z-axis motor, which can improve the synchronization between the spindle motor and the Z-axis motor and reduce the tapping depth error.

[0031] According to embodiments of the present invention, a rigid tapping control method for a CNC machine tool is provided, such as... Figure 1 The diagram shows a flowchart of an embodiment of the method of the present invention. The CNC machine tool has a spindle motor and a Z-axis motor. The rigid tapping control method of the CNC machine tool includes steps S110 to S150.

[0032] In step S110, when rigid tapping is required on the workpiece to be tapped, the spindle motor is controlled to drive the Z-axis motor to the set R plane, and the starting angle of tapping of the CNC machine tool is determined.

[0033] In some embodiments, the specific process of controlling the spindle motor to drive the Z-axis motor to reach the set R plane and determining the starting angle of tapping of the CNC machine tool in step S110 when rigid tapping of the workpiece to be tapped is required can be found in the following exemplary description.

[0034] The following is combined with Figure 2 The schematic diagram shows an embodiment of the method of the present invention, which controls the spindle motor to drive the Z-axis motor to reach the set R plane and determines the starting angle of tap processing of the CNC machine tool. The specific process of controlling the spindle motor to drive the Z-axis motor to reach the set R plane and determining the starting angle of tap processing of the CNC machine tool in step S110 is further explained, including steps S210 to S230.

[0035] Step S210: Upon receiving a tapping command for tapping the workpiece to be tapped, determine the set tapping information carried by the tapping command. The set tapping information includes: the set speed of the spindle motor, the feed speed of the Z-axis motor, the set tapping depth, and the set R-plane.

[0036] Step S220: Based on the set speed of the spindle motor and the feed speed of the Z-axis motor, control the spindle motor to drive the Z-axis motor to reach the set R-plane. Then, when the Z-axis motor reaches the set R-plane, acquire the encoder data of the spindle motor and the encoder data of the Z-axis motor, and wait until both the spindle motor and the Z-axis motor stop after reaching the set R-plane.

[0037] Step S230: After the Z-axis motor reaches the set R plane and both the spindle motor and the Z-axis motor stop, the spindle motor is oriented to determine the tapping start angle of the CNC machine tool. Based on the tapping start angle of the CNC machine tool, the spindle motor is controlled to drive the Z-axis motor to move forward for rigid tapping.

[0038] Specifically, Figure 6 This is a schematic flowchart illustrating an embodiment of the master-slave coupling control method for rigid tapping according to the present invention. Figure 6 As shown, the master-slave coupling control method for rigid tapping proposed in this invention includes:

[0039] Step 11: Before starting rigid tapping, the system first parses the G-code information of the tapping command set by the user. This G-code information includes information such as Z-axis feed rate, spindle set speed, tapping depth, and R-plane. After parsing, the system transmits the information to the real-time system, and then executes step 12.

[0040] Step 12: The real-time system acquires data such as Z-axis feed rate, spindle set speed, and tapping depth. Then, the CNC system controls the Z-axis to reach the R-plane, and then executes step 13. The R-plane is the plane set in the G-code information, located 2-5 mm away from the upper surface of the workpiece.

[0041] Step 13: Due to the lag in the spindle motor's response, the spindle motor may not have fully reached the designated plane. In this case, it is necessary to acquire the encoder data of the Z-axis motor and wait for both the spindle and Z-axis motors to stop. After both motors stop, the Z-axis motor reaches the machining plane of the workpiece, and then proceed to step 14. Specifically, the Z-axis motor stops when the encoder data acquired in the current cycle equals the encoder data acquired in the previous cycle (i.e., when the change in encoder data between the current and previous cycles is 0).

[0042] Step 14: Next, spindle orientation is performed. The angle after spindle orientation is completed is the starting angle for tapping. Then, step 15 is executed to perform master-slave coupling control during rigid tapping.

[0043] In step S120, after the spindle motor drives the Z-axis motor to the set R plane, when it is necessary to control the spindle motor to drive the Z-axis motor to move forward for rigid tapping, the encoder data of the spindle motor and the encoder data of the Z-axis motor are acquired. Here, acquiring the encoder data of the spindle motor and the Z-axis motor means acquiring the encoder data of the spindle motor and the Z-axis motor in real time before controlling the spindle motor to move forward for rigid tapping, and throughout the entire process of controlling the spindle motor to move forward for rigid tapping. The encoder data of the spindle motor and the Z-axis motor required during the control process are acquired in real time.

[0044] In step S130, based on the tapping start angle of the CNC machine tool, the spindle motor is controlled to drive the Z-axis motor in a forward motion for rigid tapping. During this process, the forward motion of the spindle motor and Z-axis motor is controlled by a master-slave coupling based on the acquired encoder data of the spindle motor and Z-axis motor. Specifically, as follows... Figure 6 As shown, the master-slave coupling control method for rigid tapping proposed in this invention further includes: step 15, performing master-slave coupling control for rigid tapping, and then executing step 16, so as to control the spindle motor and the Z-axis motor to stop when the rigid tapping reaches the specified depth.

[0045] In some embodiments, during the process of controlling the spindle motor to drive the Z-axis motor to move forward for rigid tapping in step S130, the specific process of master-slave coupling control of the forward movement of the spindle motor and the Z-axis motor based on the acquired encoder data of the spindle motor and the encoder data of the Z-axis motor is described in the following exemplary description.

[0046] The following is combined with Figure 3 The flowchart shown is a master-slave coupling control of the forward motion process of the spindle motor driving the Z-axis motor in the method of the present invention. It further illustrates the specific process of master-slave coupling control of the forward motion process of the spindle motor driving the Z-axis motor in step S130, including steps S310 to S360.

[0047] Step S310: Based on the set speed of the spindle motor, the feed speed of the Z-axis motor, and the set tapping depth, determine the total distance the spindle motor needs to travel when driving the Z-axis motor to perform rigid tapping in the forward direction, and record this as the total forward movement distance of the spindle motor. Control the forward movement of the spindle motor according to this total forward movement distance.

[0048] Step S320: During the forward movement of the spindle motor, the feed amount of the Z-axis motor is determined based on the encoder data of the spindle motor; and the Z-axis motor is controlled to move downward according to the feed amount of the Z-axis motor.

[0049] Step S330: During the downward movement of the Z-axis motor, the synchronization error between the main spindle motor and the Z-axis motor is determined based on the encoder data of the main spindle motor and the encoder data of the Z-axis motor.

[0050] Step S340: Based on the synchronization error between the spindle motor and the Z-axis motor, determine the rotation amount of the spindle motor in the current cycle. Then, based on the rotation amount of the spindle motor in the current cycle, determine the feed amount of the Z-axis motor in the current cycle. Specifically, the spindle motion process is divided into an acceleration phase, a constant speed phase, and a deceleration phase, and the spindle motor rotation amount in the current cycle is calculated according to the spindle acceleration / deceleration algorithm.

[0051] Step S350: Based on the rotation amount of the spindle motor in the current cycle, control the spindle motor to continue moving forward. And based on the feed amount of the Z-axis motor in the current cycle, control the Z-axis motor to continue moving downward.

[0052] Step S360 is repeated until the spindle motor drives the Z-axis motor to move forward to perform rigid tapping and reach the set tapping depth.

[0053] Specifically, such as Figure 6 As shown, the master-slave coupling control method for rigid tapping proposed in this invention further includes: in step 15, the specific process of performing master-slave coupling control for rigid tapping can be found in the following exemplary description.

[0054] To improve the synchronization of the spindle motor and the Z-axis motor, the present invention proposes that, based on the master-slave control of the spindle motor and the Z-axis motor, the CNC system recalculates the feed rate of the spindle motor according to the synchronization error of the spindle motor and the Z-axis motor, thereby controlling the spindle motor and the Z-axis motor more accurately and improving their synchronization. Figure 7 This is a flowchart illustrating a specific embodiment of the master-slave coupling control method for rigid tapping according to the present invention. Figure 7 As shown, in the master-slave coupling control method for rigid tapping, the process of performing master-slave coupling control for rigid tapping includes:

[0055] Step 21: Based on the obtained data such as Z-axis feed rate, spindle set speed, and tapping depth, calculate the total distance the spindle needs to travel when tapping downwards, and then proceed to step 22. The formula for calculating the total distance the spindle needs to travel when tapping downwards in step 21 is as follows:

[0056] Sd=2×π×Deep×SpindleSpeed÷dF.

[0057] Where Sd is the total distance the spindle needs to travel when tapping downwards, π is pi, Deep is the tapping depth, SpindleSpeed ​​is the spindle speed setting, and dF is the Z-axis feed speed.

[0058] Step 22: Based on the total distance Sd that the spindle needs to travel during downward tapping, control the spindle motor to move forward. While controlling the spindle motor to move forward, acquire the spindle motor feedback data (i.e., spindle feedback data), and control the feed amount of the Z-axis motor based on the spindle motor feedback data. Specifically, calculate the feed amount of the Z-axis motor for the current cycle based on the feedback data of the actual position of the spindle motor, and control the Z-axis motor to move downward. Then, proceed to step 23.

[0059] Step 23: While controlling the Z-axis motor to move downwards, acquire the feedback data of the Z-axis motor (i.e., Z-axis feedback data). Based on the spindle feedback data and the Z-axis feedback data, calculate the synchronization error between the spindle motor and the Z-axis motor, and then proceed to step 24. The formula for calculating the synchronization error between the spindle motor and the Z-axis motor in step 23 is as follows:

[0060] feedback=dF×deltaSpindlePos÷SpindleSpeed-deltaZPos.

[0061] Among them, feedback is the synchronization error between the spindle motor and the Z-axis motor, deltaSpindlePos is the difference between the actual position of the spindle motor encoder in the current cycle and the actual position of the encoder in the previous cycle, SpindleSpeed ​​is the spindle set speed, dF is the Z-axis feed speed, and deltaZPos is the difference between the actual position of the Z-axis motor encoder in the current cycle and the actual position of the encoder in the previous cycle.

[0062] Step 24: Based on the synchronization error between the spindle motor and the Z-axis motor, calculate the rotation amount of the spindle motor in the current cycle and the feed amount of the Z-axis motor in the current cycle.

[0063] In step 24, the formula for calculating the rotational speed of the spindle motor in the current cycle is as follows:

[0064] Spindle_Input=disp-kscale×2×π×feedback×SpindleSpeed÷dF.

[0065] Where Spindle_Input is the rotation amount of the spindle motor in the current cycle, disp is the distance given by the spindle in the current cycle, kscale is the adjustment coefficient of the master-slave coupling control algorithm, π is pi, SpindleSpeed ​​is the set speed of the spindle, dF is the Z-axis feed speed, and feedback is the synchronization error between the spindle motor and the Z-axis motor.

[0066] In step 24, the formula for calculating the Z-axis motor feed rate for the current cycle is as follows:

[0067] Z_Input=dF×deltaSpindlePos÷SpindleSpeed.

[0068] Where Z_Input is the Z-axis motor feed amount for the current cycle, SpindleSpeed ​​is the spindle set speed, dF is the Z-axis feed speed, and deltaSpindlePos is the difference between the actual position of the spindle motor encoder in the current cycle and the actual position of the encoder in the previous cycle.

[0069] Because the present invention adopts a master-slave coupling control method, the synchronization between the spindle motor and the Z-axis motor is improved, so that the distance error of the Z-axis movement is relatively reduced after the spindle has moved a given distance. This solves the problem of poor accuracy of the Z-axis movement distance, i.e., the rigid tapping depth, thereby improving the accuracy of the rigid tapping machining depth.

[0070] In step S140, when the spindle motor drives the Z-axis motor to move forward for rigid tapping to the set tapping depth, if it is necessary to control the spindle motor to drive the Z-axis motor to move in reverse to exit the tapping process, the encoder data of the spindle motor and the Z-axis motor are acquired again. Here, acquiring the encoder data of the spindle motor and the Z-axis motor again means restarting the acquisition of their encoder data. Specifically, the encoder data of the spindle motor and the Z-axis motor are acquired in real time before and throughout the entire process of controlling the spindle motor to drive the Z-axis motor to move in reverse to exit the tapping process. The encoder data of the spindle motor and the Z-axis motor required during the control process are acquired in real time.

[0071] In step S150, after the Z-axis motor reaches the set tapping depth and both the spindle motor and the Z-axis motor stop, the spindle motor is controlled to drive the Z-axis motor in the reverse direction to exit the tapping process. During this process, the reverse movement of the spindle motor and the Z-axis motor is controlled by a master-slave coupling based on the newly acquired encoder data of the spindle motor and the Z-axis motor. Here, "reverse" refers to the direction opposite to the forward direction.

[0072] Specifically, such as Figure 6As shown, the master-slave coupling control method for rigid tapping proposed in this invention further includes: Step 16: After the rigid tapping reaches the specified depth, acquire the encoder data of the spindle motor and the Z-axis motor. When the encoder data no longer changes in the current cycle and the previous cycle, it indicates that the spindle motor and the Z-axis motor have stopped, and then execute step 17. In the solution of this invention, when the spindle and the Z-axis reach the machining point and the machining depth point, the spindle and the Z-axis encoder data are acquired, and the spindle and the Z-axis are waited for to stop to ensure that the set machining point or machining depth point is reached.

[0073] Step 17: After the rigid tapping reaches the set depth and the spindle motor and Z-axis motor have stopped, control the spindle motor and Z-axis motor to move in opposite directions to exit the tapping process. The exiting tapping process also employs the same method... Figure 7 The master-slave coupling control scheme shown is used to exit tapping control.

[0074] The present invention proposes a rigid tapping master-slave coupling control method for CNC machine tools. Based on the master-slave control of the spindle motor and the Z-axis motor, the feed rate of the spindle is adjusted in reverse according to the synchronization difference between the spindle motor and the Z-axis motor. This solves the problem of poor synchronization between the spindle motor and the Z-axis motor during tapping, thereby improving the synchronization between the spindle motor and the Z-axis motor, reducing thread machining errors (i.e., reducing tapping depth errors), and thus improving the pass rate of machined parts.

[0075] The test data for the rigid tapping master-slave coupling control method and the cross-coupling control method are compared as follows:

[0076]

[0077] It should be noted that the solution of the present invention is designed based on master-slave coupling control and standard cross-coupling control algorithm, using the same control parameters: spindle speed of 100 r / min, Z-axis feed speed of 100 mm / min, spindle acceleration of 5000 rad / s^2, and tapping depth of 10 mm.

[0078] In some embodiments, during step S150, when controlling the spindle motor to drive the Z-axis motor to move in the opposite direction to exit the tapping process, the specific process of performing master-slave coupling control on the reverse movement of the spindle motor and the Z-axis motor based on the encoder data of the spindle motor and the Z-axis motor that are acquired again is described in the following exemplary description.

[0079] The following is combined with Figure 4The flowchart shown is a master-slave coupling control of the reverse motion process of the spindle motor driving the Z-axis motor in the method of the present invention. It further illustrates the specific process of master-slave coupling control of the reverse motion process of the spindle motor driving the Z-axis motor in step S150, including steps S410 to S460.

[0080] Step S410: Based on the set speed of the spindle motor, the feed speed of the Z-axis motor, and the set tapping depth, determine the total distance the spindle motor needs to move when it drives the Z-axis motor to move in the reverse direction for rigid tapping, and record this as the total reverse movement distance of the spindle motor. Control the spindle motor to move in the reverse direction according to this total reverse movement distance.

[0081] Step S420: During the forward movement of the spindle motor, the feed amount of the Z-axis motor is determined based on the encoder data of the spindle motor; and the Z-axis motor is controlled to move upward according to the feed amount of the Z-axis motor.

[0082] Step S430: During the upward movement of the Z-axis motor, the synchronization error between the main spindle motor and the Z-axis motor is determined based on the encoder data of the main spindle motor and the encoder data of the Z-axis motor.

[0083] Step S440: Based on the synchronization error between the spindle motor and the Z-axis motor, determine the rotation amount of the spindle motor in the current cycle. And based on the rotation amount of the spindle motor in the current cycle, determine the feed amount of the Z-axis motor in the current cycle.

[0084] Step S450: Based on the rotation amount of the spindle motor in the current cycle, control the spindle motor to continue moving in the reverse direction. And based on the feed amount of the Z-axis motor in the current cycle, control the Z-axis motor to continue moving upwards.

[0085] Step S460 is repeated until the spindle motor drives the Z-axis motor to move in the opposite direction to exit the tapping process.

[0086] Specifically, such as Figure 6 As shown, the master-slave coupling control method for rigid tapping proposed in this invention further includes: in step 17, the specific process of exiting the master-slave coupling control for tapping can be found in the following exemplary description.

[0087] See Figure 7 In the example shown, step 17, the process of exiting tapping control includes:

[0088] Step 31: Based on the obtained Z-axis feed rate, spindle set speed, tapping depth, and other data, calculate the total distance the spindle needs to travel when exiting tapping, and then proceed to step 32. The formula for calculating the total distance the spindle needs to travel when exiting tapping in step 31 is as follows:

[0089] Sup=2×π×Deep×SpindleSpeed÷dF.

[0090] Where Sup is the total distance the spindle needs to travel when exiting tapping, π is pi, Deep is the tapping depth, SpindleSpeed ​​is the spindle speed setting, and dF is the Z-axis feed rate.

[0091] Step 32: Control the spindle motor to move in the reverse direction based on the total distance Sup that the spindle needs to travel when tapping exits. While controlling the spindle motor to move in the reverse direction, acquire the feedback data of the spindle motor (i.e., spindle feedback data), that is, acquire the feedback data of the actual position of the spindle motor. Based on the feedback data of the actual position of the spindle motor, calculate the feed amount of the Z-axis motor in the current cycle, and control the Z-axis to move upward. Then, execute step 33.

[0092] Step 33: While controlling the Z-axis upward movement, acquire the feedback data of the Z-axis motor (i.e., Z-axis feedback data). Based on the spindle feedback data and the Z-axis feedback data, calculate the synchronization error between the spindle motor and the Z-axis motor, and then proceed to step 34. In step 33, the formula for calculating the synchronization error between the spindle motor and the Z-axis motor is as follows:

[0093] feedback=dF×deltaSpindlePos÷SpindleSpeed-deltaZPos.

[0094] Among them, feedback is the synchronization error between the spindle motor and the Z-axis motor, deltaSpindlePos is the difference between the actual position of the spindle motor encoder in the current cycle and the actual position of the encoder in the previous cycle, SpindleSpeed ​​is the spindle set speed, dF is the Z-axis feed speed, and deltaZPos is the difference between the actual position of the Z-axis motor encoder in the current cycle and the actual position of the encoder in the previous cycle.

[0095] Step 34: Based on the synchronization error between the spindle motor and the Z-axis motor, calculate the rotation amount of the spindle motor in the current cycle and the feed amount of the Z-axis motor in the current cycle.

[0096] In step 34, the formula for calculating the rotational amount of the spindle motor in the current cycle is as follows:

[0097] Spindle_Input=disp-kscale×2×π×feedback×SpindleSpeed÷dF.

[0098] Where Spindle_Input is the spindle rotation amount in the current cycle, and disp is the given distance of the spindle in the current cycle. kscale is the adjustment coefficient of the master-slave coupling control algorithm. π is pi. SpindleSpeed ​​is the set speed of the spindle. dF is the Z-axis feed speed. feedback is the synchronization error between the spindle motor and the Z-axis motor.

[0099] In step 34, the formula for calculating the Z-axis motor feed rate for the current cycle is as follows:

[0100] Z_Input=dF×deltaSpindlePos÷SpindleSpeed.

[0101] Where Z_Input is the Z-axis motor feed amount for the current cycle, SpindleSpeed ​​is the spindle set speed, dF is the Z-axis feed speed, and deltaSpindlePos is the difference between the actual position of the spindle motor encoder in the current cycle and the actual position of the encoder in the previous cycle.

[0102] As can be seen, the master-slave coupling control scheme proposed in this invention can be used in the control of rigid tapping and tapping retraction after rigid tapping on CNC machine tools. When used in CNC machine tool tapping retraction, tapping retraction occurs when the tap breaks during tapping, or when an emergency stop or reset is pressed, causing the tap to become embedded in the workpiece. When the CNC machine tool supports tapping retraction, the tap can be pulled out.

[0103] Because the present invention employs a master-slave coupling control method, it improves the synchronization between the spindle motor and the Z-axis motor, thereby reducing the thread error and meeting the requirements for high-precision, rigid tapping of parts. The improved synchronization between the spindle motor and the Z-axis motor also ensures that the tool mounted on the spindle experiences relatively uniform force, thus reducing the risk of tool breakage.

[0104] The technical solution of this embodiment addresses the tapping and tapping exit processes of a CNC machine tool. During tapping, after the spindle motor drives the Z-axis motor to the machining plane of the workpiece, the spindle motor is oriented and the starting angle of the tap is determined. Based on feedback data of the actual positions of the spindle motor and Z-axis motor, the synchronization error between them is determined. This synchronization error is used to determine the rotation amount of the spindle motor and the feed amount of the Z-axis motor. Tapping is then performed based on these determined rotation amounts. After tapping reaches the specified depth on the workpiece and both the spindle and Z-axis motors have stopped, they are controlled to reverse to exit tapping. During tapping exit, the synchronization error between them is again determined based on feedback data of the actual positions of the spindle and Z-axis motors. This synchronization error is used to determine the rotation amount of the spindle motor and the feed amount of the Z-axis motor. Tapping is then exited based on these determined rotation amounts. Therefore, by using a master-slave coupling control method to determine the rotation amount of the spindle motor and the feed amount of the Z-axis motor during both tapping and tapping exit, the synchronization between the spindle motor and the Z-axis motor can be improved, thereby improving the accuracy of the Z-axis motor in following the spindle motor and reducing the tapping depth error.

[0105] According to an embodiment of the present invention, a control device for rigid tapping corresponding to the control method for rigid tapping is also provided. See also Figure 5 The diagram shows a structural schematic of an embodiment of the device of the present invention. The CNC machine tool has a spindle motor and a Z-axis motor. The rigid tapping control device of the CNC machine tool includes: an acquisition unit 102 and a control unit 104.

[0106] The control unit 104 is configured to, when rigid tapping of a workpiece requires, control the spindle motor to drive the Z-axis motor to a set R-plane and determine the starting angle for tapping on the CNC machine tool. The specific functions and processing of this control unit 104 are described in step S110.

[0107] In some embodiments, when rigid tapping of the workpiece to be tapped is required, the control unit 104 controls the spindle motor to drive the Z-axis motor to a set R-plane and determines the tapping starting angle of the CNC machine tool, including:

[0108] The control unit 104 is further configured to, upon receiving a tapping command for tapping a workpiece to be tapped, determine the set tapping information carried in the tapping command. The set tapping information includes: the set speed of the spindle motor, the feed speed of the Z-axis motor, the set tapping depth, and the set R-plane. The specific functions and processing of this control unit 104 are further described in step S210.

[0109] The control unit 104 is further configured to control the spindle motor to drive the Z-axis motor to the set R-plane based on the set speed of the spindle motor and the feed speed of the Z-axis motor. Furthermore, the acquisition unit 102102, upon the Z-axis motor reaching the set R-plane, acquires the encoder data of the spindle motor and the encoder data of the Z-axis motor, and waits until both the spindle motor and the Z-axis motor stop after reaching the set R-plane. The specific functions and processing of this control unit 104 are further described in step S220.

[0110] The control unit 104 is further configured to, after the Z-axis motor reaches the set R-plane and both the spindle motor and the Z-axis motor stop, orient the spindle motor to determine the starting angle for tapping on the CNC machine tool, and control the spindle motor to drive the Z-axis motor to move forward for rigid tapping based on the starting angle for tapping on the CNC machine tool. The specific functions and processing of this control unit 104 are further described in step S230.

[0111] Specifically, Figure 6 This is a schematic flowchart illustrating an embodiment of the rigid tapping master-slave coupling control device of the present invention. Figure 6 As shown, the master-slave coupling control device for rigid tapping proposed in this invention includes:

[0112] Step 11: Before starting rigid tapping, the system first parses the G-code information of the tapping command set by the user. This G-code information includes information such as Z-axis feed rate, spindle set speed, tapping depth, and R-plane. After parsing, the system transmits the information to the real-time system, and then executes step 12.

[0113] Step 12: The real-time system acquires data such as Z-axis feed rate, spindle set speed, and tapping depth. Then, the CNC system controls the Z-axis to reach the R-plane, and then executes step 13. The R-plane is the plane set in the G-code information, located 2-5 mm away from the upper surface of the workpiece.

[0114] Step 13: Due to the lag in the spindle motor's response, the spindle motor may not have fully reached the designated plane. In this case, it is necessary to acquire the encoder data of the Z-axis motor and wait for both the spindle and Z-axis motors to stop. After both motors stop, the Z-axis motor reaches the machining plane of the workpiece, and then proceed to step 14. Specifically, the Z-axis motor stops when the encoder data acquired in the current cycle equals the encoder data acquired in the previous cycle (i.e., when the change in encoder data between the current and previous cycles is 0).

[0115] Step 14: Next, spindle orientation is performed. The angle after spindle orientation is completed is the starting angle for tapping. Then, step 15 is executed to perform master-slave coupling control during rigid tapping.

[0116] The acquisition unit 102 is configured to acquire the encoder data of the spindle motor and the encoder data of the Z-axis motor after the spindle motor drives the Z-axis motor to reach the set R plane, when it is necessary to control the spindle motor to drive the Z-axis motor to move forward for rigid tapping. The specific functions and processing of this acquisition unit 102 are described in step S120. Here, acquiring the encoder data of the spindle motor and the Z-axis motor means acquiring the encoder data of the spindle motor and the Z-axis motor in real time before controlling the spindle motor to drive the Z-axis motor to move forward for rigid tapping, and throughout the entire process of controlling the spindle motor to drive the Z-axis motor to move forward for rigid tapping. The encoder data of the spindle motor and the Z-axis motor required during the control process are acquired in real time.

[0117] Control unit 104 is configured to control the spindle motor to drive the Z-axis motor in a forward motion for rigid tapping based on the tapping start angle of the CNC machine tool. During the process of controlling the spindle motor to drive the Z-axis motor in a forward motion for rigid tapping, master-slave coupling control is performed on the forward motion process of the spindle motor driving the Z-axis motor based on the acquired encoder data of the spindle motor and the Z-axis motor. The specific functions and processing of this control unit 104 are further described in step S130. Specifically, as... Figure 6 As shown, the rigid tapping master-slave coupling control device proposed in the present invention further includes: step 15, performing rigid tapping master-slave coupling control, and then executing step 16, so as to control the spindle motor and the Z-axis motor to stop when the rigid tapping reaches the specified depth.

[0118] In some embodiments, during the process of controlling the spindle motor to drive the Z-axis motor in forward motion for rigid tapping, the control unit 104 performs master-slave coupling control on the forward motion process of the spindle motor driving the Z-axis motor based on the acquired encoder data of the spindle motor and the encoder data of the Z-axis motor, including:

[0119] The control unit 104 is further configured to determine, based on the set speed of the spindle motor, the feed speed of the Z-axis motor, and the set tapping depth, the total distance the spindle motor needs to travel when driving the Z-axis motor in forward motion for rigid tapping, and denoted as the total forward motion distance of the spindle motor. The control unit 104 then controls the spindle motor to move forward according to this total forward motion distance. The specific functions and processing of this control unit 104 are further described in step S310.

[0120] The control unit 104 is further configured to determine the feed amount of the Z-axis motor based on the encoder data of the spindle motor during the forward movement of the spindle motor; and to control the Z-axis motor to move downward according to the feed amount of the Z-axis motor. The specific functions and processing of this control unit 104 are further described in step S320.

[0121] The control unit 104 is further configured to determine the synchronization error between the main spindle motor and the Z-axis motor based on the encoder data of the main spindle motor and the encoder data of the Z-axis motor during the downward movement of the Z-axis motor. The specific functions and processing of this control unit 104 are further described in step S330.

[0122] The control unit 104 is further configured to determine the rotation amount of the spindle motor in the current cycle based on the synchronization error between the spindle motor and the Z-axis motor. And based on the rotation amount of the spindle motor in the current cycle, it determines the feed amount of the Z-axis motor in the current cycle. The specific functions and processing of this control unit 104 are further described in step S340.

[0123] The control unit 104 is further configured to control the spindle motor to continue forward movement based on the rotation amount of the spindle motor in the current cycle, and to control the Z-axis motor to continue downward movement based on the feed amount of the Z-axis motor in the current cycle. The specific functions and processing of this control unit 104 are further described in step S350.

[0124] The control unit 104 is further configured to cycle in this manner until the spindle motor drives the Z-axis motor to move forward to perform rigid tapping and reach the set tapping depth. The specific functions and processing of the control unit 104 are further described in step S360.

[0125] Specifically, such as Figure 6 As shown, the rigid tapping master-slave coupling control device proposed in the present invention further includes: the specific process of performing rigid tapping master-slave coupling control in step 15 can be found in the following exemplary description.

[0126] To improve the synchronization of the spindle motor and the Z-axis motor, the present invention proposes that, based on the master-slave control of the spindle motor and the Z-axis motor, the CNC system recalculates the feed rate of the spindle motor according to the synchronization error of the spindle motor and the Z-axis motor, thereby controlling the spindle motor and the Z-axis motor more accurately and improving their synchronization. Figure 7 This is a schematic flowchart illustrating a specific embodiment of the master-slave coupling control device for rigid tapping according to the present invention. Figure 7 As shown, the master-slave coupling control process for rigid tapping in the rigid tapping master-slave coupling control device includes:

[0127] Step 21: Based on the obtained data such as Z-axis feed rate, spindle set speed, and tapping depth, calculate the total distance the spindle needs to travel when tapping downwards, and then proceed to step 22. The formula for calculating the total distance the spindle needs to travel when tapping downwards in step 21 is as follows:

[0128] Sd=2×π×Deep×SpindleSpeed÷dF.

[0129] Where Sd is the total distance the spindle needs to travel when tapping downwards, π is pi, Deep is the tapping depth, SpindleSpeed ​​is the spindle speed setting, and dF is the Z-axis feed speed.

[0130] Step 22: Based on the total distance Sd that the spindle needs to travel during downward tapping, control the spindle motor to move forward. While controlling the spindle motor to move forward, acquire the spindle motor feedback data (i.e., spindle feedback data), and control the feed amount of the Z-axis motor based on the spindle motor feedback data. Specifically, calculate the feed amount of the Z-axis motor for the current cycle based on the feedback data of the actual position of the spindle motor, and control the Z-axis motor to move downward. Then, proceed to step 23.

[0131] Step 23: While controlling the Z-axis motor to move downwards, acquire the feedback data of the Z-axis motor (i.e., Z-axis feedback data). Based on the spindle feedback data and the Z-axis feedback data, calculate the synchronization error between the spindle motor and the Z-axis motor, and then proceed to step 24. The formula for calculating the synchronization error between the spindle motor and the Z-axis motor in step 23 is as follows:

[0132] feedback=dF×deltaSpindlePos÷SpindleSpeed-deltaZPos.

[0133] Among them, feedback is the synchronization error between the spindle motor and the Z-axis motor, deltaSpindlePos is the difference between the actual position of the spindle motor encoder in the current cycle and the actual position of the encoder in the previous cycle, SpindleSpeed ​​is the spindle set speed, dF is the Z-axis feed speed, and deltaZPos is the difference between the actual position of the Z-axis motor encoder in the current cycle and the actual position of the encoder in the previous cycle.

[0134] Step 24: Based on the synchronization error between the spindle motor and the Z-axis motor, calculate the rotation amount of the spindle motor in the current cycle and the feed amount of the Z-axis motor in the current cycle.

[0135] In step 24, the formula for calculating the rotational speed of the spindle motor in the current cycle is as follows:

[0136] Spindle_Input=disp-kscale×2×π×feedback×SpindleSpeed÷dF.

[0137] Where Spindle_Input is the rotation amount of the spindle motor in the current cycle, disp is the distance given by the spindle in the current cycle, kscale is the adjustment coefficient of the master-slave coupling control algorithm, π is pi, SpindleSpeed ​​is the set speed of the spindle, dF is the Z-axis feed speed, and feedback is the synchronization error between the spindle motor and the Z-axis motor.

[0138] In step 24, the formula for calculating the Z-axis motor feed rate for the current cycle is as follows:

[0139] Z_Input=dF×deltaSpindlePos÷SpindleSpeed.

[0140] Where Z_Input is the Z-axis motor feed amount for the current cycle, SpindleSpeed ​​is the spindle set speed, dF is the Z-axis feed speed, and deltaSpindlePos is the difference between the actual position of the spindle motor encoder in the current cycle and the actual position of the encoder in the previous cycle.

[0141] Because the present invention employs a master-slave coupling control device, the synchronization between the spindle motor and the Z-axis motor is improved, which reduces the distance error of the Z-axis movement after the spindle has moved a given distance. This solves the problem of poor accuracy of the Z-axis movement distance, i.e., the rigid tapping depth, thereby improving the accuracy of the rigid tapping machining depth.

[0142] The acquisition unit 102 is further configured to acquire the encoder data of the spindle motor and the encoder data of the Z-axis motor again when the spindle motor drives the Z-axis motor to move forward for rigid tapping to the set tapping depth, and when it is necessary to control the spindle motor to drive the Z-axis motor to move in reverse to exit the tapping. The specific function and processing of this acquisition unit 102 are further described in step S140. Here, the re-acquisition of the encoder data of the spindle motor and the Z-axis motor refers to restarting the acquisition of the encoder data of the spindle motor and the Z-axis motor. Specifically, the encoder data of the spindle motor and the Z-axis motor are acquired in real time before and throughout the entire process of controlling the spindle motor to drive the Z-axis motor to move in reverse to exit the tapping. The encoder data of the spindle motor and the Z-axis motor required during the control process are acquired in real time.

[0143] The control unit 104 is further configured to, after the Z-axis motor reaches the set tapping depth and both the spindle motor and the Z-axis motor stop, control the spindle motor to drive the Z-axis motor in reverse motion to exit the tapping process. During the process of controlling the spindle motor to drive the Z-axis motor in reverse motion to exit the tapping process, master-slave coupling control is performed on the reverse motion process of the spindle motor and the Z-axis motor based on the encoder data of the spindle motor and the Z-axis motor, which are acquired again. Here, "reverse" refers to the direction opposite to the forward direction. The specific functions and processing of this control unit 104 are further described in step S150.

[0144] Specifically, such as Figure 6 As shown, the master-slave coupling control device for rigid tapping proposed in this invention further includes: step 16, after the rigid tapping reaches the specified depth, acquiring encoder data of the spindle motor and Z-axis motor; when the encoder data no longer changes in the current cycle and the previous cycle, it indicates that the spindle motor and Z-axis motor have stopped, and then step 17 is executed. In this invention, when the spindle and Z-axis reach the machining point and the machining depth point, the spindle and Z-axis encoder data are acquired, and the spindle and Z-axis are waited for to stop to ensure that the set machining point or machining depth point is reached.

[0145] Step 17: After the rigid tapping reaches the set depth and the spindle motor and Z-axis motor have stopped, control the spindle motor and Z-axis motor to move in opposite directions to exit the tapping process. The exiting tapping process also employs the same method... Figure 7 The master-slave coupling control scheme shown is used to exit tapping control.

[0146] The present invention proposes a rigid tapping master-slave coupling control device for CNC machine tools. Based on the master-slave control of the spindle motor and the Z-axis motor, the feed rate of the spindle is adjusted in reverse according to the synchronization difference between the spindle motor and the Z-axis motor. This solves the problem of poor synchronization between the spindle motor and the Z-axis motor during tapping, thereby improving the synchronization between the spindle motor and the Z-axis motor, reducing thread machining errors (i.e., reducing tapping depth errors), and thus improving the pass rate of machined parts.

[0147] In some embodiments, the control unit 104, during the process of controlling the spindle motor to drive the Z-axis motor to reverse and exit the tapping operation, performs master-slave coupling control on the reverse movement process of the spindle motor driving the Z-axis motor based on the encoder data of the spindle motor and the Z-axis motor that are acquired again, including:

[0148] The control unit 104 is further configured to determine, based on the set speed of the spindle motor, the feed speed of the Z-axis motor, and the set tapping depth, the total distance the spindle motor needs to move in the reverse direction to perform rigid tapping, and denoted as the total reverse movement distance of the spindle motor. The control unit 104 then controls the spindle motor to move in the reverse direction according to this total reverse movement distance. The specific functions and processing of this control unit 104 are further described in step S410.

[0149] The control unit 104 is further configured to determine the feed amount of the Z-axis motor based on the encoder data of the spindle motor during the forward movement of the spindle motor; and to control the Z-axis motor to move upward according to the feed amount of the Z-axis motor. The specific functions and processing of this control unit 104 are further described in step S420.

[0150] The control unit 104 is further configured to determine the synchronization error between the main spindle motor and the Z-axis motor based on the encoder data of the main spindle motor and the encoder data of the Z-axis motor during the upward movement of the Z-axis motor. The specific functions and processing of this control unit 104 are further described in step S430.

[0151] The control unit 104 is further configured to determine the rotation amount of the spindle motor in the current cycle based on the synchronization error between the spindle motor and the Z-axis motor. And based on the rotation amount of the spindle motor in the current cycle, it determines the feed amount of the Z-axis motor in the current cycle. The specific functions and processing of this control unit 104 are further described in step S440.

[0152] The control unit 104 is further configured to control the spindle motor to continue its reverse motion based on the rotation amount of the spindle motor in the current cycle, and to control the Z-axis motor to continue its upward motion based on the feed amount of the Z-axis motor in the current cycle. The specific functions and processing of this control unit 104 are further described in step S450.

[0153] The control unit 104 is further configured to cycle in this manner until the spindle motor drives the Z-axis motor to move in the opposite direction to complete the tapping process. The specific functions and processing of the control unit 104 are further described in step S460.

[0154] Specifically, such as Figure 6 As shown, the rigid tapping master-slave coupling control device proposed in the present invention further includes: in step 17, the specific process of exiting the tapping master-slave coupling control can be found in the following exemplary description.

[0155] See Figure 7 In the example shown, step 17, the process of exiting tapping control includes:

[0156] Step 31: Based on the obtained Z-axis feed rate, spindle set speed, tapping depth, and other data, calculate the total distance the spindle needs to travel when exiting tapping, and then proceed to step 32. The formula for calculating the total distance the spindle needs to travel when exiting tapping in step 31 is as follows:

[0157] Sup=2×π×Deep×SpindleSpeed÷dF.

[0158] Where Sup is the total distance the spindle needs to travel when exiting tapping, π is pi, Deep is the tapping depth, SpindleSpeed ​​is the spindle speed setting, and dF is the Z-axis feed rate.

[0159] Step 32: Control the spindle motor to move in the reverse direction based on the total distance Sup that the spindle needs to travel when tapping exits. While controlling the spindle motor to move in the reverse direction, acquire the feedback data of the spindle motor (i.e., spindle feedback data), that is, acquire the feedback data of the actual position of the spindle motor. Based on the feedback data of the actual position of the spindle motor, calculate the feed amount of the Z-axis motor in the current cycle, and control the Z-axis to move upward. Then, execute step 33.

[0160] Step 33: While controlling the Z-axis upward movement, acquire the feedback data of the Z-axis motor (i.e., Z-axis feedback data). Based on the spindle feedback data and the Z-axis feedback data, calculate the synchronization error between the spindle motor and the Z-axis motor, and then proceed to step 34. In step 33, the formula for calculating the synchronization error between the spindle motor and the Z-axis motor is as follows:

[0161] feedback=dF×deltaSpindlePos÷SpindleSpeed-deltaZPos.

[0162] Among them, feedback is the synchronization error between the spindle motor and the Z-axis motor, deltaSpindlePos is the difference between the actual position of the spindle motor encoder in the current cycle and the actual position of the encoder in the previous cycle, SpindleSpeed ​​is the spindle set speed, dF is the Z-axis feed speed, and deltaZPos is the difference between the actual position of the Z-axis motor encoder in the current cycle and the actual position of the encoder in the previous cycle.

[0163] Step 34: Based on the synchronization error between the spindle motor and the Z-axis motor, calculate the rotation amount of the spindle motor in the current cycle and the feed amount of the Z-axis motor in the current cycle.

[0164] In step 34, the formula for calculating the rotational amount of the spindle motor in the current cycle is as follows:

[0165] Spindle_Input=disp-kscale×2×π×feedback×SpindleSpeed÷dF.

[0166] Where Spindle_Input is the spindle rotation amount in the current cycle, and disp is the given distance of the spindle in the current cycle. kscale is the adjustment coefficient of the master-slave coupling control algorithm. π is pi. SpindleSpeed ​​is the set speed of the spindle. dF is the Z-axis feed speed. feedback is the synchronization error between the spindle motor and the Z-axis motor.

[0167] In step 34, the formula for calculating the Z-axis motor feed rate for the current cycle is as follows:

[0168] Z_Input=dF×deltaSpindlePos÷SpindleSpeed.

[0169] Where Z_Input is the Z-axis motor feed amount for the current cycle, SpindleSpeed ​​is the spindle set speed, dF is the Z-axis feed speed, and deltaSpindlePos is the difference between the actual position of the spindle motor encoder in the current cycle and the actual position of the encoder in the previous cycle.

[0170] As can be seen, the master-slave coupling control scheme proposed in this invention can be used in the control of rigid tapping and tapping retraction after rigid tapping on CNC machine tools. When used in CNC machine tool tapping retraction, tapping retraction occurs when the tap breaks during tapping, or when an emergency stop or reset is pressed, causing the tap to become embedded in the workpiece. When the CNC machine tool supports tapping retraction, the tap can be pulled out.

[0171] Because the present invention employs a master-slave coupling control device, the synchronization between the spindle motor and the Z-axis motor is improved, resulting in reduced thread error and meeting the requirements for high-precision, rigid tapping of parts. The improved synchronization between the spindle motor and the Z-axis motor also ensures more uniform force on the tool mounted on the spindle, thereby reducing the risk of tool breakage.

[0172] Since the processing and functions implemented by the device in this embodiment are basically the same as the embodiments, principles and examples of the aforementioned methods, any details not covered in the description of this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.

[0173] The technical solution of this invention addresses the tapping and tapping exit processes of a CNC machine tool. During the tapping process, after the spindle motor drives the Z-axis motor to reach the machining plane of the workpiece, the spindle motor is oriented and the starting angle of the tap is determined. Based on feedback data of the actual positions of the spindle motor and the Z-axis motor, the synchronization error between them is determined. This synchronization error is used to determine the rotation amount of the spindle motor and the feed amount of the Z-axis motor. Tapping is then performed based on the determined rotation amount and feed amount of the spindle motor. The tapping process continues until the specified depth of the workpiece is reached, and... After the spindle motor and Z-axis motor have stopped, they are controlled to move in opposite directions to exit the tapping process. During the exit, the synchronization error between the spindle motor and Z-axis motor is determined based on the feedback data of their actual positions. The rotation amount of the spindle motor and the feed amount of the Z-axis motor are then determined based on this synchronization error. The tapping process is then exited based on the determined rotation amount of the spindle motor and the feed amount of the Z-axis motor. This improves the synchronization between the spindle motor and Z-axis motor, reduces the error of the machined thread, and meets the requirements for high-precision rigid tapping of parts.

[0174] According to an embodiment of the present invention, a CNC machine tool corresponding to a rigid tapping control device is also provided. The CNC machine tool may include the rigid tapping control device described above.

[0175] Since the processing and functions implemented by the CNC machine tool in this embodiment are basically the same as the embodiments, principles and examples of the aforementioned device, any details not covered in the description of this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.

[0176] The technical solution of this invention addresses the tapping and tapping exit processes of a CNC machine tool. During the tapping process, after the spindle motor drives the Z-axis motor to reach the machining plane of the workpiece, the spindle motor is oriented and the starting angle of the tap is determined. Based on feedback data of the actual positions of the spindle motor and the Z-axis motor, the synchronization error between them is determined. This synchronization error is used to determine the rotation amount of the spindle motor and the feed amount of the Z-axis motor. Tapping is then performed based on the determined rotation amount and feed amount of the spindle motor and the Z-axis motor. The tapping process continues until the tap reaches the workpiece's... After the tapping depth is determined and the spindle motor and Z-axis motor have stopped, the spindle motor and Z-axis motor are controlled to move in opposite directions to exit the tapping process. During the exiting tapping process, the synchronization error between the spindle motor and Z-axis motor is determined based on the feedback data of the actual position of the spindle motor and the actual position of the Z-axis motor. The rotation amount of the spindle motor and the feed amount of the Z-axis motor are determined based on the determined rotation amount of the spindle motor and the feed amount of the Z-axis motor. This process of exiting the tapping process solves the problem of poor accuracy of the Z-axis movement distance, i.e., the rigid tapping depth, thereby improving the accuracy of the rigid tapping machining depth.

[0177] According to an embodiment of the present invention, a storage medium corresponding to the rigid tapping control method is also provided, the storage medium including a stored program, wherein the program controls the device where the storage medium is located to execute the rigid tapping control method described above when it is running.

[0178] Since the processing and functions implemented by the storage medium in this embodiment are basically the same as the embodiments, principles and examples of the aforementioned methods, any details not covered in this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.

[0179] The technical solution of this invention addresses the tapping and tapping exit processes of a CNC machine tool. During the tapping process, after the spindle motor drives the Z-axis motor to reach the machining plane of the workpiece, the spindle motor is oriented and the starting angle of the tap is determined. Based on feedback data of the actual positions of the spindle motor and the Z-axis motor, the synchronization error between them is determined. This synchronization error is used to determine the rotation amount of the spindle motor and the feed amount of the Z-axis motor. Tapping is then performed based on the determined rotation amount and feed amount of the spindle motor. The tapping process continues until the specified depth of the workpiece is reached, and the main... After the spindle motor and Z-axis motor have stopped, control the spindle motor and Z-axis motor to move in opposite directions to exit the tapping process. During the exiting tapping process, the synchronization error between the spindle motor and Z-axis motor is determined based on the feedback data of the actual position of the spindle motor and the Z-axis motor at this time. The rotation amount of the spindle motor and the feed amount of the Z-axis motor are determined based on this synchronization error. The tapping is exited based on the determined rotation amount of the spindle motor and the feed amount of the Z-axis motor. This improves the synchronization of the spindle motor and Z-axis motor, reduces thread machining error (i.e., reduces tapping depth error), and thus improves the pass rate of machined parts.

[0180] In summary, it is readily understood by those skilled in the art that, without conflict, the aforementioned advantageous methods can be freely combined and superimposed.

[0181] The above description is merely an embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of the claims of the present invention.

Claims

1. A rigid tapping control method for a CNC machine tool, characterized in that, The CNC machine tool has a spindle motor and a Z-axis motor; the rigid tapping control method of the CNC machine tool includes: When rigid tapping is required on a workpiece to be tapped, the spindle motor is controlled to drive the Z-axis motor to a set R-plane, and the tapping start angle of the CNC machine tool is determined. This includes: upon receiving a tapping command for tapping the workpiece to be tapped, determining the set tapping information carried by the tapping command; the set tapping information includes: the set speed of the spindle motor, the feed speed of the Z-axis motor, the set tapping depth, and the set R-plane. After the spindle motor drives the Z-axis motor to reach the set R plane, when it is necessary to control the spindle motor to drive the Z-axis motor to move forward for rigid tapping, the encoder data of the spindle motor and the encoder data of the Z-axis motor are acquired. Based on the tapping start angle of the CNC machine tool, the spindle motor is controlled to drive the Z-axis motor in forward motion for rigid tapping. During this process, the spindle motor drives the Z-axis motor in forward motion for rigid tapping. Based on the encoder data of the spindle motor and the Z-axis motor, master-slave coupling control is performed on the forward motion of the spindle motor and the Z-axis motor. This includes: determining the total distance the spindle motor needs to move when driving the Z-axis motor in forward motion for rigid tapping based on the set speed of the spindle motor, the feed speed of the Z-axis motor, and the set tapping depth; recording this as the total forward motion distance of the spindle motor; and controlling the forward motion of the spindle motor according to this total forward motion distance. During the forward motion of the spindle motor, the encoder data of the spindle motor is used to... The feed amount of the Z-axis motor is determined; and the Z-axis motor is controlled to move downward according to the feed amount; during the downward movement of the Z-axis motor, the synchronization error between the main spindle motor and the Z-axis motor is determined based on the encoder data of the main spindle motor and the Z-axis motor; based on the synchronization error between the main spindle motor and the Z-axis motor, the rotation amount of the main spindle motor in the current cycle is determined; and based on the rotation amount of the main spindle motor in the current cycle, the feed amount of the Z-axis motor in the current cycle is determined; based on the rotation amount of the main spindle motor in the current cycle, the main spindle motor is controlled to continue moving forward; and the Z-axis motor is controlled to continue moving downward according to the feed amount of the Z-axis motor in the current cycle; this cycle is repeated until the main spindle motor drives the Z-axis motor to move forward to perform rigid tapping to the set tapping depth of the Z-axis motor; When the spindle motor drives the Z-axis motor to move forward to perform rigid tapping to the set tapping depth of the Z-axis motor, and it is necessary to control the spindle motor to drive the Z-axis motor to move in reverse to exit the tapping, the encoder data of the spindle motor and the encoder data of the Z-axis motor are acquired again. After the Z-axis motor reaches its set tapping depth and both the spindle motor and the Z-axis motor stop, the spindle motor is controlled to drive the Z-axis motor in reverse to exit the tapping process. During the process of controlling the spindle motor to drive the Z-axis motor in reverse to exit the tapping process, the reverse movement of the spindle motor and the Z-axis motor is controlled by master-slave coupling based on the encoder data of the spindle motor and the Z-axis motor that are acquired again.

2. The rigid tapping control method according to claim 1, characterized in that, In cases where rigid tapping is required on a workpiece to be tapped, controlling the spindle motor to drive the Z-axis motor to reach a set R-plane and determining the starting angle for tapping on the CNC machine tool also includes: Based on the set speed of the spindle motor and the feed speed of the Z-axis motor, the spindle motor is controlled to drive the Z-axis motor to reach the set R plane; After the Z-axis motor reaches the set R plane and both the spindle motor and the Z-axis motor stop, the spindle motor is oriented to determine the tapping start angle of the CNC machine tool. Based on the tapping start angle of the CNC machine tool, the spindle motor is controlled to drive the Z-axis motor to move forward for rigid tapping.

3. The rigid tapping control method according to claim 1 or 2, characterized in that, During the process of controlling the spindle motor to drive the Z-axis motor to move in the reverse direction to exit the tapping operation, based on the encoder data of the spindle motor and the Z-axis motor acquired again, the reverse movement process of the spindle motor driving the Z-axis motor is subjected to master-slave coupling control, which further includes: Based on the set speed of the spindle motor, the feed speed of the Z-axis motor, and the set tapping depth, determine the total distance the spindle motor needs to move when it drives the Z-axis motor to move in the opposite direction for rigid tapping, and record it as the total reverse movement distance of the spindle motor; and control the spindle motor to move in the opposite direction according to the total reverse movement distance of the spindle motor. During the forward movement of the main spindle motor, the feed amount of the Z-axis motor is determined based on the encoder data of the main spindle motor; and the Z-axis motor is controlled to move upward according to the feed amount of the Z-axis motor. During the upward movement of the Z-axis motor, the synchronization error between the main spindle motor and the Z-axis motor is determined based on the encoder data of the main spindle motor and the encoder data of the Z-axis motor. Based on the synchronization error between the spindle motor and the Z-axis motor, the rotation amount of the spindle motor in the current cycle is determined; and based on the rotation amount of the spindle motor in the current cycle, the feed amount of the Z-axis motor in the current cycle is determined. Based on the rotation amount of the spindle motor in the current cycle, control the spindle motor to continue moving in the reverse direction; and based on the feed amount of the Z-axis motor in the current cycle, control the Z-axis motor to continue moving upward. This process is repeated until the spindle motor drives the Z-axis motor to move in the opposite direction to exit the tapping operation and complete the tapping process.

4. A rigid tapping control device that uses the rigid tapping control method as described in claim 1 to achieve rigid tapping control, characterized in that, The CNC machine tool has a spindle motor and a Z-axis motor; the rigid tapping control device of the CNC machine tool includes: The control unit is configured to control the spindle motor to drive the Z-axis motor to a set R-plane and determine the tapping start angle of the CNC machine tool when rigid tapping is required on the workpiece to be tapped. The acquisition unit is configured to acquire encoder data of the spindle motor and encoder data of the Z-axis motor after the spindle motor drives the Z-axis motor to reach the set R plane, when it is necessary to control the spindle motor to drive the Z-axis motor to move forward for rigid tapping; The control unit is configured to control the spindle motor to drive the Z-axis motor to move forward for rigid tapping based on the tapping start angle of the CNC machine tool; during the process of controlling the spindle motor to drive the Z-axis motor to move forward for rigid tapping, the control unit performs master-slave coupling control on the forward movement process of the spindle motor driving the Z-axis motor according to the encoder data of the spindle motor and the encoder data of the Z-axis motor. The acquisition unit is further configured to acquire the encoder data of the main spindle motor and the encoder data of the Z-axis motor again when the main spindle motor drives the Z-axis motor to move forward to perform rigid tapping and reach the set tapping depth of the Z-axis motor, and when it is necessary to control the main spindle motor to drive the Z-axis motor to move in reverse to exit the tapping. The control unit is further configured to, after the Z-axis motor reaches the set tapping depth of the Z-axis motor and both the spindle motor and the Z-axis motor stop, control the spindle motor to drive the Z-axis motor to move in the opposite direction to exit the tapping process; during the process of controlling the spindle motor to drive the Z-axis motor to move in the opposite direction to exit the tapping process, perform master-slave coupling control on the reverse movement process of the spindle motor driving the Z-axis motor based on the encoder data of the spindle motor and the encoder data of the Z-axis motor that are acquired again.

5. The rigid tapping control device according to claim 4, characterized in that, The control unit, when rigid tapping of a workpiece requires, controls the spindle motor to drive the Z-axis motor to a set R-plane and determines the starting angle for tapping on the CNC machine tool, including: Upon receiving a tapping command for tapping a workpiece to be tapped, the set tapping information carried by the tapping command is determined; the set tapping information includes: the set speed of the spindle motor, the feed speed of the Z-axis motor, the set tapping depth, and the set R-plane. Based on the set speed of the spindle motor and the feed speed of the Z-axis motor, the spindle motor is controlled to drive the Z-axis motor to reach the set R plane; After the Z-axis motor reaches the set R plane and both the spindle motor and the Z-axis motor stop, the spindle motor is oriented to determine the tapping start angle of the CNC machine tool. Based on the tapping start angle of the CNC machine tool, the spindle motor is controlled to drive the Z-axis motor to move forward for rigid tapping.

6. The rigid tapping control device according to claim 4 or 5, characterized in that, During the process of controlling the spindle motor to drive the Z-axis motor in forward motion for rigid tapping, the control unit, based on the acquired encoder data of the spindle motor and the Z-axis motor, performs master-slave coupling control on the forward motion process of the spindle motor driving the Z-axis motor, including: Based on the set speed of the spindle motor, the feed speed of the Z-axis motor, and the set tapping depth, determine the total distance the spindle motor needs to move when it drives the Z-axis motor to move forward for rigid tapping, and record it as the total forward movement distance of the spindle motor; and control the forward movement of the spindle motor according to the total forward movement distance of the spindle motor. During the forward movement of the main spindle motor, the feed amount of the Z-axis motor is determined based on the encoder data of the main spindle motor; and the Z-axis motor is controlled to move downward according to the feed amount of the Z-axis motor. During the downward movement of the Z-axis motor, the synchronization error between the main spindle motor and the Z-axis motor is determined based on the encoder data of the main spindle motor and the encoder data of the Z-axis motor. Based on the synchronization error between the spindle motor and the Z-axis motor, the rotation amount of the spindle motor in the current cycle is determined; and based on the rotation amount of the spindle motor in the current cycle, the feed amount of the Z-axis motor in the current cycle is determined. Based on the rotation amount of the spindle motor in the current cycle, control the spindle motor to continue moving forward; and based on the feed amount of the Z-axis motor in the current cycle, control the Z-axis motor to continue moving downward. This process is repeated until the spindle motor drives the Z-axis motor to move forward and perform rigid tapping to the set tapping depth of the Z-axis motor.

7. The rigid tapping control device according to claim 4 or 5, characterized in that, The control unit, during the process of controlling the spindle motor to drive the Z-axis motor to move in the reverse direction to exit the tapping operation, performs master-slave coupling control on the reverse movement process of the spindle motor driving the Z-axis motor based on the encoder data of the spindle motor and the Z-axis motor that are acquired again, including: Based on the set speed of the spindle motor, the feed speed of the Z-axis motor, and the set tapping depth, determine the total distance the spindle motor needs to move when it drives the Z-axis motor to move in the opposite direction for rigid tapping, and record it as the total reverse movement distance of the spindle motor; and control the spindle motor to move in the opposite direction according to the total reverse movement distance of the spindle motor. During the forward movement of the main spindle motor, the feed amount of the Z-axis motor is determined based on the encoder data of the main spindle motor; and the Z-axis motor is controlled to move upward according to the feed amount of the Z-axis motor. During the upward movement of the Z-axis motor, the synchronization error between the main spindle motor and the Z-axis motor is determined based on the encoder data of the main spindle motor and the encoder data of the Z-axis motor. Based on the synchronization error between the spindle motor and the Z-axis motor, the rotation amount of the spindle motor in the current cycle is determined; and based on the rotation amount of the spindle motor in the current cycle, the feed amount of the Z-axis motor in the current cycle is determined. Based on the rotation amount of the spindle motor in the current cycle, control the spindle motor to continue moving in the reverse direction; and based on the feed amount of the Z-axis motor in the current cycle, control the Z-axis motor to continue moving upward. This process is repeated until the spindle motor drives the Z-axis motor to move in the opposite direction to exit the tapping operation and complete the tapping process.

8. A CNC machine tool, characterized in that, include: The rigid tapping control device as described in any one of claims 4 to 7.

9. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, it controls the device containing the storage medium to perform the rigid tapping control method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Control system of milling machine

    US20120306420A1

  • Apparatus for confirming movement of tap when rigid tapping

    US5062744A