In-process polishing and step compensation method for workpieces

CN123025173APending Publication Date: 2026-11-03GUANGDONG EVERWIN PRECISION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611283022.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-21
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

In existing technologies, the processing of notebook keyboard surfaces suffers from problems such as secondary clamping deviations, unstable wear of consumables, and low production efficiency, resulting in inconsistent product quality and high production costs.

Method used

The method of in-machine integrated grinding and stepped compensation is adopted. By establishing a unified workpiece coordinate system on the CNC machine tool, various specifications of grinding tools are used for processing in the same coordinate system. The wear compensation of the grinding tools is realized through counter and control system to eliminate positioning deviation and ensure batch consistency.

Benefits of technology

It eliminates positioning deviations caused by secondary clamping, stabilizes and controls wear of consumables, improves production efficiency and reduces costs, and ensures consistent product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123025173A_ABST
    Figure CN123025173A_ABST
Patent Text Reader

Abstract

The application relates to an in-machine integrated polishing and step compensation method of a workpiece, which comprises the following steps: S1, clamping the workpiece on a machining device, establishing a unified workpiece coordinate system, and keeping the clamping state unchanged in the whole machining process; S2, calling a preset milling program to perform numerical control milling on the workpiece, and reserving a polishing allowance with a preset thickness; S3, after the milling is completed, at least two polishing tools with different specifications are called in sequence, and preset polishing programs are respectively executed under the workpiece coordinate system, and each polishing tool corresponds to a preset polishing program; S4, a counter is established for each polishing tool, and the counter is used for accumulating the workpiece number; and S5, when the workpiece number of any polishing tool reaches a preset compensation threshold value, the tool length compensation value of the polishing tool is modified, the effective machining depth of the polishing tool relative to the surface of the workpiece is increased by one wear step, and the corresponding counter is reset, so that the problems of secondary clamping deviation, unstable consumption wear and low production efficiency can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CNC machining technology for 3C products, and in particular to an integrated in-machine grinding and step compensation method for workpieces. Background Technology

[0002] With the rapid development of the consumer electronics industry, laptops are evolving towards thinner, lighter, more integrated designs and higher aesthetic quality. Aluminum alloy, due to its light weight, high strength, and ease of anodizing, has become the mainstream material for mid-to-high-end laptop casings (especially the keyboard surface, also known as the C-frame or mid-section). As the surface that users directly contact, the keyboard surface has extremely stringent requirements for its appearance quality. It not only demands high dimensional accuracy but also requires a surface free of milling marks, burrs, scratches, and uniform color.

[0003] Currently, the mainstream processing technology for laptop keyboard surfaces in the industry generally adopts a separate operation mode of "CNC milling + offline polishing". The specific process is usually as follows: First, the roughing and finishing of the keyboard surface's outline, key holes, screw posts, clips, and other features are completed on a CNC machining center. At this time, obvious milling marks will be left on the workpiece surface. Then, the operator removes the workpiece from the CNC fixture and transfers it to an independent polishing station (such as a manual polishing table, automatic wire drawing machine, or robotic polishing station). Finally, the workpiece is clamped again by a robot or manually, and consumables such as sandpaper, nylon wheels, scouring pads, or steel wool are used to physically remove the milling marks before subsequent sandblasting or anodizing treatment.

[0004] However, the traditional "milling before grinding, process separation" model has revealed many insurmountable defects in practical applications, severely restricting the improvement of product quality and the reduction of production costs, as follows: (1) Positioning deviation caused by secondary clamping: When the workpiece is re-clamped at the grinding station, the positioning reference, vacuum suction force, and workpiece posture cannot be completely consistent with those in the milling stage. Even with high-precision fixtures, there will still be a deviation of tens of micrometers in the XYZ direction in actual production. The depth of tool mark removal is usually only 0.02~0.03mm. This deviation exceeds the thickness of the removal layer, causing the grinding trajectory to deviate from the target area, resulting in quality problems such as local over-grinding (collapsed edges, exposed bottom) or under-grinding (residual tool marks). Moreover, this problem is randomly distributed throughout the entire batch of production and cannot be completely eliminated by adjusting the machine.

