An automatic programming method and system based on star pendulum unit

CN122431256APending Publication Date: 2026-07-21周志刚
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
周志刚
Filing Date
2026-04-21
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Traditional milling methods are difficult to achieve rapid programming, on-site adjustment, adaptive allowance, and support for array machining. They are also difficult to break free from the constraints of machining drawings. Existing CAM software suffers from algorithm black boxes and implicit coupling of parameters, data redundancy, and a lack of real-time adaptive capabilities. As a result, machining parameters are difficult to directly map to machine tool dynamic performance, resulting in low programming efficiency and difficulty in meeting the needs of small-batch, multi-variety, and customized machining.

Method used

An automatic programming method based on a star pendulum unit is adopted, which realizes the rapid generation of NC code from drawings through a dual-modal architecture (drawing parsing mode and parameter direct drive mode). The geometric step S and swing amplitude W of the star pendulum unit are mapped to the feed step Q and feed speed F of the CNC system. Combined with custom G code instructions and parameter direct drive mode, NC files are directly generated.

Benefits of technology

It achieves high programming efficiency, shortens changeover time, supports real-time programming without drawings, and adaptive machining of allowances, reduces the burden on CNC systems, improves machining quality and equipment utilization, and is suitable for rapid response of non-standard automated parts and automated production lines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122431256A_ABST
    Figure CN122431256A_ABST
Patent Text Reader

Abstract

The application discloses an automatic programming method and system based on a star swing unit, comprising a drawing analysis and a parameter direct drive dual mode. The drawing analysis mode obtains geometric characteristics from a machining drawing to generate a machining program with the star swing unit as a path. The parameter direct drive mode directly receives workpiece sizes and process chains through an external device, calls preset templates to inject parameters and splice, and one-key generates a complete NC file. The application greatly improves programming efficiency through the dual mode architecture, reduces code amount by more than 90%, supports real-time adjustment and allowance adaptive machining on site, and realizes instant programming without drawings in the workshop, and has remarkable economic and social benefits.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CNC machining automatic programming technology, and in particular to a method for machining feature recognition, datum point positioning and automatic toolpath generation based on a star pendulum unit, as well as a simplified interactive programming method based on parameter direct drive. Background Technology

[0002] In the modern field of metal cutting, efficient milling strategies have always been a core objective pursued by the manufacturing industry. As the manufacturing industry develops towards small-batch, multi-variety, and customized production, the proportion of component processing and non-standard automated parts is increasing, posing a serious challenge to existing programming technologies.

[0003] Limitations of traditional milling methods: In traditional milling methods, the step distance is physically defined directly as the cutting width. Changes in the step distance inevitably affect both the cutting load and the material removal rate, which are strongly coupled. Operators find it difficult to independently control these parameters, leading to a parameter optimization process that heavily relies on experience and trial and error, resulting in low efficiency and difficulty in ensuring consistent machining quality.

[0004] Programming Challenges in Machining of Individual and Non-standard Automated Parts: Individual part machining refers to the machining of single or very small batches of parts, while non-standard automated parts refer to non-standard mechanical components customized for specific automated equipment (such as grippers, positioning blocks, and detection brackets). The machining of these two types of parts is characterized by a wide variety of products, small batch sizes, frequent production changes, long programming cycles, uncertain blank allowances, and difficulties in on-site adjustments. Traditional CAM programming heavily relies on importing machining drawings and complex path calculations, making it difficult to meet the demands of rapid response in the workshop or even real-time machining under "drawing-less" conditions.

[0005] The technical bottlenecks of existing CAM dynamic milling: The dynamic milling strategies introduced by mainstream CAM software have defects such as algorithm black box and implicit coupling of parameters, data redundancy, and lack of real-time adaptive capability, which makes it difficult to establish a direct mapping relationship between machining parameters and machine tool dynamic performance.

[0006] Pain points of automated production lines and array processing: In automated production lines, when multiple parts are arranged on a pallet for batch processing, traditional CAM requires programming each part individually or using array functions, resulting in a large amount of programming, long downtime for changeovers, and difficulty in achieving adaptive machining of allowances with "one-cut coverage".

[0007] Therefore, there is an urgent need for a new type of automatic programming method and system that can achieve rapid programming, on-site adjustability, adaptive allowance, support for array machining, and can generate NC code directly driven by structured parameters without being bound by machining drawings. Summary of the Invention

[0008] This invention provides an automatic programming method and system based on a star pendulum unit. Through a dual-modal architecture (drawing parsing mode and parameter direct drive mode), it achieves rapid generation from drawings to NC code, offering advantages such as high programming efficiency, short changeover time, and support for real-time programming without drawings. Furthermore, it has broad application prospects in the intelligent transformation of discrete manufacturing industries. To solve the above-mentioned technical problems, one technical solution adopted by this invention is:

[0009] An automatic programming method based on a star pendulum unit is provided, characterized by comprising:

