Control system and method for PCB numerical control drilling

By using a three-stage speed control system for the spindle Z-axis, safe switching of PCB CNC drilling was achieved, solving the problem of balancing efficiency and safety in traditional strategies and improving both processing efficiency and safety.

CN121806709AInactive Publication Date: 2026-04-07JIAN COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-04-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional Z-axis control strategies for PCB CNC drilling struggle to balance idle efficiency and processing safety, leading to increased non-productive travel time and drill bit impact risk, thus affecting processing efficiency and cost.

Method used

The spindle adopts a three-stage speed control system for the Z-axis. By accurately calculating the inertial braking distance and safety margin, the safe switching height is determined, achieving smooth speed switching. Combined with the retraction speed coefficient, the retraction process is optimized to ensure machining safety and efficiency.

Benefits of technology

While ensuring safety, it significantly improves drilling efficiency, reduces non-cutting idle time, avoids drill bit impact risk, and increases machining cycle time and tool life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121806709A_ABST
    Figure CN121806709A_ABST
Patent Text Reader

Abstract

The invention provides a control system and method for PCB numerical control drilling, and the method comprises the steps: determining the feeding section speed of a numerical control machine tool through the rotating speed of a main shaft of the numerical control machine tool and the feeding amount per revolution, and determining the safety switching height of the surface drilling speed switching of a target PCB according to the inertia braking distance and the safety margin of the high-speed section speed of the numerical control machine tool; after the Z-axis driving mechanism is controlled to descend to the safe switching height at the high-speed section speed, the Z-axis driving mechanism is switched to the feeding section speed to complete drilling feeding, and the drilling return speed coefficient of the Z-axis driving mechanism is determined based on the drilling depth information of the Z-axis driving mechanism and the plate parameters; determining a rollback section speed of lifting to the safe height according to the rollback speed coefficient, the high-speed section speed and the feeding section speed; and after the drilled hole reaches the preset hole position depth of the target PCB, the Z-axis driving mechanism is controlled to lift the main shaft to the safe height at the speed of the rollback section. Based on the scheme, safe switching of the three-stage speeds of the main shaft and the Z shaft in PCB numerical control drilling can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of CNC drilling technology, and more specifically, to a control system and method for CNC drilling of PCBs. Background Technology

[0002] Printed circuit boards (PCBs) are a core component of the electronics industry, serving as substrates for mechanical support and electrical connection of electronic components. Their surfaces are patterned to create conductive lines and pads, enabling the interconnection of chips, resistors, capacitors, and other components within predetermined circuits. Modern PCBs employ a laminated structure, using insulating layers to isolate multiple layers of copper foil traces, meeting the demands of high-density wiring.

[0003] Traditional Z-axis control strategies for PCB CNC drilling present a technical contradiction between balancing idle efficiency and machining safety. To mitigate risk, control systems typically employ conservative strategies: one is to use a single, limited, low speed throughout the entire idle descent phase; the other is to prematurely switch from high-speed idle to cutting feed rate. Both strategies directly lead to a significant increase in the non-productive movement time of the drill bit, reducing the overall machine cycle time. Conversely, blindly increasing the idle descent speed to improve efficiency results in a longer deceleration distance due to the inertia of the Z-axis drive mechanism and system response delay. This can easily lead to insufficient braking, causing the drill bit to impact the PCB surface at excessive speed. This not only damages the expensive drill bit and workpiece, generating scrap, but may also cause irreversible damage to the spindle accuracy, severely restricting further improvements in machining efficiency and optimization of production costs. Therefore, achieving safe switching of the three-stage Z-axis speed in PCB CNC drilling to improve machining efficiency has become a challenge for the industry. Summary of the Invention

[0004] This application provides a control system and method for CNC drilling of PCBs, which can realize the safe switching of the three-stage speed of the spindle Z-axis in CNC drilling of PCBs, thereby improving the processing efficiency of PCB drilling.