[0005] (2) High consumption and unstable quality of polishing consumables: The sandpaper, nylon wheels, polishing brushes and other consumables used in traditional polishing processes wear out very quickly and need to be replaced after processing dozens of pieces. Moreover, the removal capacity of the same consumable varies significantly at different stages depending on the degree of wear. Even with regular replacement, it is still difficult to guarantee the consistency of products within a batch. At the same time, the material cost of the consumables themselves accounts for a considerable proportion in the mass production of 3C products.

[0006] (3) Inefficiency and cost waste caused by isolated processes: Independent grinding processes require additional equipment, space, handling personnel, and auxiliary time for loading and unloading. These non-value-added links lengthen the product circulation cycle and increase labor and management costs.

[0007] Therefore, there is an urgent need in this field for an integrated solution that can fundamentally eliminate secondary clamping deviations, stably control the impact of consumable wear, and compress the grinding process into the CNC machine. Summary of the Invention

[0008] Based on this, the present invention provides an in-machine integrated grinding and step compensation method for workpieces, which can solve the problems of secondary clamping deviation, unstable wear of consumables and low production efficiency.

[0009] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for integrated in-machine grinding and step compensation of a workpiece includes the following steps: S1: Clamp the workpiece on the worktable of the processing equipment, establish a unified workpiece coordinate system, and keep the clamping state of the workpiece unchanged throughout the entire processing process; S2: Call the preset milling program to perform CNC milling on the workpiece, leaving a grinding allowance of a set thickness; S3: After milling is completed, at least two different types of grinding tools are called in sequence, and preset grinding programs are executed in the workpiece coordinate system respectively. Each type of grinding tool corresponds to one preset grinding program. S4: In the control system, an independent counter is established for each of the grinding tools. After each workpiece is ground, the corresponding counter accumulates the number of processed parts. S5: When the number of processed parts of any of the grinding tools reaches the preset compensation threshold, the tool length compensation value corresponding to the grinding tool in the control system is modified so that the effective processing depth of the grinding tool relative to the workpiece surface is increased by one wear step, and the counter corresponding to the grinding tool is reset.

[0010] According to one embodiment of the present invention, the processing equipment is a CNC machine tool; in step S3, the grinding tool is called and replaced by the automatic tool changer of the CNC machine tool.

[0011] According to one embodiment of the present invention, the in-machine integrated grinding and step compensation method further includes: The maximum allowable total compensation for each of the grinding tools is preset in the control system. When the cumulative wear step of any of the grinding tools reaches the maximum allowable compensation amount, a tool replacement alarm is issued and the corresponding grinding tool is no longer used.

[0012] According to an embodiment of the present invention, in step S5, the preset compensation threshold and the wear step are determined by a wear rate calibration experiment of the grinding tool; the wear rate calibration experiment is as follows: under fixed process parameters of the grinding tool, multiple test pieces are continuously ground, the length wear of the grinding tool is measured under different numbers of processed pieces, the linear relationship between the length wear and the number of processed pieces is fitted, and the preset compensation threshold and the corresponding wear step are set according to the linear relationship.

[0013] According to one embodiment of the present invention, the wear step is 0.003~0.008mm, and the preset compensation threshold is 3~10 pieces.

[0014] According to one embodiment of the present invention, the workpiece is a metal casing of a 3C product made of aluminum alloy.

[0015] According to one embodiment of the present invention, the workpiece is a laptop keyboard surface, the workpiece includes a first feature region, a second feature region, and a third feature region; the number of polishing tools is 3, including: The first grinding tool has a diameter of 120mm and is used for rough grinding of the first feature area of ​​the workpiece. The second grinding tool has a diameter of 80mm and is used for contour grinding of the second feature area of ​​the workpiece; The third grinding tool has a diameter of 6 mm and is tapered, and is used for fine grinding of the third feature area of ​​the workpiece.