[0010] Constructing a star pendulum unit: The star pendulum unit is formed by connecting two equal-length circular arcs with equal radii and opposite curvature directions at the midpoint. The net displacement between the beginning and end points of the star pendulum unit in the macroscopic feed direction is defined as the feed step size S. The perpendicular distance from the midpoint to the axis of the macroscopic feed direction is defined as the swing amplitude W. Let the geometric step size be S, the swing amplitude be W, and the radius R of the circular arc satisfy the geometric relationship R = (W / W). 2 + (S / 2) 2 ) / (2W);

[0011] Feature analysis: Obtain the geometric feature parameters of the machining area from the machining drawings;

[0012] Coordinate system establishment and feature positioning: Obtain the specified reference point and establish the workpiece coordinate system based on the reference point (the coordinate system for machining by the CNC system of the machine tool, corresponding to G54, G55, G56, G57, G58, G59, etc.), transform the geometric feature parameters to this coordinate system, and assign machining positioning points to the geometric features.

[0013] Parameter determination: The geometric step distance S is mapped to the feed step distance Q in the CNC system. Based on the obtained feed step distance Q and the swing amplitude W (which can be set by the user), the machining parameters are determined. The feed step distance Q can be obtained by input by the machine operator, set during code compilation (if not input, the default value is used), or by automatically extracting the corresponding data from the SF curve of this equipment.

[0014] Toolpath filling: Using the star pendulum unit as the basic path, fill the machining area;

[0015] Code generation: Based on the geometric feature type and positioning point, the corresponding macro program template is called, and parameterized macro program calls or G codes including independent Q and W address characters are output. When the target CNC system supports custom star pendulum G code instructions, star pendulum linear interpolation instructions or star pendulum circular interpolation instructions can be output. Among them, the geometric feature type refers to the basic geometric features that make up the shape of the product, such as rectangle, cylinder, L-shape, ellipse, etc. The feature parameters are the parameter values ​​of this feature type, such as the length, width and height of the rectangle, the diameter and height of the cylinder, etc. The format of the star pendulum linear interpolation instruction is: G###X_ Y_ Z_ F_ Q_ W_, and the format of the star pendulum circular interpolation instruction is: G### X_ Y_ I_ J_ F_ Q_ W_ or G###X_ Y_ R_ F_ Q_ W_, where G### represents any unused G code number.

[0016] In a preferred embodiment of the present invention, the reference point is obtained by the user clicking on the model through a 3D preview interface.

[0017] In a preferred embodiment of the present invention, the method further includes adaptive machining of allowance: in the radial direction, the effective cutting width D_eff=D+W is set to be greater than or equal to the maximum radial allowance of the blank, where D is the tool diameter; the system monitors the spindle load in real time and automatically adjusts the ratio of feed speed F or Q to W according to the SF curve.

[0018] In a preferred embodiment of the present invention, the invention further includes corner adaptive adjustment: when a corner radius is detected, the swing amplitude W or feed speed F is automatically adjusted based on the safety boundary determined by the SF curve to adapt to the corner geometry.

[0019] A parameter direct-drive automatic programming method based on a star pendulum unit, also including the aforementioned star pendulum unit, comprises the following steps:

[0020] Structured parameter reception: Without relying on the drawing parsing process, it directly receives the workpiece geometric dimension parameters and reference point coordinates input by the user through external auxiliary equipment or IDE interface of the processing equipment;

[0021] Process chain arrangement: Receive information on multiple processing steps selected by the user on the interface, and generate a process sequence containing at least two processing steps;

[0022] Template matching and injection: retrieve the star pendulum process template corresponding to each process in the process sequence from the preset star pendulum process template library; for processes in the process sequence involving milling to remove material, inject the obtained geometric dimension parameters, feed step Q and swing amplitude W into the corresponding star pendulum process template;

[0023] Direct NC file assembly: After injecting parameters, the templates of each process are physically assembled according to the process sequence to directly generate a complete NC machining file containing the star-shaped toolpath.

[0024] In a preferred embodiment of the present invention, the process sequence includes a mixed arrangement of star-shaped milling processes and standard fixed-cycle processes; the star-shaped milling process includes at least one or more of milling the outer shape, end milling, and finishing; the standard fixed-cycle process includes at least one or more of hole machining and tapping; when the system is spliced, it automatically connects the star-shaped G-code macro call and the standard fixed-cycle G-code.

[0025] In a preferred embodiment of the present invention, during the template matching and injection process, the feed step Q and the swing amplitude W are determined as follows: based on the SF curve stored locally in the external auxiliary device or IDE interface, or obtained by communication with the CNC system, the Q value and W value corresponding to the current process are automatically obtained by table lookup or interpolation within the stable machining area.

[0026] An automatic programming system based on a star pendulum unit, used to execute the method described in any of the above claims, comprising a dual-modal operation unit, the dual-modal operation unit comprising:

[0027] Drawing parsing module: used to parse the features of machining drawings and generate star-shaped toolpath code (optional output macro program call or custom G-code instruction);

[0028] Parameter direct drive IDE module: Deployed on the external auxiliary equipment of the processing equipment, it does not rely on the processing drawings, but only receives the geometric dimensions, reference point coordinates and process selection sequence input by the user. It performs physical code splicing by calling the preset star pendulum process template library and outputs a complete NC file with one click.