[0005] In a first aspect, this application provides a control method for CNC drilling of PCBs, including: The CNC instructions on the PCB board are used to control the X and Y axis motion platforms of the CNC machine tool to move the spindle above the current target hole position on the PCB board, and control the Z axis drive mechanism to keep the spindle at a safe height. The high-speed section speed of the CNC machine tool is obtained from the CNC instructions. The feed section speed of the CNC machine tool is determined by the spindle speed and feed per revolution. The safe switching height for switching the drilling speed on the target PCB board surface is determined based on the inertial braking distance and safety margin of the high-speed section speed. After the Z-axis drive mechanism descends to the safe switching height at the high-speed section speed, it switches to the feed section speed to complete the drilling feed. Based on the drilling depth information of the Z-axis drive mechanism and the plate parameters, the retraction speed coefficient of the Z-axis drive mechanism is determined. The retraction speed to rise to the safe height is determined by the retraction speed coefficient, the high-speed section speed and the feed section speed. After drilling reaches the preset hole depth on the target PCB board, the Z-axis drive mechanism is controlled to raise the spindle to the safe height at the retraction speed.

[0006] In some embodiments, determining the feed rate of a CNC machine tool by using the spindle speed and feed per revolution specifically includes: Obtain the feed per revolution of the drill bit selected for the current hole to be machined from the process parameter database; Obtain the current set spindle speed from the CNC commands; The feed rate of the CNC machine tool is determined by the feed per revolution and the currently set rotational speed.

[0007] In some embodiments, determining the safe switching height for switching drilling speeds on the target PCB board surface based on the inertial braking distance and safety margin of the high-speed segment specifically includes: Based on the maximum deceleration of the Z-axis drive mechanism of the CNC machine tool and the system response time, calculate the inertial braking distance required to smoothly decelerate from the high-speed section speed to the feed section speed; Set a safety margin to compensate for the flatness error of the target PCB board, the clamping error, and the random error of the control unit; The safe switching height for switching drilling speeds on the target PCB board surface is determined by the inertial braking distance and the safety margin.

[0008] In some embodiments, determining the retraction speed coefficient of the Z-axis drive mechanism based on the drilling depth information and plate parameters specifically includes: The current drilling depth of the Z-axis drive mechanism is obtained from the drilling depth information in the CNC commands; Query the chip removal difficulty level of the target PCB board based on the type of the target PCB board; The retraction speed coefficient of the Z-axis drive mechanism is obtained from the mapping rule of the retraction speed coefficient based on the current drilling depth and the chip removal difficulty level.

[0009] In some embodiments, determining the retraction speed to the safe height using the retraction speed coefficient, the high-speed section speed, and the feed section speed specifically includes: The basic retraction speed is determined based on the feed speed and the retraction speed coefficient. The base retraction speed is compared with the high-speed section speed to obtain the retraction section speed for raising to the safe height.

[0010] In some embodiments, the speed of the high-speed section is greater than the speed of the feed section.

[0011] In some embodiments, the speed of the retraction section is greater than the speed of the feed section.

[0012] Secondly, this application provides a control system for CNC drilling of PCBs, comprising: The initialization module is used to control the X-axis and Y-axis motion platforms of the CNC machine tool with the CNC instructions of the PCB board to move the spindle above the current target hole position on the PCB board, and to control the Z-axis drive mechanism to keep the spindle at a safe height. The processing module is used to obtain the high-speed section speed of the CNC machine tool from the CNC instructions, determine the feed section speed of the CNC machine tool through the spindle speed and feed per revolution, and determine the safe switching height for switching the drilling speed on the target PCB board surface based on the inertial braking distance and safety margin of the high-speed section speed. The processing module is also used to control the Z-axis drive mechanism to descend to the safe switching height at the high-speed section speed, and then switch to the feed section speed to complete the drilling feed. Based on the drilling depth information of the Z-axis drive mechanism and the plate parameters, the retraction speed coefficient of the Z-axis drive mechanism is determined. The retraction speed to rise to the safe height is determined by the retraction speed coefficient, the high-speed section speed and the feed section speed. The execution module is used to control the Z-axis drive mechanism to raise the spindle to the safe height at the retraction speed after the drilling reaches the preset hole depth of the target PCB board.

[0013] Thirdly, this application provides a computer device, the computer device including a memory and a processor, the memory for storing a computer program, and the processor for calling and running the computer program from the memory, so that the computer device performs the above-described control method for CNC drilling of PCB.

[0014] Fourthly, this application provides a computer-readable storage medium storing instructions or code that, when executed on a computer, cause the computer to implement the aforementioned control method for CNC drilling of PCBs.