[0016] According to one embodiment of the present invention, the diamond grit size of the first grinding tool is smaller than that of the second grinding tool, and the diamond grit size of the second grinding tool is smaller than that of the third grinding tool.

[0017] According to one embodiment of the present invention, the polishing tool is a ceramic diamond brush.

[0018] According to one embodiment of the present invention, the process parameters in the preset grinding program include: a rotation speed of 4500~8000 rpm, a feed speed of 600~2000 mm / min, and an interference fit between the bottom of the grinding tool and the surface of the workpiece of 0.2~0.5 mm.

[0019] The beneficial effects of this invention are as follows: Milling and grinding share the same workpiece coordinate system and clamping datum, completely eliminating secondary clamping and thus eliminating over-grinding and under-grinding caused by positioning deviations; when the number of processed parts of any of the grinding tools reaches a preset compensation threshold, the tool length compensation value corresponding to the grinding tool in the control system is modified, so that the effective processing depth of the grinding tool relative to the workpiece surface increases by one wear step, realizing step compensation for the grinding tool without adding sensors, ensuring batch consistency; at the same time, milling and grinding are integrated in-machine, saving independent grinding processes and manpower, improving production efficiency and reducing costs. Attached Figure Description

[0020] Figure 1 This invention relates to an embodiment of an in-machine integrated grinding and step compensation method for workpieces.

[0021] Figure 2 This is a schematic diagram of the grinding tool and the workpiece in accordance with an embodiment of the present invention.

[0022] Figure 3 This is another embodiment of the present invention, which describes an in-machine integrated grinding and stepped compensation method for workpieces.

[0023] Figure 4 This is another embodiment of the present invention, which describes an in-machine integrated grinding and stepped compensation method for workpieces.

[0024] The meanings of the labels in the attached diagram are as follows: 10 - Large flat surface; 20 - Sunken area; 30 - Corner; 1 - First grinding tool; 2 - Second grinding tool; 3 - Third grinding tool. Detailed Implementation

[0025] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Preferred embodiments of the invention are shown in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a thorough and complete understanding of the disclosure of the invention.

[0026] It should be noted that when a component is said to be "fixed to" another component, it can be directly attached to the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component.