[0029] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any of the preceding claims. Attached Figure Description

[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein:

[0031] Figure 1 This is a schematic diagram of the geometric structure of the star pendulum unit in this invention. The diagram is labeled as follows: S—step distance, W—oscillation amplitude, R—radius of the arc, M—midpoint (connection point), P0—starting point, P1—ending point.

[0032] Figure 2 A schematic diagram of the trajectory of the optimal configuration of the star pendulum unit (W=S / 2);

[0033] Figure 3 This is a schematic diagram of the dynamic performance fingerprint (SF) curve of a milling machine. The diagram is labeled as follows: S_min—minimum available step distance, S_PEAK—optimal step distance (peak point), F_max(S)—maximum stable feed rate, and the stable machining region is located below the curve.

[0034] in, Figure 1 The two basic units are shown using dashed and solid lines; Figure 3 Two toolpath trajectories are displayed using dashed and solid lines. In the actual code processing process, you can choose one (solid line trajectory or dashed line trajectory).

[0035] Figure 4 This is a block diagram of the automatic programming system of the present invention;

[0036] Figure 5 This is a schematic diagram of the interactive interface and process chain arrangement for the parameter direct drive mode (IDE / external device) of the present invention;

[0037] Figure 6 This is the interface diagram that specifies the reference point in this invention. Detailed Implementation

[0038] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0039] I. Definition of Star Pendulum Unit

[0040] like Figure 1-2 As shown, the star pendulum unit in this application is formed by connecting two equal-length circular arcs with equal radii and opposite curvature directions at the midpoint. Let the displacement of the unit's beginning and end be the geometric step size S, the unilateral offset distance be the swing amplitude W, and the radius R of the circular arc satisfy: R = (W 2 + (S / 2) 2 ) / (2W).

[0041] During the implementation and code generation at the CNC system's underlying level, the geometric step distance S is strictly mapped to an independent feed step distance parameter Q (passed using the Q address symbol in G-code to avoid physical conflicts with the traditional spindle speed S). For example... Figure 3 As shown, the SF curve is a dynamic performance fingerprint with the feed step size S (geometric step size) on the horizontal axis and the maximum stable feed rate F_max(S) on the vertical axis.

[0042] It should be noted that the Q address in the star pendulum macro call transmits the feed step, while the Q address in the standard fixed cycle (such as G83) follows the native fixed cycle parameter definition of the CNC system. The two are independent of each other in different instruction contexts and do not conflict with each other.

[0043] II. Custom Star Pendulum G-code Commands (Optional Output Format)

[0044] This invention further provides a method for outputting custom star pendulum G-code instructions as an alternative to macro program calls. The CNC system predefines star pendulum-specific G-code instructions, using custom G-code numbers not occupied by the standard in the CNC system (exemplarily, G101, G102, G103, but not limited thereto), including:

[0045] The command for linear interpolation using a star pendulum is in the format: G### X_ Y_ Z_ F_ Q_ W_ [K];

[0046] The command for star pendulum circular interpolation (center increment format) is: G### X_ Y_ I_ J_ F_ Q_ W_ [K];

[0047] The command for star pendulum circular interpolation (radius format) is: G### X_ Y_ R_ F_ Q_ W_ [K].

[0048] Wherein, G### represents any unused G code number, Q is the feed step (numerically equal to the geometric step S), W is the oscillation amplitude, F is the feed speed, and K is an optional parameter used to specify the rotation direction of the first arc segment.

[0049] When the CNC system supports the custom instruction, the automatic programming method described in this invention can directly output the custom G101 (star pendulum linear interpolation based on star pendulum unit) / G102 (star pendulum circular interpolation based on star pendulum unit) / G103 (star pendulum circular interpolation based on star pendulum unit) instructions, further simplifying the amount of code and eliminating the intermediate delay in macro program parsing.

[0050] III. Automated Programming Methods (Dual-Modal Architecture)

[0051] This invention provides an automatic programming method based on a star pendulum unit, including a drawing parsing mode and a parameter direct drive mode:

[0052] (a) Drawing Analysis Mode

[0053] Step 1: Feature Analysis – Obtain the geometric feature parameters of the processing area from drawings (including but not limited to STEP, IGES, DWG, DXF, PDF, etc.), including at least one of rectangular cavity, circular cavity, polygonal outline, and array layout;

[0054] Step 2: Coordinate system establishment and feature positioning - Establish the workpiece coordinate system based on the user-specified reference points, transform the feature parameters to this coordinate system, and assign machining positioning points to each feature;

[0055] Step 3: Parameter Determination – Based on the feed step Q and oscillation amplitude W of the star pendulum unit, determine the machining parameters;

[0056] Step 4: Toolpath Filling – Using the star pendulum unit as the basic path, fill the machining area;

[0057] Step 5: Code Generation – Call the corresponding macro program template and output a parameterized macro program call or G code containing independent Q and W address characters; when the target CNC system supports custom star pendulum G code instructions, you can choose to output code in the format of G101 (star pendulum linear interpolation based on star pendulum unit) / G102 (star pendulum circular interpolation based on star pendulum unit) / G103 (star pendulum circular interpolation based on star pendulum unit).