[0015] The technical solutions provided by the embodiments disclosed in this application have the following beneficial effects: This application provides a control system and method for CNC drilling of PCBs. The system uses CNC commands from the PCB board to control the X-axis and Y-axis motion platforms of a CNC machine tool, moving the spindle above the target hole position on the PCB board. It also controls the Z-axis drive mechanism to keep the spindle at a safe height. The system obtains the high-speed range of the CNC machine tool from the CNC commands, determines the feed rate of the CNC machine tool based on the spindle speed and feed per revolution, and determines the target PCB board surface drilling speed switching based on the inertial braking distance and safety margin of the high-speed range. Safe switching height; after the Z-axis drive mechanism descends to the safe switching height at the high-speed segment speed, it switches to the feed segment speed to complete the drilling feed. Based on the drilling depth information of the Z-axis drive mechanism and the board parameters, the retraction speed coefficient of the Z-axis drive mechanism is determined. The retraction segment speed to raise to the safe height is determined by the retraction speed coefficient, the high-speed segment speed, and the feed segment speed. After the drilling reaches the preset hole depth of the target PCB board, the Z-axis drive mechanism is controlled to raise the spindle to the safe height at the retraction segment speed.

[0016] Therefore, in this application, after drilling reaches the preset hole depth on the target PCB board, the Z-axis drive mechanism is controlled to raise the spindle to the safe height at the retraction speed. First, determining the safe switching height yields the optimal speed switching point based on dynamic characteristics and process safety requirements, thus significantly improving idle motion efficiency while ensuring processing safety. This height parameter, through precise calculation of the inertial braking distance at high speed and the addition of a safety margin, achieves a smooth transition of the Z-axis drive mechanism from high-speed idle motion to low-speed cutting feed, effectively avoiding wasted idle time due to premature speed switching or drill bit impact risk due to delayed switching. By establishing a precise match between the speed switching position and the system braking capability, the collision hazard between the spindle and the board surface is eliminated, ensuring the safety of the processing process; and the non-cutting idle travel time is compressed to a theoretical minimum, thus laying the foundation for improving the cycle time efficiency of drilling processing while ensuring safety. This lays the foundation; then, by determining the retraction speed, a dynamic retraction strategy adaptable to different working conditions can be obtained, thereby maximizing retraction efficiency while ensuring process reliability. The retraction speed coefficient comprehensively considers the impact of drilling depth and chip removal difficulty on machining, and intelligently couples it with the feed speed and high-speed speed to ensure that a higher retraction speed is used when machining deep holes or materials with difficult chip removal, so as to effectively remove residual chips in the hole by utilizing centrifugal force and prevent chip blockage leading to drill wear or needle breakage. At the same time, by comparing it with the high-speed speed and taking the larger value, it is ensured that the retraction speed is not lower than the idle travel speed under any working condition, thereby minimizing the time taken for the spindle to return to the safe height. Thus, while maintaining machining reliability and tool life, optimal control of the retraction process time can be achieved. In summary, based on the above scheme, the safe switching of the three-stage speed of the spindle Z-axis in PCB CNC drilling can be realized, thereby improving the machining efficiency of PCB drilling. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is an exemplary flowchart of a control method for CNC drilling of PCBs according to some embodiments of this application; Figure 2 This is a flowchart illustrating the process of determining the rollback speed coefficient according to some embodiments of this application; Figure 3 This is a schematic diagram of the structure of a control system for CNC drilling of PCBs according to some embodiments of this application; Figure 4 This is a schematic diagram of the structure of a computer device for implementing a control method for CNC drilling of PCBs, according to some embodiments of this application. Detailed Implementation

[0019] To better understand the technical solution of this application, the technical solution of this application will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0020] refer to Figure 1 The figure is an exemplary flowchart of a control method for CNC drilling of PCB according to some embodiments of this application. The control method for CNC drilling of PCB mainly includes the following steps: In step 101, the CNC instructions of the PCB board are used to control the X-axis and Y-axis motion platforms of the CNC machine tool to move the spindle above the current target hole position on the PCB board, and the Z-axis drive mechanism is controlled to keep the spindle at a safe height.

[0021] It should be noted that, in this application, the CNC instructions for the PCB board are digital control programs containing coordinate sequences and machining parameters, used to guide the CNC machine tool to complete a series of drilling operations; the X-axis and Y-axis motion platforms of the CNC machine tool are linear drive mechanisms used to position the spindle and the PCB board relative to each other in the horizontal plane; the spindle is a power head used to clamp and drive the drill bit to perform high-speed rotary cutting operations; the current target PCB board hole position is used to indicate the theoretical position coordinates of the hole to be processed on the PCB board in the design file; the Z-axis drive mechanism is a linear drive mechanism used to control the spindle to perform vertical feed and retraction movements; the safety height is a vertical reference position used to ensure that the bottom drill bit maintains a safe distance from the PCB board surface, fixtures, and other obstacles during the horizontal movement of the spindle.