[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.

[0028] like Figure 1 As shown, this is an embodiment of the present invention of an in-machine integrated grinding and step compensation method for workpieces.

[0029] like Figure 1 As shown, the in-machine integrated grinding and stepped compensation method for this workpiece includes the following steps: Step S1: Clamp the workpiece on the worktable of the processing equipment, establish a unified workpiece coordinate system, and keep the workpiece clamping state unchanged throughout the entire processing process.

[0030] In step S1, the machining equipment is a CNC machine tool, and the machining coordinate system is the G54 workpiece coordinate system. The clamping method is not limited to vacuum adsorption; it can also be vacuum and clamping, fixture positioning, etc., as long as the milling and grinding maintain the same reference. For example, the workpiece is placed on a contour vacuum chuck, and vacuum adsorption is activated. A G54 workpiece coordinate system is established in the CNC system. Throughout the entire machining process (including milling and grinding), the vacuum adsorption state is maintained, the fixture is not released, and the workpiece posture is not damaged, ensuring a consistent reference and thus avoiding trajectory offset, edge collapse, and tool mark residue caused by secondary clamping. Continuous vacuum adsorption prevents abnormal edge grinding caused by workpiece micro-movements.

[0031] The workpiece is a metal casing for 3C products made of aluminum alloy, including but not limited to laptop keyboard surfaces, tablet casings, mobile phone frames, heat sinks, and other 3C metal exterior parts.

[0032] Step S2: Call the preset milling program to perform CNC milling on the workpiece, leaving a grinding allowance of the set thickness.

[0033] In step S2, the automatic tool changer of the CNC machine tool calls a carbide end mill to execute a preset milling program and perform CNC milling on the workpiece. For example, when the workpiece is a laptop keyboard surface, the laptop keyboard surface includes a first feature area, a second feature area, and a third feature area. The first feature area is, for example, a large flat surface; the second feature area is, for example, a recessed area or a rib area; and the third feature area is, for example, a corner or keyway. The roughing and finishing of the keyboard surface shape, keyway, snap-fit ​​holes, and screw posts are completed sequentially. The grinding allowance after milling is controlled to be 0.03mm to reserve a uniform removal layer for subsequent grinding processes.

[0034] Step S3: After milling is completed, at least two different types of grinding tools are called in sequence, and preset grinding programs are executed in the workpiece coordinate system. Each grinding tool corresponds to a preset grinding program.

[0035] In step S3, the grinding tool is called up and replaced through the automatic tool changer of the CNC machine tool.

[0036] The material of the grinding tool is not limited to ceramic diamond, but can also be resin diamond, electroplated diamond, abrasive-containing nylon, etc.; preferably, it is a ceramic diamond brush, which has high hardness and moderate flexibility, and can effectively cut tool marks and conform to three-dimensional curved surfaces.

[0037] There can be two, three, or four grinding tools. As one example, when the workpiece is a laptop keyboard surface, the number of grinding tools is three, including: a first grinding tool with a diameter of 120mm, used for rough grinding of the large flat areas of the workpiece; a second grinding tool with a diameter of 80mm, used for contour grinding of the recessed areas and rib areas of the workpiece; and a third grinding tool with a diameter of 6mm and a conical shape, used for fine grinding of the inner corners and narrow groove sides of the workpiece. During the grinding process, two reciprocating passes are used for the large flat areas, twelve contour passes are used for the recessed areas and corner areas, and one fine grinding pass is performed for the inner corners and narrow groove sides.

[0038] As one embodiment, the diamond grit size of the first grinding tool is smaller than that of the second grinding tool, and the diamond grit size of the second grinding tool is smaller than that of the third grinding tool, forming a gradient grinding sequence from coarse to fine.

[0039] The preset grinding program includes the following process parameters: rotation speed of 4500~8000rpm, feed speed of 600~2000mm / min, and interference between the bottom of the grinding tool and the workpiece surface of 0.2~0.5mm.

[0040] For example, such as Figure 2 As shown, when the workpiece is the keyboard surface of a laptop, the laptop keyboard surface (such as...) Figure 2 As shown in (a), it includes multiple feature areas, such as the large plane 10, the recessed area 20, the rib area, the corner 30, and the keyway. Different grinding tools of different specifications are used for different feature areas, for example, such as... Figure 2 As shown in (b), the first grinding tool 1 (diameter 120mm, diamond grit 200#) is used to rough grind the large surface 10. The spindle speed is set to 4500rpm, the feed rate to 1500mm / min, and the interference to 0.4mm. The spindle is controlled to reciprocate twice along the large surface 1 area of ​​the keyboard surface to quickly remove large-area tool marks; Figure 2 As shown in (c), the second grinding tool 2 (diameter 80mm, diamond grit 400#) is invoked, the spindle speed is set to 5500rpm, the feed rate to 1000mm / min, and the interference to 0.3mm. The spindle is controlled to perform one contour pass along the keyway contour and the recessed area 20, using a smaller diameter to avoid the non-machined sidewalls and prevent damage. Figure 2As shown in (d), the third grinding tool 3 (6mm in diameter and conical in shape, 600# diamond grit) is invoked. The spindle speed is set to 7000rpm, the feed rate to 600mm / min, and the interference fit to 0.2mm. The spindle is controlled to perform a fine grinding once on all internal corners 30 and the sides of narrow grooves to ensure no dead angles. The three grinding tools automatically change tools in sequence and invoke the corresponding preset grinding programs to achieve in-machine finishing of the entire area. The grinding path is based on the same G54 workpiece coordinate system after milling, with zero positioning deviation, thus solving the problems of edge collapse and tool mark residue.

[0041] Step S4: Establish an independent counter for each grinding tool in the control system. After each workpiece is ground, the corresponding counter accumulates the number of processed parts.

[0042] In step S4, the control system assigns a unique variable address or register to each type of grinding tool (e.g., the first, second, and third grinding tools). Before the preset grinding program is completed and the workpiece is about to be unloaded or enter the next process, the control system captures a "single piece processing completed" signal and triggers an increment operation on the value in the corresponding variable address. The calculations between variables do not interfere with each other, ensuring strict isolation of the counting data for rough grinding, contour grinding, and fine grinding.

[0043] Step S5: When the number of parts processed by any grinding tool reaches the preset compensation threshold, the tool length compensation value corresponding to the grinding tool in the control system is modified to increase the effective processing depth of the grinding tool relative to the workpiece surface by one wear step, and the counter corresponding to the grinding tool is reset.

[0044] In step S5, as an example, the preset compensation threshold and wear step size are determined through a wear rate calibration experiment of the grinding tool. The wear rate calibration experiment is as follows: under fixed process parameters of the grinding tool (such as rotation speed, feed, and interference), multiple test pieces are continuously ground, and the length wear of the grinding tool is measured under different numbers of processed pieces. The linear relationship between the length wear and the number of processed pieces is fitted, and the preset compensation threshold and the corresponding wear step size are set based on the linear relationship.

[0045] The wear step is 0.003~0.008mm, and the preset compensation threshold is 3~10 pieces. It can vary depending on the grinding tool, material, and speed / feed / interference. The compensation can be performed during part changeover, at the beginning of the program, during macro program cycles, or before the start of the next workpiece.

[0046] In the macro program of the CNC control system, an independent counter is set for each grinding tool. The counter increments by 1 after each workpiece is machined. When the count reaches a preset compensation threshold (e.g., 5 pieces), the control system automatically executes a tool length compensation command, shifting the Z-axis reference of the grinding tool downwards by a wear step (e.g., 0.005mm) in subsequent machining, while simultaneously resetting the counter to zero. This cycle continues until the grinding tool reaches its total lifespan. Within the total lifespan, a fixed wear compensation is applied for every N workpieces ground by the same grinding tool, achieving stepped compensation and ensuring a constant effective machining depth for the same grinding tool, thus guaranteeing consistent grinding quality within a batch. For example, #501, #502, and #503 are defined as the workpiece count counters for the first, second, and third grinding tools, respectively. #11001, #11002, and #11003 are defined as the addresses of the length compensation macro variables for the corresponding tool numbers (H01, H02, H03). Wear rate calibration experiments determined that the grinding tool wears approximately 0.005mm for every 5 pieces processed. Therefore, a compensation threshold of 5 pieces was set, with a wear step of 0.005mm. The specific execution logic is as follows: after grinding each workpiece, #501 = #501 + 1 is executed. If #501 ≥ 5, then #11001 = #11001 - 0.005 is executed; subsequently, #501 = 0. Other grinding tools are calculated independently in the same way.

[0047] Grinding tools (such as ceramic diamond brushes) experience uniform wear during use, leading to a gradual shortening of the effective grinding length. Without compensation, the actual grinding interference on subsequent workpieces will decrease, reducing removal capacity. The wear compensation of the grinding tool in this embodiment of the invention does not rely on external sensors and achieves precise quantitative compensation for wear without altering the CNC hardware. The same grinding tool maintains a constant actual grinding removal rate from new to scrap, resulting in extremely high consistency in workpiece quality within a batch. Simultaneously, a counter can accurately predict the remaining lifespan of the grinding tool, enabling preventative replacement and avoiding batch defects.

[0048] In some feasible implementations, such as Figure 3 As shown, after step S5, the in-machine integrated grinding and step compensation method further includes: Step S6: Preset the maximum allowable compensation amount for each grinding tool in the control system.

[0049] Step S7: When the cumulative wear step of any grinding tool reaches the maximum allowable compensation amount, issue a tool replacement alarm and stop calling the corresponding grinding tool.

[0050] Step S8: After all the preset grinding programs have been completed, remove the workpiece and proceed to the next process.

[0051] In this embodiment, different grinding tools have the same wear rate (e.g., 0.005mm wear per 5 pieces), but their replacement cycles may differ (e.g., the third grinding tool has a short lifespan due to high contact stress). Independent counting can track the wear process of each grinding tool separately, achieving accurate replacement warnings. For example, the maximum allowable compensation is preset to -0.500mm (i.e., the wear limit of the grinding tool) in the control system. When the control system detects #11001 ≤ -0.500, a "Please replace the grinding tool" alarm pops up on the screen, the program pauses, and defective products are prevented from being released.

[0052] After all grinding processes are completed, the spindle is reset, the vacuum suction is turned off, the workpiece is removed, and the process proceeds to the next step.

[0053] Taking the machining of a 14-inch aluminum alloy laptop keyboard surface (made of 6061 aluminum alloy, 1.8mm thick) as an example, a CNC machine tool equipped with a FANUC system (such as a Taigun machine) is used. The workpiece is clamped onto the worktable using a contour-following vacuum chuck, establishing a unified G54 workpiece coordinate system. This vacuum adsorption state is maintained throughout the milling and subsequent grinding processes, ensuring zero workpiece displacement throughout the entire process. Figure 4 As shown, step S101: Call the preset milling program to perform CNC milling on the workpiece, and leave a grinding allowance of 0.03mm; Step S102: After milling, the spindle calls the first ceramic diamond brush to grind the large surface through the automatic tool changer, and the process parameters are shown in Table 1; Step S103: The spindle calls the second ceramic diamond brush to grind the sunken area and rib area, and the process parameters are shown in Table 1; Step S104: The spindle calls the third ceramic diamond brush to grind the inner corner and narrow groove, and the process parameters are shown in Table 1; Step S105: Establish independent counts for the above three ceramic diamond brushes respectively. For each workpiece, the corresponding counters (#501, #502, and #503) are incremented by 1 after the entire grinding process is completed (i.e., #501, #502, and #503 each accumulate 1 piece); Step S106: Determine if any counter is greater than or equal to 5; if yes, proceed to step S107, otherwise proceed to step S108; Step S107: Perform wear compensation (corresponding tool length compensation value is reduced by 0.005mm); Step S108: Determine whether to continue processing the next workpiece; if yes, loop back to step S101, otherwise end the process.

[0054] The above macro variable numbers are merely an exemplary implementation of the FANUC system. Those skilled in the art can easily adapt them to other CNC control systems (such as the R parameters of Siemens 840D, the D variables of Mitsubishi M70, etc.), all of which fall within the protection scope of this invention.

[0055] Table 1 shows the specifications and manufacturing process parameters of the three ceramic diamond brushes.

[0056] The entire polishing stage takes approximately 4 minutes. After calibration, a compensation of 0.005mm is applied for every 5 pieces processed, resulting in a total lifespan of approximately 520 pieces (cumulative compensation of 0.5mm). At this point, the remaining effective length of the polishing tool is approximately 14.5mm, close to its limit. Random sampling inspection of the finished products processed using this method yielded the following results: Surface roughness Ra: between 0.32 and 0.38 μm; Observation under a 30x magnifying glass: no edge collapse, no tool marks remaining; Yield: increased from 91% with the traditional process to 99.5%.

[0057] Compared with traditional processes (which require independent grinding robots, manual sandpaper, and nylon wheels), this embodiment does not require additional independent grinding robots (saving 150,000 to 200,000 yuan per line in equipment investment) and 1 to 2 grinding station operators; the cost per grinding tool is approximately 0.05 yuan, which is far lower than the consumable cost of traditional sandpaper + nylon wheels (approximately 0.8 yuan per piece), resulting in a reduction of approximately 32% in the overall processing cost per piece.

[0058] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0059] The above embodiments merely illustrate preferred implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention should be determined by the appended claims.

Claims

1. A method for integrated in-machine grinding and stepped compensation of a workpiece, characterized in that: Including the following steps: S1: Clamp the workpiece on the worktable of the processing equipment, establish a unified workpiece coordinate system, and keep the clamping state of the workpiece unchanged throughout the entire processing process; S2: Call the preset milling program to perform CNC milling on the workpiece, leaving a grinding allowance of a set thickness; S3: After milling is completed, at least two different types of grinding tools are called in sequence, and preset grinding programs are executed in the workpiece coordinate system respectively. Each type of grinding tool corresponds to one preset grinding program. S4: In the control system, an independent counter is established for each of the grinding tools. After each workpiece is ground, the corresponding counter accumulates the number of processed parts. S5: When the number of processed parts of any of the grinding tools reaches the preset compensation threshold, the tool length compensation value corresponding to the grinding tool in the control system is modified so that the effective processing depth of the grinding tool relative to the workpiece surface is increased by one wear step, and the counter corresponding to the grinding tool is reset.

2. The in-machine integrated grinding and stepped compensation method for workpieces according to claim 1, characterized in that: The processing equipment is a CNC machine tool, and the grinding tool is called and replaced through the automatic tool changer of the CNC machine tool.

3. The in-machine integrated grinding and step compensation method for workpieces according to claim 1, characterized in that: The in-machine integrated grinding and stepped compensation method also includes: The maximum allowable total compensation for each of the grinding tools is preset in the control system. When the cumulative wear step of any of the grinding tools reaches the maximum allowable compensation amount, a tool replacement alarm is issued and the corresponding grinding tool is no longer used.

4. The in-machine integrated grinding and stepped compensation method for workpieces according to claim 1, characterized in that: In step S5, the preset compensation threshold and the wear step are determined by the wear rate calibration experiment of the grinding tool. The wear rate calibration experiment is as follows: under the fixed process parameters of the grinding tool, multiple test pieces are continuously ground, the length wear of the grinding tool is measured under different numbers of processed pieces, the linear relationship between the length wear and the number of processed pieces is fitted, and the preset compensation threshold and the corresponding wear step are set according to the linear relationship.

5. The in-machine integrated grinding and stepped compensation method for workpieces according to claim 4, characterized in that: The wear step is 0.003~0.008mm, and the preset compensation threshold is 3~10 pieces.

6. The in-machine integrated grinding and stepped compensation method for workpieces according to claim 1, characterized in that: The workpiece is a metal casing for 3C products made of aluminum alloy.

7. The in-machine integrated grinding and stepped compensation method for workpieces according to claim 6, characterized in that: The workpiece is a laptop keyboard surface, and the workpiece includes a first feature area, a second feature area, and a third feature area; the number of polishing tools is 3, including: The first grinding tool has a diameter of 120mm and is used for rough grinding of the first feature area of ​​the workpiece. The second grinding tool has a diameter of 80mm and is used for contour grinding of the second feature area of ​​the workpiece; The third grinding tool has a diameter of 6 mm and is tapered, and is used for fine grinding of the third feature area of ​​the workpiece.

8. The in-machine integrated grinding and stepped compensation method for workpieces according to claim 7, characterized in that: The diamond grit size of the first grinding tool is smaller than that of the second grinding tool, and the diamond grit size of the second grinding tool is smaller than that of the third grinding tool.

9. The in-machine integrated grinding and stepped compensation method for workpieces according to claim 1, characterized in that: The polishing tool is a ceramic diamond brush.

10. The method for integrated in-machine grinding and stepped compensation of a workpiece according to claim 1, characterized in that: The process parameters in the preset grinding program include: a rotation speed of 4500~8000 rpm, a feed speed of 600~2000 mm / min, and an interference fit between the bottom of the grinding tool and the surface of the workpiece of 0.2~0.5 mm.