[0058] Step 6: Corner Adaptation – When a corner radius is detected, the ratio of feed step Q to oscillation amplitude W (Q / W) or feed speed F is automatically adjusted based on the safety boundary determined by the SF curve.

[0059] (ii) Parameter direct drive mode (minimalist interactive programming)

[0060] Step A: Structured Parameter Reception – This step does not rely on drawing parsing. It directly receives manually input structured machining parameters from the user via an external auxiliary programming device or the IDE interface of the machining equipment. These parameters must include at least the workpiece's geometric dimensions (e.g., length X, width Y, height Z) and the coordinates of user-specified reference points (e.g., coordinates of reference points). Figure 6 (as shown)

[0061] Step B: Process chain selection and sorting - Receive multiple machining processes (such as milling the outer shape, end milling, hole machining, finishing, tapping, etc.) selected by the user in the interface, and automatically or manually arrange them to generate a process sequence according to the machining logic;

[0062] Step C: Process Template Matching and Parameter Injection—For each process in the process sequence, the corresponding template is automatically retrieved from the preset star pendulum process template library; for processes involving milling to remove material (such as milling the outer shape, end milling, and finishing), the user-input geometric dimension parameters and the feed step Q and oscillation amplitude W determined based on the SF curve are injected into the template; for non-milling processes (such as hole machining and tapping), standard fixed cycle parameters are injected;

[0063] Step D: One-click NC file generation – Directly and physically splice all process templates after parameter injection according to the process sequence, without the need for background 3D geometric modeling and toolpath calculation, instantly generating a complete milling NC file containing the star-shaped toolpath.

[0064] IV. Automatic Programming System

[0065] like Figure 4 As shown, the present invention also provides an automatic programming system based on a star pendulum unit for executing the above method, including a dual-modal operation unit:

[0066] Drawing parsing module: used to parse CAD drawing features and generate star-shaped toolpath code (optional output macro program call or custom G-code instruction);

[0067] Parameter direct drive IDE module: Deployed on the external auxiliary equipment of the machine tool, it does not rely on the machining drawings, but only receives the geometric dimensions and process selection sequence input by the user. It performs physical code splicing by calling the preset star pendulum process template library and outputs a complete NC file with one click.

[0068] V. Computer-readable storage media

[0069] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method.

[0070] Example 1: Automatic programming of rectangular cavities (drawing parsing mode, output macro program call)

[0071] Feature analysis: Identify rectangular cavity features with length L=100mm, width W_c=80mm, and depth D_c=-5mm.

[0072] Coordinate system establishment and feature localization: When the user clicks on a specified reference point, the system automatically assigns a positioning point as the center of a rectangle (50, 40).

[0073] Parameter decision: When the user selects the efficiency priority mode, the recommended parameters based on the tool diameter D=12mm and the SF curve are: feed step Q=0.6mm, oscillation amplitude W=0.3mm, and feed speed F=1500mm / min.

[0074] Toolpath fill: Effective cutting width D_eff = D + W = 12 + 0.3 = 12.3 mm. Taking the actual row spacing as 12 mm, the number of rows N_rows ≈ 7 rows.

[0075] Code generation (macro call method): Outputs macro calls containing independent Q / W parameters:

[0076] G65 P2000 A100 B80 C-5 D12 Q0.6 W0.3 F1500 X50 Y40.

[0077] Example 2: Automatic programming of a rectangular cavity (outputting custom G-code instructions)

[0078] When the target CNC system supports custom star pendulum G-code instructions, the code generation step in this embodiment outputs G101 format instructions. G101 is a star pendulum linear interpolation instruction based on the star pendulum unit, with the following format: G101 X100 Y80 Z-5F1500 Q0.6 W0.3.