[0022] In practice, the control unit first parses and executes the CNC instructions from the PCB board of the host computer. These instructions cause the X-axis and Y-axis motion platforms of the CNC machine tool to perform coordinated interpolation movements, thereby accurately moving the spindle fixed on it to a physical position directly above the theoretical coordinates of the current target PCB board hole position. At the same time, the Z-axis drive mechanism is activated according to the instruction parameters, raising the spindle from any lower working position to a pre-set safety height to ensure that there is no risk of interference in subsequent lateral movements. This spindle positioning state is used as the initial ready state for executing the subsequent drilling cycle.

[0023] In step 102, the high-speed segment speed of the CNC machine tool is obtained from the CNC command, the feed segment speed of the CNC machine tool is determined by the spindle speed and feed per revolution, and the safe switching height for switching the drilling speed on the target PCB board surface is determined based on the inertial braking distance and safety margin of the high-speed segment speed.

[0024] In some embodiments, obtaining the high-speed segment speed of the CNC machine tool from the CNC instructions can be achieved in the following manner: With the spindle positioned above the current target PCB board hole and at the safe height, the parameter parsing module of the control unit reads the initial speed command value, pre-encoded and stored in the G-code or M-code parameter field, from the program segment of the currently executing CNC instructions. This speed command value, after being decoded and confirmed by the motion planning unit of the control unit, is directly assigned to the Z-axis drive mechanism for use in the subsequent descent phase. This successfully read and decoded initial speed command value serves as the sole speed reference for controlling the Z-axis drive mechanism to execute the high-speed descent phase, i.e., the high-speed segment speed of the CNC machine tool. The high-speed segment speed is the maximum permissible movement speed used to control the Z-axis drive mechanism to rapidly descend from the safe height to near the PCB board surface.

[0025] In some embodiments, determining the feed rate of a CNC machine tool by using the spindle speed and feed per revolution can be achieved through the following steps: Obtain the feed per revolution of the drill bit selected for the current hole to be machined from the process parameter database; Obtain the current set spindle speed from the CNC commands; The feed rate of the CNC machine tool is determined by the feed per revolution and the currently set rotational speed.

[0026] It should be noted that, in this application, the feed speed is a process parameter used to control the actual moving speed of the Z-axis drive mechanism during the process of the drill bit cutting into and penetrating the PCB board, wherein the high-speed speed is greater than the feed speed; the feed per revolution is a cutting parameter used to define the linear distance the drill bit moves along the feed direction when the spindle rotates once; the current set speed is a command speed value used to control the speed of the spindle rotation.

[0027] In specific implementation, firstly, obtaining the feed per revolution of the drill bit selected for the current hole to be machined from the process parameter database can be achieved in the following way: the data processing module of the control unit initiates a query request to the process parameter database based on the specification identifier of the drill bit selected for the current hole to be machined and the board material information of the PCB, and receives the specific value of the feed per revolution returned by the process parameter database that matches the current machining conditions, and then takes the average of all the specific values ​​as the feed per revolution of the drill bit selected for the current hole to be machined; then, obtaining the current set speed of the spindle from the CNC instructions can be achieved in the following way. The above method is implemented as follows: the instruction parsing module of the control unit reads the specific value of the current set spindle speed from the CNC instruction being executed in real time as the current set spindle speed; finally, the feed rate of the CNC machine tool can be determined by the feed per revolution and the current set spindle speed in the following way: the speed calculation unit of the control unit multiplies the specific value of the feed per revolution with the specific value of the current set spindle speed, and uses the product of this multiplication operation as the feed rate of the CNC machine tool that controls the Z-axis drive mechanism to move in the drilling feed stage.

[0028] In some embodiments, determining the safe switching height for switching drilling speeds on the target PCB board surface based on the inertial braking distance and safety margin of the high-speed segment can be achieved using the following steps: Based on the maximum deceleration of the Z-axis drive mechanism of the CNC machine tool and the system response time, calculate the inertial braking distance required to smoothly decelerate from the high-speed section speed to the feed section speed; Set a safety margin to compensate for the flatness error of the target PCB board, the clamping error, and the random error of the control unit; The safe switching height for switching drilling speeds on the target PCB board surface is determined by the inertial braking distance and the safety margin.