[0079] In this instruction, Q is the feed step, W is the oscillation amplitude, and F is the feed speed. After receiving the G101 instruction, the CNC system automatically calls the star-shaped toolpath generator, based on the formula R=(W 2 +(Q / 2) 2 The radius of the arc is calculated using (2W) / (G03 / G02), generating an alternating sequence of star pendulum units to drive the tool movement. This method further simplifies the code and eliminates the intermediate delay in macro program parsing, making it suitable for new CNC systems.

[0080] Example 3: Automatic Programming of Array Features (Drawing Parsing Mode)

[0081] Output array macro program call:

[0082] G65 P4000 A100 B80 C-5 D12 Q0.6 W0.3 F1500 M3 N4 X120 Y100.

[0083] Effect: Traditional CAM requires programming each program individually, while this invention only requires a single line of macro program call, significantly reducing programming time.

[0084] If custom G-code is supported, the output can be:

[0085] G101 X120 Y100 Z-5 F1500 Q0.6 W0.3 (first array)

[0086] G101 X240 Y100 Z-5 F1500 Q0.6 W0.3 (Second array)

[0087] ......

[0088] Example 4: Corner Adaptive Adjustment

[0089] The nominal Q=0.6mm and W0=0.3mm. Before entering the corner, the system detects R_c=2mm and, based on the SF curve safety boundary, automatically reduces the feed rate to F=1200mm / min.

[0090] Example 5: Adaptive Machining with Allowance

[0091] Select a tool diameter D=20mm, set W=5mm, and ensure D_eff = 25mm is greater than the maximum allowance. Based on the SF curve of this machining equipment, select a safe feed step Q=0.8mm, corresponding to F_max=1100mm / min. Monitor the spindle load in real time and dynamically adjust F.

[0092] Example 6: Explanation of the Core Logic of a Macro Program

[0093] The star pendulum macro program of this invention (taking P2000 as an example) adopts the FANUC standard variable address mapping: A→#1, B→#2, C→#3, D→#7, E→#8, F→#9, I→#4, J→#5, K→#6, Q→#17, R→#18, S→#19, T→#20, U→#21, V→#22, W→#23, X→#24, Y→#25, Z→#26. The feed step Q corresponds to #17, and the oscillation amplitude W corresponds to #23.

[0094] The core execution logic is as follows:

[0095] (Parameter reception)

[0096] #1 = A (length)

[0097] #2 = B (width)

[0098] #3 = C (Depth)

[0099] #7 = D (tool diameter)

[0100] #17 = Q (feed step, replacing the traditional step S)

[0101] #23 = W (Amplitude of oscillation)

[0102] #9 = F (feed rate)

[0103] #24 = X (Location point X)

[0104] #25 = Y (anchor point Y)

[0105] (Geometric calculation: Calculate the radius R of the arc based on Q and W)

[0106] #8 = [#23*#23 + [#17 / 2]*[#17 / 2]] / [2*#23]

[0107] (Row count calculation: Calculate row spacing and row count based on effective cutting width D+W)

[0108] #10 = #2 / [#7 + #23]

[0109] (Generate toolpaths in a loop)

[0110] G90 G00 X[#24] Y[#25]

[0111] G01 Z#3 F100

[0112] #11 = -#2 / 2

[0113] WHILE [#11 LT #2 / 2] DO1

[0114] G00 Y[#25 + #11]

[0115] #12 = -#1 / 2

[0116] WHILE [#12 LT #1 / 2] DO2

[0117] G03 X[#24 + #12 + #17 / 2] Y[#25 + #11 + #23] R#8 F#9

[0118] G02 X[#24 + #12 + #17] Y[#25 + #11] R#8

[0119] #12 = #12 + #17 (X-direction feed step Q)

[0120] END2

[0121] #11 = #11 + [#7 + #23] (Y-direction step according to effective cutting width)

[0122] END1

[0123] G00 Z5

[0124] M99

[0125] Additional explanation: This embodiment primarily uses parameterized macro program calls (such as G65 passing Q and W parameters) as an example. The advantage of the macro program path lies in its strong backward compatibility, enabling the deployment of the Star Pendulum ecosystem directly on older machine tools without modifying the existing CNC system's underlying firmware. For newer CNC systems equipped with custom Star Pendulum G-code interpolators (such as G101), the logic generated by this method can be directly converted into lines of G101 instructions, thereby completely eliminating the intermediate delay in macro program parsing. This method constitutes a crucial bridge connecting "traditional machining equipment" and the "Star Pendulum ecosystem."

[0126] To ensure the maintainability of a large-scale template library and secure inter-module calls, this invention further defines a variable partitioning specification: CNC system Class B macro program variables are divided into a parameter input area, a temporary calculation area, a module communication area, a global configuration area, and a nested call stack area. Each template follows a unified variable usage convention during development, ensuring secure nested calls between any two templates without variable conflicts.

[0127] Meanwhile, this invention fixes the semantic mapping of G65 parameter passing: address A corresponds to the major dimension, address B corresponds to the minor dimension, address C corresponds to the third dimension, address Q corresponds to the feed step, and address W corresponds to the swing amplitude. This fixed semantic mapping ensures that templates written by different developers have a unified calling interface, laying the engineering foundation for the open collaborative development of template libraries.

[0128] Example 7: Drawing-less programming of individual components based on parametric direct drive (simplified IDE mode)

[0129] This example demonstrates a "second-level programming" process that does not require importing CAD drawings for non-standard automated parts (such as an irregular blank that needs to be quickly milled into a rectangular outline and drilled and tapped).

[0130] Scenario and Equipment Configuration: An industrial tablet (external auxiliary equipment) is connected next to the CNC machine tool, running the star pendulum IDE system described in this invention. The operator uses calipers to measure the area of ​​the blank to be processed: length X=102mm, width Y=83mm, depth Z=18mm, and the required processing size is 100*80*15.

[0131] Structured parameter input (bypassing parsing): The operator directly enters X=100, Y=80, Z=-15 in the input box of the IDE interface. A point is then clicked on in the machine coordinate system preview interface to set it as the reference point (e.g., X0, Y0).

[0132] like Figure 5 As shown, process chain selection and sorting: In the "Process Menu" on the interface, the operator selects and drags the following 5 processes in sequence:

[0133] Step 1: Milling the outer shape (rough machining of the star pendulum)

[0134] Step 2: End face milling (rough machining of the star pendulum)

[0135] Step 3: Hole machining (drilling 4 pilot holes)

[0136] Step 4: Finishing (using a star-shaped polishing knife)

[0137] Step 5: Tapping (thread tapping).

[0138] Process template matching and parameter injection: The system automates the processing of the above process chain.

[0139] Step 1 (Milling the Outer Profile): The system matches the "star pendulum outer contour template". Based on the machine tool's SF curve recommendation, the following parameters are automatically injected: feed step Q=0.6, oscillation amplitude W=0.3, feed speed F=1500.

[0140] Step 2 (End Milling): The system matches the "Star-shaped Reciprocating End Face Template". Based on the machine tool's SF curve recommendation, the injection parameters are: Q=0.8, W=0.5.

[0141] Step 3 (Hole Machining): The system matches the "Standard Drilling Cycle Template" and injects the G83 command and spindle speed S according to the hole position coordinates.

[0142] Step 4 (Finishing): The system matches the "star pendulum finishing template". Based on the machine tool's SF curve recommendation, inject minimal parameters: Q=0.2, W=0.1 to ensure surface roughness.

[0143] Step 5 (Tapping): The system matches the "standard rigid tapping template" and injects G84 commands.

[0144] One-click NC file generation: The operator clicks the "Generate NC File" button. The system does not perform any 3D modeling or toolpath calculations; instead, it directly concatenates the G-code macroblocks of the five processes mentioned above in sequence. A partial example of the complete output NC file is shown below:

[0145] (Step 1: Star milling of the outer shape)

[0146] G65 P9000 X100 Y80 Z-15 Q0.6 W0.3 F1500

[0147] (Step 2: Star-shaped end face milling)

[0148] G65 P9001 X100 Y80 Z-0.5 Q0.8 W0.5 F1200

[0149] (Step 3: Hole Machining)

[0150] G83 X10 Y10 Z-18 R2 Q2 F100 S2000

[0151] G83 X90 Y10 Z-18 R2 Q2 F100 S2000 ...

[0153] (Step 4: Precision machining of the pendulum)

[0154] G65 P9000 X100 Y80 Z-15 Q0.2 W0.1 F800

[0155] (Step 5: Tapping)

[0156] G84 X10 Y10 Z-15 R2 F1.5 S300 ...

[0158] M30

[0159] Based on the above embodiment seven, this extended embodiment further illustrates how to combine a standard equidistant array fixture to achieve one-time batch processing of multiple loose parts with different allowances, as well as small-batch efficient processing of the same part.

[0160] Scenario 1: Array processing of individual parts

[0161] The tray is equipped with a standard equidistant array fixture, which has multiple clamping positions arranged at fixed intervals (e.g., 100mm × 80mm). The operator can clamp multiple loose parts with different blank allowances and even slightly different external dimensions into the respective holes without having to measure the allowances one by one.

[0162] The operator selects the "array machining" mode on the IDE tablet, inputs the array parameters (number of rows M, number of columns N, row spacing, column spacing), and specifies the coordinates of the reference points. The system automatically generates the coordinate sequence for each clamping position.

[0163] The IDE system calls the preset "Star Pendulum Array Main Program Template", which has built-in loop logic: for each clamping position in the coordinate sequence, the process chain described in Example 7 is called in sequence (milling the outer shape → end milling → hole machining → finishing → tapping), and the coordinates of the current clamping position are injected into each process template as positioning point parameters.

[0164] Scenario 2: Small-batch processing

[0165] When small-batch processing of the same part is required (e.g., 50 to 500 pieces), the operator clamps multiple identical blanks into the various holes of the fixture. Because the star-shaped toolpath has the characteristic of ignoring allowance, the slight differences in allowance between blanks do not affect the stability and consistency of the machining process.

[0166] The operator only needs to input the workpiece size parameters once on the IDE tablet and select the process chain, and the system can generate a unified machining program covering the entire array. This significantly reduces the time wasted by frequent tool changes in traditional small-batch machining. The effective output of traditional small-batch machining is limited by auxiliary time such as tool setting, frequent tool changes, and batch changeovers, while the solution of this invention compresses these auxiliary times to the minute level, greatly increasing the effective output.

[0167] After the operator clicks "Generate NC File", the system outputs a complete NC file containing program calls for all array positions, as shown in the example below:

[0168] (Array position 1)

[0169] G65 P9000 X100 Y80 Z-15 Q0.6 W0.3 F1500 X10 Y10 ...

[0171] (Array position 2)

[0172] G65 P9000 X100 Y80 Z-15 Q0.6 W0.3 F1500 X110 Y10

[0173] ...

[0174] Results: Utilizing the property of the star-shaped toolpath ignoring allowance, combined with the direct-drive capability of the standard equidistant array fixture and the IDE platen, the operator only needs to clamp individual parts or batch blanks onto the fixture, input parameters on the platen, and generate a complete machining program with a single click, completing all machining in one go. During production changeovers, only the workpiece dimension parameters on the platen need to be changed; the fixture does not need to be redesigned. For small-batch machining, the integrated roughing and finishing switch requires no tool change, further reducing auxiliary time and significantly increasing effective output per unit time.

[0175] Results: Traditional methods require measurement, CAD drawing, toolpath generation, and post-processing, taking at least 30 minutes. This invention's direct-drive parameter mode takes approximately 60 seconds from dimensional measurement to generating a complete executable NC file. It completely realizes "what you input is what you get" for non-standard parts machining, lowering the programming barrier to the level of ordinary operators.

[0176] *(Note: In the NC file generated above, the Q address in the star-pendulum macro call transmits the feed step, while the Q address in the standard fixed cycle (such as G83) follows the native fixed cycle parameter definition of the CNC system. The two are independent of each other in different instruction contexts and do not conflict with each other.)*

[0177] The above description is merely a preferred 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 protection of the present invention.

[0178] The automatic programming method and system proposed in this invention have the following significant advantages compared to existing CAM technology:

[0179] I. Significantly improved programming efficiency (specifically for drawing parsing mode)

[0180] This invention automates the entire process of converting drawings into code through automatic feature parsing and intelligent parameter decision-making, eliminating the need for operators to have complex CAM programming experience. Programming time is reduced from hours to minutes.

[0181] Second, the production changeover time has been reduced from hours to minutes.

[0182] Because the code uses parametric macro programs, operators can directly modify parameters such as Q, W, and F on the machine tool panel without having to return to the CAM software to regenerate them. Changeover time has been significantly reduced from hours to minutes, and equipment utilization has been significantly improved.

[0183] 3. Adaptive machining with allowance, achieving "one-cut coverage".

[0184] Through the locking mechanism of "radial coverage (D_eff = D + W)" and "load control (based on SF curve)", the material is cut off in one go according to the preset path, regardless of how the actual margin fluctuates, without the need for measurement and layered processing.

[0185] IV. Lightweight code reduces the burden on the CNC system.

[0186] The generated CNC code contains only a few dozen lines of macro program calls or process templates, reducing the data volume by more than 99%, which greatly reduces the memory load and transmission latency of the CNC system. When outputting custom G-code instructions (G101, etc.), the code volume is further reduced, with the instructions replacing the entire macro program.

[0187] V. Minimalist Interaction and Drawing-Free Programming (for Parameter Direct Drive Mode)

[0188] For the processing of non-standard automated parts, this invention completely breaks the conventional wisdom that "programming requires drawings / models first." Through a direct-drive parameter mode, operators only need to input basic values ​​such as length, width, and height and select the process chain. The system bypasses the extremely time-consuming geometric analysis and path calculation, directly assembling preset star-shaped process templates like "building blocks," achieving "what you input is what you get" programming in seconds. This not only eliminates the purchasing and learning barriers of traditional CAM software but also reduces on-site changeover programming time from hours to minutes, making it a tool for automated production lines to handle extremely fragmented orders.

[0189] VI. Corner self-adaptation improves processing quality.

[0190] By detecting the curvature of corners in real time and dynamically adjusting the swing amplitude W or feed rate F based on the safety boundary of the SF curve, problems such as chatter and overcutting caused by sudden changes in the tool wrap angle at corners are effectively avoided, ensuring the stability and consistency of machining throughout the entire path.

[0191] VII. Ecosystem Acceleration Effect of Custom G-Code Instructions

[0192] The custom G-code instructions (G101 / G102 / G103) provided by this invention are highly compatible with standard G-code syntax. Users only need to replace the traditional G01 / G02 / G03 with the star pendulum instructions to achieve a 5-7 times improvement in roughing efficiency. CNC system manufacturers can natively support these instructions in their systems, transforming the star pendulum technology from an "external plug-in" into a "native system function," greatly lowering the technical barriers to promotion and facilitating the exponential diffusion of the star pendulum ecosystem.

[0193] VIII. Ecosystem Compatibility of Dual-Modal Architecture

[0194] The dual-modal architecture of drawing parsing mode and parameter direct drive mode provided by this invention enables the star pendulum technology to seamlessly integrate into traditional CAD / CAM workflows while also leveraging its unique advantages in on-site, real-time machining scenarios without drawings. The parameter direct drive mode is particularly suitable for component processing and on-site repair scenarios in automated production lines, lowering the programming threshold from CAM engineers to ordinary operators, thus paving the way for the large-scale promotion of star pendulum technology in discrete manufacturing.

[0195] IX. Industrial Applicability

[0196] This invention can be widely applied to CNC milling programming in fields such as aerospace thin-walled parts, automotive die-casting parts, deep cavity molds, and medical implants. It is particularly suitable for non-standard automated parts, automated production lines, and small-batch, multi-variety scenarios. This invention significantly improves programming efficiency, reducing changeover time from hours to minutes, reducing code volume by over 90%, supporting real-time on-site adjustments and adaptive machining of allowances, and even enabling instant programming by workshop operators without drawings. It offers significant economic and social benefits.

[0197] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. An automatic programming method based on a star pendulum unit, characterized in that, include: Constructing a star pendulum unit: The star pendulum unit is formed by connecting two equal-length circular arcs with equal radii and opposite curvature directions at the midpoint. The net displacement between the beginning and end points of the star pendulum unit in the macroscopic feed direction is defined as the feed step size S. The perpendicular distance from the midpoint to the axis of the macroscopic feed direction is defined as the swing amplitude W. Let the geometric step size be S, the swing amplitude be W, and the radius R of the circular arc satisfy the geometric relationship R = (W / W). 2 + (S / 2) 2 ) / (2W); feature Analysis: Obtain the geometric feature parameters of the machining area from the machining drawings; Coordinate system establishment and feature positioning: Obtain the specified reference point, establish the workpiece coordinate system based on the reference point, transform the geometric feature parameters to this coordinate system, and assign machining positioning points to the geometric features; Parameter determination: The geometric step S is mapped to the feed step Q in the CNC system. Based on the obtained feed step Q and swing amplitude W, the machining parameters are determined. Toolpath filling: Using the star pendulum unit as the basic path, fill the machining area; Code generation: Based on the geometric feature type and positioning points, the corresponding macro program template is called, and parameterized macro program calls or G-codes, including independent Q and W address symbols, are output. When the target CNC system supports custom star pendulum G-code instructions, star pendulum linear interpolation instructions or star pendulum circular interpolation instructions can be selected for output. Here, the geometric feature type refers to the basic geometric features that make up the product shape, and the feature parameters are... The parameter values ​​for this feature type; the format of the star pendulum linear interpolation command is: G### X_ Y_ Z_ F_ Q_ W_, and the format of the star pendulum circular interpolation command is: G### X_ Y_ I_ J_ F_ Q_ W_ or G### X_ Y_ R_ F_ Q_ W_, where G### represents any unused G code number.

2. The automatic programming method based on a star pendulum unit according to claim 1, characterized in that, The reference points are obtained by the user clicking on the model through the 3D preview interface.

3. The automatic programming method based on a star pendulum unit according to claim 1, characterized in that, It also includes adaptive machining of allowance: in the radial direction, the effective cutting width D_eff=D+W is set to be greater than or equal to the maximum radial allowance of the blank, where D is the tool diameter; the system monitors the spindle load in real time and automatically adjusts the ratio of feed rate F or Q to W according to the SF curve.

4. The automatic programming method based on a star pendulum unit according to claim 1, characterized in that, It also includes corner adaptive adjustment: when a corner radius is detected, the swing amplitude W or feed rate F is automatically adjusted based on the safety boundary determined by the SF curve to adapt to the corner geometry.

5. A parameter direct-drive automatic programming method based on a star pendulum unit, wherein the star pendulum unit... As described in claim 1, the method comprises the following steps: Structured parameter reception: Without relying on the drawing parsing process, it directly receives the workpiece geometric dimension parameters and reference point coordinates input by the user through external auxiliary equipment or IDE interface of the processing equipment; Process chain arrangement: Receives the processing process information selected by the user and generates a process sequence containing at least two processing processes; Template matching and injection: retrieve the star pendulum process template corresponding to each process in the process sequence from the preset star pendulum process template library; for processes in the process sequence involving milling to remove material, inject the obtained geometric dimension parameters, feed step Q and swing amplitude W into the corresponding star pendulum process template; Direct NC file assembly: After injecting parameters, the templates of each process are physically assembled according to the process sequence to directly generate a complete NC machining file containing the star-shaped toolpath.

6. The parameter direct-drive automatic programming method based on a star pendulum unit according to claim 5, characterized in that, The process sequence includes a mixed arrangement of star-shaped milling processes and standard fixed-cycle processes; the star-shaped milling process includes at least one or more of milling the outer shape, end milling, and finishing; the standard fixed-cycle process includes at least one or more of hole machining and tapping; when the system is spliced, it automatically connects the star-shaped G-code macro call and the standard fixed-cycle G-code.

7. The parameter direct-drive automatic programming method based on a star pendulum unit according to claim 5, characterized in that, During template matching and injection, the feed step Q and swing amplitude W are determined as follows: based on the SF curve stored locally in the external auxiliary equipment or IDE interface, or obtained by communication with the CNC system, the Q value and W value corresponding to the current process are automatically obtained by table lookup or interpolation within the stable machining area.

8. An automatic programming system based on a star pendulum unit, used to execute the method according to any one of claims 1-7, characterized in that, Includes a dual-modal operation unit, the dual-modal operation unit comprising: Drawing parsing module: used to parse the features of machining drawings and generate star-shaped toolpath code (optional output macro program call or custom G-code instruction); Parameter direct drive IDE module: Deployed on the external auxiliary equipment of the processing equipment, it does not rely on the processing drawings, but only receives the geometric dimensions, reference point coordinates and process selection sequence input by the user. It performs physical code splicing by calling the preset star pendulum process template library and outputs a complete NC file with one click.

9. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method of any one of claims 1-8.