[0029] It should be noted that, in this application, the safety switching height is the absolute vertical coordinate position used to indicate the Z-axis drive mechanism's transition from high-speed to feed speed; the maximum deceleration is a physical characteristic parameter describing the maximum negative acceleration that ensures mechanical stability during braking; the system response time is a performance parameter measuring the time delay experienced from the control unit issuing a deceleration command to the Z-axis drive mechanism beginning to perform effective braking; the inertial braking distance is the distance required for the Z-axis drive mechanism to smoothly transition from high-speed to feed speed when braking at maximum deceleration; and the safety margin is an additional height value used to compensate for the flatness error of the target PCB board, clamping error, and random error of the control unit.

[0030] In specific implementation, firstly, based on the maximum deceleration and system response time of the CNC machine tool's Z-axis drive mechanism, the inertial braking distance required for smooth deceleration from the high-speed segment to the feed segment speed can be calculated in the following way: the motion planning unit of the control unit calls the pre-stored maximum deceleration and system response time of the CNC machine tool's Z-axis drive mechanism, and solves for the specific value of the inertial braking distance required for smooth deceleration from the high-speed segment to the feed segment speed using the calculation formula based on the uniform deceleration motion model, thus obtaining the inertial braking distance; then, a safety margin is set to compensate for the flatness error of the target PCB board, clamping error, and the control unit's following... The machine error can be addressed in the following way: the parameter setting module of the control unit sets a fixed safety margin value based on the known characteristics and historical processing data of the target PCB board, thus obtaining the safety margin; finally, the safe switching height for switching the drilling speed on the target PCB board surface can be determined by the inertial braking distance and the safety margin in the following way: the position calculation unit of the control unit arithmetically adds the specific value of the inertial braking distance to the specific value of the set safety margin, and uses the sum of this arithmetic addition as the final set value of the safe switching height for switching the drilling speed on the target PCB board surface that triggers the speed switching.

[0031] In step 103, after the Z-axis drive mechanism descends to the safe switching height at the high-speed section speed, it switches to the feed section speed to complete the drilling feed. Based on the drilling depth information of the Z-axis drive mechanism and the plate parameters, the retraction speed coefficient of the Z-axis drive mechanism is determined. The retraction speed to rise to the safe height is determined by the retraction speed coefficient, the high-speed section speed, and the feed section speed.

[0032] In some embodiments, after controlling the Z-axis drive mechanism to descend to the safe switching height at the high-speed segment, switching to the feed segment speed to complete the drilling feed can be achieved in the following manner: The motion control unit of the control unit issues a motion command to the Z-axis drive mechanism, first instructing the Z-axis drive mechanism to move downward from the safe height at the high-speed segment speed; the control unit monitors the position feedback of the spindle in real time, and when it detects that the spindle has reached the safe switching height, it immediately issues a dynamic speed switching command to the Z-axis drive mechanism; the Z-axis drive mechanism responds to the command, instantly switching its movement speed from the high-speed segment speed to the feed segment speed, and continues to move downward at this speed, driving the drill bit to perform the operation of cutting into the PCB board and forming a hole, and the complete cutting stroke of the drill bit from contacting the PCB board surface to reaching the preset hole depth is regarded as a complete drilling feed process.

[0033] In some embodiments, the retraction speed coefficient of the Z-axis drive mechanism is determined based on the drilling depth information and plate parameters, with reference to... Figure 2The diagram is a flowchart illustrating the determination of the rollback speed coefficient in some embodiments of this application. In this embodiment, the determination of the rollback speed coefficient can be achieved using the following steps: In step 1031, the current drilling depth of the Z-axis drive mechanism is obtained from the drilling depth information in the CNC command; In step 1032, the chip removal difficulty level of the target PCB board is queried according to the material type of the target PCB board; In step 1033, the retraction speed coefficient of the Z-axis drive mechanism is obtained from the mapping rule of the retraction speed coefficient based on the current drilling depth and the chip removal difficulty level.

[0034] It should be noted that in this application, the retraction speed coefficient is a dimensionless scaling factor that amplifies the baseline retraction speed; the drilling depth information is a processing parameter used to specify the total depth to which the drill bit needs to penetrate into the PCB board; the current drilling depth is a numerical value representing the theoretical vertical distance from the surface of the PCB board to the bottom of the hole to be processed; the board type is a classification identifier that distinguishes the physical and chemical properties of the PCB board substrate and the adhesive; the chip removal difficulty level is a standardized rating parameter used to quantify the difficulty of removing chips during drilling for different board types; and the mapping rule is a preset data relationship table used to establish the correspondence between the current drilling depth, the chip removal difficulty level, and the final speed amplification factor.

[0035] In specific implementation, firstly, obtaining the current drilling depth of the Z-axis drive mechanism from the drilling depth information in the CNC instructions can be achieved in the following way: the parameter parsing module of the control unit reads the parameter value representing the hole depth from the corresponding program segment of the currently executing CNC instructions and directly uses this parameter value as the specific value of the current drilling depth of the Z-axis drive mechanism; then, querying the chip removal difficulty level of the target PCB board based on the board material type can be achieved in the following way: the data processing module of the control unit queries the chip removal difficulty level of the target PCB board based on the board material type identifier obtained from the production task sheet or material code, which is built into the control unit or external data processing module. According to the process parameter table in the database, a specific rating of the chip removal difficulty level uniquely corresponding to the type of sheet is obtained. Finally, the retraction speed coefficient of the Z-axis drive mechanism for drilling can be obtained from the mapping rule of the retraction speed coefficient based on the current drilling depth and the chip removal difficulty level. This can be achieved in the following way: the coefficient calculation unit of the control unit takes the specific value of the current drilling depth and the specific rating of the chip removal difficulty level as joint input conditions, queries the mapping rule of the retraction speed coefficient pre-stored in the control unit, and takes the numerical result retrieved from the mapping rule as the final value of the retraction speed coefficient of the Z-axis drive mechanism for controlling the current drilling retraction action.

[0036] In some embodiments, determining the retraction speed to the safe height using the retraction speed coefficient, the high-speed section speed, and the feed section speed can be achieved through the following steps: The basic retraction speed is determined based on the feed speed and the retraction speed coefficient. The base retraction speed is compared with the high-speed section speed to obtain the retraction section speed for raising to the safe height.

[0037] It should be noted that, in this application, the retraction speed is the moving speed used to control the Z-axis drive mechanism to quickly lift the spindle from the bottom of the hole to a safe height after drilling is completed, and the retraction speed is greater than the feed speed; the basic retraction speed is the initial retraction speed value after amplifying the feed speed.

[0038] In specific implementation, firstly, determining the basic retraction speed based on the feed speed and the retraction speed coefficient can be achieved in the following way: the speed calculation unit of the control unit first performs a multiplication operation, multiplying the specific value of the feed speed by the specific value of the retraction speed coefficient, and using the product of this multiplication operation as the initial value of the basic retraction speed; then, comparing the basic retraction speed with the high-speed speed to obtain the retraction speed for lifting to the safe height can be achieved in the following way: the speed decision unit of the control unit compares the initial value of the basic retraction speed with the specific value of the high-speed speed, and selects the larger of the two values ​​as the final determined value of the retraction speed to be executed, and finally uses the determined value of the retraction speed after this comparison and selection as the final speed command to control the Z-axis drive mechanism to complete the lifting action.

[0039] In step 104, after the drilling reaches the preset hole depth of the target PCB board, the Z-axis drive mechanism is controlled to raise the spindle to the safe height at the retraction speed.

[0040] In some embodiments, after drilling reaches the preset hole depth on the target PCB board, controlling the Z-axis drive mechanism to raise the spindle to the safe height at the retraction speed can be achieved in the following way: the depth monitoring unit of the control unit compares the position feedback signal of the Z-axis drive mechanism with the value of the preset hole depth on the target PCB board. When it is confirmed that the current drilling depth has reached or exceeded the preset hole depth, it immediately sends a drilling completion signal to the motion control unit. After receiving the signal, the motion control unit immediately sends a motion command to the Z-axis drive mechanism, instructing the Z-axis drive mechanism to drive the shaft to make a vertical lifting motion from the bottom of the hole at a determined retraction speed, and continue to move until the spindle reaches the coordinate position of the safe height. Finally, the spindle is stably stopped at the safe height as the formal end of this drilling cycle.

[0041] In another aspect, in some embodiments, this application provides a control system for CNC drilling of PCBs, referencing... Figure 3 The figure is a schematic diagram of the structure of a control system for CNC drilling of PCBs according to some embodiments of this application. The control system for CNC drilling of PCBs includes: an initialization module 201, a processing module 202, and an execution module 203, which are described below: Initialization module 201: In this application, initialization module 201 is mainly used to control the X-axis and Y-axis motion platforms of the CNC machine tool to move the spindle above the current target hole position on the PCB board using CNC instructions from the PCB board, and to control the Z-axis drive mechanism to keep the spindle at a safe height. Processing module 202, in this application, is used to obtain the high-speed section speed of the CNC machine tool from the CNC instructions, determine the feed section speed of the CNC machine tool through the spindle speed and feed per revolution, and determine the safe switching height for switching the drilling speed on the target PCB board surface based on the inertial braking distance and safety margin of the high-speed section speed. It should be noted that the processing module 202 is also used to control the Z-axis drive mechanism to descend to the safe switching height at the high-speed section speed, and then switch to the feed section speed to complete the drilling feed. Based on the drilling depth information of the Z-axis drive mechanism and the plate parameters, the retraction speed coefficient of the Z-axis drive mechanism is determined. The retraction speed to rise to the safe height is determined by the retraction speed coefficient, the high-speed section speed and the feed section speed. The execution module 203 in this application is mainly used to control the Z-axis drive mechanism to raise the spindle to the safe height at the retraction speed after the drilling reaches the preset hole depth of the target PCB board.

[0042] The foregoing has detailed examples of a control system and method for CNC drilling of PCBs provided in the embodiments of this application. It is understood that the corresponding apparatus, in order to achieve the above functions, includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0043] In some embodiments, this application also provides a computer device, the computer device including a memory and a processor, the memory for storing a computer program, and the processor for calling and running the computer program from the memory, so that the computer device performs the above-described control method for CNC drilling of PCBs.

[0044] In some embodiments, reference Figure 4 The dashed lines in the figure indicate that the unit or module is optional. This figure is a structural schematic diagram of a computer device for implementing a control method for CNC drilling of PCBs according to an embodiment of this application. The control method for CNC drilling of PCBs described in the above embodiments can be... Figure 4 The computer device shown is used to implement this, and the computer device includes at least one processor 301, a memory 302 and at least one communication unit 305. The computer device may be a terminal device, a server or a chip.

[0045] Processor 301 can be a general-purpose processor or a special-purpose processor. For example, processor 301 can be a central processing unit (CPU), which can be used to control computer devices, execute software programs, and process data from software programs. The computer device may also include a communication unit 305 for inputting (receiving) and outputting (transmitting) signals.

[0046] For example, the computer device may be a chip, and the communication unit 305 may be the input and / or output circuit of the chip, or the communication unit 305 may be the communication interface of the chip, which may be a component of a terminal device, network device or other device.

[0047] For example, the computer device may be a terminal device or a server, and the communication unit 305 may be a transceiver of the terminal device or the server, or the communication unit 305 may be a transceiver circuit of the terminal device or the server.

[0048] The computer device may include one or more memories 302 storing a program 304. The program 304 can be executed by a processor 301 to generate instructions 303, causing the processor 301 to execute the method described in the above method embodiments according to the instructions 303. Optionally, the memory 302 may also store data (such as a target audit model). Optionally, the processor 301 may also read data stored in the memory 302, which may be stored at the same storage address as the program 304, or it may be stored at a different storage address than the program 304.

[0049] The processor 301 and memory 302 can be configured separately or integrated together, for example, integrated on the system on chip (SOC) of the terminal device.

[0050] It should be understood that each step of the above method embodiment can be completed by hardware logic circuits or software instructions in the processor 301. The processor 301 can be a CPU, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.

[0051] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0052] For example, in some embodiments, this application also provides a computer-readable storage medium storing instructions or code that, when executed on a computer, cause the computer to implement the above-described control method for CNC drilling of PCBs.

[0053] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0054] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A control method for CNC drilling of PCBs, characterized in that, Includes the following steps: The CNC instructions on the PCB board are used to control the X and Y axis motion platforms of the CNC machine tool to move the spindle above the current target hole position on the PCB board, and control the Z axis drive mechanism to keep the spindle at a safe height. The high-speed section speed of the CNC machine tool is obtained from the CNC instructions. The feed section speed of the CNC machine tool is determined by the spindle speed and feed per revolution. The safe switching height for switching the drilling speed on the target PCB board surface is determined based on the inertial braking distance and safety margin of the high-speed section speed. After the Z-axis drive mechanism descends to the safe switching height at the high-speed section speed, it switches to the feed section speed to complete the drilling feed. Based on the drilling depth information of the Z-axis drive mechanism and the plate parameters, the retraction speed coefficient of the Z-axis drive mechanism is determined. The retraction speed to rise to the safe height is determined by the retraction speed coefficient, the high-speed section speed and the feed section speed. After drilling reaches the preset hole depth on the target PCB board, the Z-axis drive mechanism is controlled to raise the spindle to the safe height at the retraction speed.

2. The method as described in claim 1, characterized in that, Determining the feed rate of a CNC machine tool by using its spindle speed and feed per revolution specifically includes: Obtain the feed per revolution of the drill bit selected for the current hole to be machined from the process parameter database; Obtain the current set spindle speed from the CNC commands; The feed rate of the CNC machine tool is determined by the feed per revolution and the currently set rotational speed.

3. The method as described in claim 1, characterized in that, The safe switching height for switching drilling speeds on the target PCB board surface is determined based on the inertial braking distance and safety margin of the high-speed segment, specifically including: Based on the maximum deceleration of the Z-axis drive mechanism of the CNC machine tool and the system response time, calculate the inertial braking distance required to smoothly decelerate from the high-speed section speed to the feed section speed; Set a safety margin to compensate for the flatness error of the target PCB board, the clamping error, and the random error of the control unit; The safe switching height for switching drilling speeds on the target PCB board surface is determined by the inertial braking distance and the safety margin.

4. The method as described in claim 1, characterized in that, The determination of the retraction speed coefficient of the Z-axis drive mechanism drilling based on the drilling depth information and plate parameters specifically includes: The current drilling depth of the Z-axis drive mechanism is obtained from the drilling depth information in the CNC commands; Query the chip removal difficulty level of the target PCB board based on the type of the target PCB board; The retraction speed coefficient of the Z-axis drive mechanism is obtained from the mapping rule of the retraction speed coefficient based on the current drilling depth and the chip removal difficulty level.

5. The method as described in claim 1, characterized in that, Determining the retraction speed to the safe height using the retraction speed coefficient, the high-speed section speed, and the feed section speed specifically includes: The basic retraction speed is determined based on the feed speed and the retraction speed coefficient. The base retraction speed is compared with the high-speed section speed to obtain the retraction section speed for raising to the safe height.

6. The method as described in claim 1, characterized in that, The speed of the high-speed section is greater than the speed of the feed section.

7. The method as described in claim 1, characterized in that, The speed of the retraction section is greater than the speed of the feed section.

8. A control system for CNC drilling of PCBs, characterized in that, include: The initialization module is used to control the X-axis and Y-axis motion platforms of the CNC machine tool with the CNC instructions of the PCB board to move the spindle above the current target hole position on the PCB board, and to control the Z-axis drive mechanism to keep the spindle at a safe height. The processing module is used to obtain the high-speed section speed of the CNC machine tool from the CNC instructions, determine the feed section speed of the CNC machine tool through the spindle speed and feed per revolution, and determine the safe switching height for switching the drilling speed on the target PCB board surface based on the inertial braking distance and safety margin of the high-speed section speed. The processing module is also used to control the Z-axis drive mechanism to descend to the safe switching height at the high-speed section speed, and then switch to the feed section speed to complete the drilling feed. Based on the drilling depth information of the Z-axis drive mechanism and the plate parameters, the retraction speed coefficient of the Z-axis drive mechanism is determined. The retraction speed to rise to the safe height is determined by the retraction speed coefficient, the high-speed section speed and the feed section speed. The execution module is used to control the Z-axis drive mechanism to raise the spindle to the safe height at the retraction speed after the drilling reaches the preset hole depth of the target PCB board.

9. A computer device, characterized in that, The computer device includes a memory and a processor, the memory being used to store a computer program, and the processor being used to call and run the computer program from the memory, causing the computer device to perform the control method for CNC drilling of PCBs as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions or code that, when executed on a computer, cause the computer to implement the control method for CNC drilling of PCBs as described in any one of claims 1 to 7.