Numerical control machining methods, electronic equipment, storage media and computer program products
By integrating the key steps of CNC machining into a single main program, the problems of low efficiency and high error rate in traditional CNC machining are solved, and an automated and safe machining process is achieved.
Patent Information
- Application Number
- CN202511243652.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-09-02
AI Technical Summary
Traditional CNC machining methods suffer from low efficiency and high error rates, especially in step-by-step operation modes, which are prone to errors and safety accidents.
By acquiring the set parameter data and tool path data, a main program framework is generated, integrating coordinate system setting, milling, and machining steps into a single main program, which is then pre-set in the machine tool, and the machine tool automatically executes this main program.
It improves processing efficiency, reduces error rate, avoids version confusion and interruption issues in manual transmission, and ensures the continuity and security of processing.
Smart Images

Figure CN120779859B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent manufacturing technology, and in particular to a numerical control machining method, electronic equipment, storage medium and computer program product. Background Technology
[0002] Traditional CNC machining typically treats UG programming, post-processing, program transfer, and machine tool operation as independent, step-by-step tasks, creating a fragmented workflow. These steps resemble a relay race, with the baton potentially dropped at each handover, resulting in numerous points of human intervention. Specifically, after completing UG programming, CAM (Computer-Aided Manufacturing) engineers must manually perform post-processing and output the program, then manually transfer it to the machine tool via USB drive or network. Before machining, on-site technicians must manually search, select, and sequentially execute multiple programs on the machine tool panel (such as coordinate system setting programs, milling programs, and part machining programs). This step-by-step operation mode not only prolongs the production cycle but also easily leads to errors due to frequent manual operations, such as transmission interruptions, incorrect program version selection, or even missing a necessary program, ultimately resulting in poor machining quality or equipment safety accidents. In other words, current traditional CNC machining methods suffer from low efficiency and high error rates.
[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main purpose of this application is to provide a CNC machining method, electronic device, storage medium, and computer program product, aiming to propose a solution to improve CNC machining efficiency and reduce CNC machining error rate.
[0005] To achieve the above objectives, this application proposes a CNC machining method, which includes:
[0006] Acquire the set parameter data and the toolpath data used to generate the machining program;
[0007] The main program is generated according to the preset main program framework, the set parameter data and the tool path data. The main program includes a first call instruction for calling the coordinate system setting macro program, a second call instruction for calling the milling macro program and the machining program, which are executed sequentially. The coordinate system setting macro program and the milling macro program are preset in the machine tool.
[0008] The main program is transmitted to the machine tool so that the machine tool can execute the main program.
[0009] Optionally, the setting parameter data includes first parameter data, second parameter data, and third parameter data;
[0010] The step of generating the main program based on the preset main program framework, the set parameter data, and the toolpath data includes:
[0011] The first calling instruction is generated based on the first instruction generation template and the first parameter data in the main program framework. The first calling instruction is used to call the coordinate system setting macro program and pass parameters to the coordinate system setting macro program.
[0012] The second calling instruction is generated based on the second instruction generation template and the second parameter data in the main program framework. The second calling instruction is used to call the milling macro program and pass parameters to the milling macro program.
[0013] The machining formula is generated based on the third parameter data and the toolpath data;
[0014] Based on the execution order of the main program instructions indicated in the main program framework, a main program is generated that includes at least the first call instruction, the second call instruction, and the processing program.
[0015] Optionally, the main program framework further includes a coordinate system setting state detection instruction, and the step of generating the main program, which includes at least the first calling instruction, the second calling instruction, and the machining program, according to the execution order of the main program instructions indicated in the main program framework, includes:
[0016] According to the execution order of the main program instructions indicated in the main program framework, a main program is generated that includes at least the first call instruction, the coordinate system setting state detection instruction, the second call instruction, and the machining program. The coordinate system setting state detection instruction is executed after the first call instruction and before the second call instruction, and is used to output an alarm when the first preset variable is detected to be not the first preset value. The coordinate system setting macro program includes an instruction to assign the first preset value to the first preset variable after the coordinate system setting is completed.
[0017] Optionally, the main program framework further includes a milling state detection instruction, and the step of generating the main program, which includes at least the first calling instruction, the second calling instruction, and the machining program, according to the execution order of the main program instructions indicated in the main program framework, includes:
[0018] According to the execution order of the main program instructions indicated in the main program framework, a main program is generated that includes at least the first call instruction, the second call instruction, the milling state detection instruction, and the machining program. The milling state detection instruction is executed after the second call instruction and before the machining program. It is used to output an alarm when the second preset variable is detected to be not the second preset value. The milling macro program includes an instruction to assign the second preset value to the second preset variable after the coordinate system is set.
[0019] Optionally, the first parameter data includes at least one of the following: Z-value acquisition method, split-center method, probe type, and the position of each detection point in the digital model.
[0020] Optionally, the third parameter data includes tool parameter names corresponding to each machining step of the machining program, and the tool parameter names are bound to the machine tool; after the step of generating the main program based on the preset main program framework, the set parameter data, and the tool path data, the program further includes:
[0021] Obtain tool parameter information obtained by automatically setting the tools used to load them into the machine tool magazine;
[0022] Based on the binding relationship between the machine tool and the tool parameter name, the tool parameter information is written into the register corresponding to the tool parameter name, so that the machine tool can obtain the tool parameter information from the register corresponding to the tool parameter name when executing the main program.
[0023] Optionally, after the step of obtaining the toolpath data, the method further includes:
[0024] Generate a program sheet corresponding to the toolpath data, the program sheet including a tool list;
[0025] Output the program sheet, which is at least used to instruct the tool installer to install tools according to the tool list.
[0026] In addition, to achieve the above objectives, this application also proposes an electronic device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the numerical control machining method as described above.
[0027] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the numerical control machining method described above.
[0028] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the numerical control machining method described above.
[0029] One or more technical solutions proposed in this application have at least the following technical effects:
[0030] In this application, a data foundation for CNC machining is provided by acquiring setting parameter data and toolpath data for generating machining programs. A main program is generated based on a preset main program framework, setting parameter data, and toolpath data. The main program includes a first call instruction for calling the coordinate system setting macro program, a second call instruction for calling the milling macro program, and the machining program, which are executed sequentially. The coordinate system setting macro program and the milling macro program are preset in the machine tool, realizing the automatic integration of instructions for coordinate system setting, milling, machining, and other steps into a single main program. The main program is then transmitted to the machine tool for execution to achieve part machining. Compared to the traditional model, where operators need to manually and step-by-step call multiple independent programs such as coordinate system setting, milling, and part machining, it is easy to miss a step in batch processing (such as forgetting to set the coordinate system), resulting in batch scrap or equipment collisions. This application locks the three key steps (coordinate system setting, milling, and machining) in a single program in sequence through the rigid structure of the main program framework and transmits them to the machine tool. This allows the operator to start the program only once, and the machine tool will execute all operations in sequence without the need for manual judgment or program switching. On the one hand, this improves processing efficiency, and on the other hand, it avoids version confusion or interruption problems in manual transmission, thereby reducing the error rate. Attached Figure Description
[0031] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0032] 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, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 This is a flowchart illustrating the first embodiment of the CNC machining method of this application.
[0034] Figure 2 This is a flowchart illustrating the second embodiment of the CNC machining method of this application.
[0035] Figure 3 A flowchart illustrating the fourth embodiment of the CNC machining method of this application;
[0036] Figure 4 This is another schematic flowchart provided for the fourth embodiment of the CNC machining method of this application;
[0037] Figure 5 This is a schematic diagram of the equipment structure of the hardware operating environment involved in the CNC machining method in the embodiments of this application.
[0038] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0039] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0040] It should be noted that in the description of this application and the appended claims, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0041] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0042] Traditional CNC machining typically treats UG programming, post-processing, program transfer, and machine tool operation as independent, step-by-step tasks, creating a fragmented workflow. These steps resemble a relay race, with the baton potentially dropped at each handover, resulting in numerous points of human intervention. Specifically, after completing UG programming, the CAM engineer must manually perform post-processing and output the program, then manually transfer it to the machine tool via USB drive or network. Before machining, the on-site technician must manually search, select, and sequentially execute multiple programs on the machine tool panel (such as coordinate system setting programs, milling programs, and part machining programs). This step-by-step operation mode not only prolongs the production cycle but also easily leads to errors due to frequent manual operations, such as transmission interruptions, incorrect program version selection, or even missing a necessary program, ultimately resulting in poor machining quality or equipment safety accidents. In other words, current traditional CNC machining methods suffer from low efficiency and high error rates.
[0043] This application provides a solution that provides a data foundation for CNC machining by acquiring set parameter data and toolpath data for generating machining programs. A main program is generated based on a preset main program framework, set parameter data, and toolpath data. The main program includes a first call instruction for calling the coordinate system setting macro program, a second call instruction for calling the milling macro program, and the machining program, which are executed sequentially. The coordinate system setting macro program and the milling macro program are pre-set in the machine tool, thus automatically integrating the instructions for coordinate system setting, milling, and machining into a single main program. The main program is then transmitted to the machine tool for execution to perform part machining. Compared to the traditional model, where operators need to manually and step-by-step call multiple independent programs such as coordinate system setting, milling, and part machining, it is easy to miss a step in batch processing (such as forgetting to set the coordinate system), resulting in batch scrap or equipment collisions. This application locks the three key steps (coordinate system setting, milling, and machining) in a single program in sequence through the rigid structure of the main program framework and transmits them to the machine tool. This allows the operator to start the program only once, and the machine tool will execute all operations in sequence without the need for manual judgment or program switching. On the one hand, this improves processing efficiency, and on the other hand, it avoids version confusion or interruption problems in manual transmission, thereby reducing the error rate.
[0044] It should be noted that the executing entity in this embodiment can be an intelligent manufacturing system, which can integrate computer-aided manufacturing (CAM) software, a post-processing system, and program transmission functions. The intelligent manufacturing system can be deployed in electronic devices with data processing, network communication, and program execution capabilities, such as servers, tablets, personal computers, and mobile phones. (Refer to...) Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the CNC machining method of this application. In this embodiment, the CNC machining method includes steps S10 to S30:
[0045] Step S10: Obtain the set parameter data and the toolpath data used to generate the machining program.
[0046] The parameter settings can be machining configuration information input by the operator through the human-machine interface of the intelligent manufacturing system. This includes machining configuration information related to coordinate system settings, milling, and / or machining (excluding milling), such as workpiece coordinate system type (e.g., G54 or G55), tool number and tool compensation number matching relationship, origin setting method of the machining coordinate system (e.g., automatic centering or single-sided data acquisition), fixture type, and probe parameters. Toolpath data originates from CAM software, such as UG software. This data contains tool motion trajectory information generated from the CAD (Computer-Aided Design) model after machining strategy planning. Specifically, it consists of a series of machining instructions such as tool positioning point coordinates, feed rate, and spindle speed, used to describe the tool's movement path and machining method relative to the workpiece. Toolpath data can be post-processed to generate machining programs. These machining programs can then be executed by the machine tool's CNC system (hereinafter referred to as the machine tool) to perform machining on the part (excluding milling). In this embodiment, a program (CNC Program) refers to a program that can be directly executed by a machine tool, such as G-code. CNC refers to a Computer Numerical Control system.
[0047] Step S20: Generate a main program based on the preset main program framework, the set parameter data, and the tool path data. The main program includes a first call instruction for calling the coordinate system setting macro program, a second call instruction for calling the milling macro program, and the machining program, which are executed sequentially. The coordinate system setting macro program and the milling macro program are preset in the machine tool.
[0048] The default main program framework is a predefined program structure template used to specify the execution logic and order of each program. For example, it may include safety initialization instructions (such as G90 / G80 modal instruction reset), macro program call sequence, and program termination instructions.
[0049] A post-processing system can be integrated into the intelligent manufacturing system. This post-processing system can pre-define post-processing logic corresponding to the main program framework. Based on this post-processing logic, and according to the main program framework and the aforementioned setting parameter data and toolpath data, an executable CNC main program (hereinafter referred to as the main program) is generated. In other words, the post-processing logic is essentially the processing logic for converting and filling the setting parameter data and toolpath data into the template of the main program framework. The main program includes at least a call instruction for invoking the coordinate system setting macro program (hereinafter referred to as the first call instruction), a call instruction for invoking the milling macro program (hereinafter referred to as the second call instruction), and a machining program. The order of execution of the first call instruction, the second call instruction, and the machining program in the main program is: first, the first call instruction; then, the second call instruction; and finally, the machining program. The coordinate system setting macro program and the milling macro program are pre-stored in the machine tool. The coordinate system setting macro program may include a macro program that automatically measures the workpiece with a probe, calculates the coordinate system origin, and writes the coordinate system origin into the corresponding coordinate system register. A milling macro can be a macro that controls the area and depth of milling through parameterized variables.
[0050] Step S30: The main program is transmitted to the machine tool so that the machine tool can execute the main program.
[0051] The generated main program can be transmitted to the machine tool via the workshop network or a direct data connection. After receiving the main program, the operator can call and start it, and the machine tool will automatically execute it in sequence: first, the coordinate system setting macro program is called to measure and set the workpiece coordinate system through the physical probe; then, the milling macro program is called to complete the planar milling; finally, the machining program segment is executed to control the tool to complete the finishing operation along the predetermined path, thereby realizing a fully automated machining process.
[0052] In one feasible implementation, the machining start signal can be automatically triggered via PLC (Programmable Logic Controller) signal interaction, enabling the machine tool to operate continuously for 24 hours.
[0053] In this embodiment, the data foundation for CNC machining is provided by acquiring the set parameter data and the tool path data used to generate the machining program. The main program is generated according to the preset main program framework, set parameter data, and tool path data. The main program includes a first call instruction for calling the coordinate system setting macro program, a second call instruction for calling the milling macro program, and the machining program, which are executed sequentially. The coordinate system setting macro program and the milling macro program are preset in the machine tool, realizing the automatic integration of the instructions for coordinate system setting, milling, machining, and other steps into a single main program. The main program is then transmitted to the machine tool for the machine tool to execute the main program to realize the machining of the part. Compared to the traditional method, where operators need to manually and step-by-step call multiple independent programs such as coordinate system setting, milling, and part machining, it is easy to miss a step in batch processing (such as forgetting to set the coordinate system), leading to batch scrap or equipment collisions. This application, through the rigid structure of the main program framework, locks the three key steps (setting → milling → machining) sequentially into a single program and transmits it to the machine tool. This allows the operator to start the program only once, and the machine tool will execute all operations in sequence without manual judgment or program switching. On the one hand, this improves processing efficiency, and on the other hand, it avoids version confusion or interruption problems in manual transmission, thereby reducing the error rate. In addition, in the traditional machining method, coordinate system setting, milling, and part machining are three separate programs that require the operator to manually and step-by-step call and execute on the machine tool. In batch processing, the operator is very likely to forget to run a program (for example, forgetting to run the coordinate system setting program before starting machining). In this embodiment, a main program is generated according to a preset main program framework. The main program includes a first call instruction for calling the coordinate system setting macro program, a second call instruction for calling the milling macro program, and a machining program, which are executed sequentially. This allows the operator to call and start this main program at the machine tool end, and the machine tool will automatically execute all steps in sequence, thus eliminating the risk of "missing the program" from the root.
[0054] Based on the first embodiment described above, a second embodiment of the CNC machining method of this application is proposed. In this embodiment, content that is the same as or similar to that in the first embodiment can be referred to the above description and will not be repeated hereafter. In this embodiment, the set parameter data may include first parameter data, second parameter data, and third parameter data for generating the machining program. (Refer to...) Figure 5 Step S20 includes S201 to S204:
[0055] Step S201: Generate the first calling instruction based on the first instruction generation template and the first parameter data in the main program framework. The first calling instruction is used to call the coordinate system setting macro program and pass parameters to the coordinate system setting macro program.
[0056] The first parameter data is configuration information specifically used for setting the coordinate system macro program. For example, it may include the mechanical coordinate values of the probe detection point, the selection of the centering method (such as centering on four sides or taking data on one side), the Z value data datum (such as the top surface of the workpiece or the datum surface of the fixture), and the probe type. These parameters determine how the machine tool probe performs workpiece measurement and coordinate system calculation.
[0057] The post-processing system can generate a first call instruction based on a preset first instruction generation template and first parameter data in the main program framework. The first instruction generation template refers to the instruction format template designed in the main program framework for calling the coordinate system setting macro program. It may contain the macro program call instruction, the program number of the coordinate system setting macro program, and parameter passing address characters. The generation process can be, for example, as follows: determine the parameters that need to be passed to the coordinate system setting macro program based on the first parameter data, map these parameters to the corresponding parameter passing address characters in the template, and finally form a complete first call instruction. The function of this first call instruction is to command the machine tool to execute the pre-stored coordinate system setting macro program and pass the parameters to the coordinate system setting macro program, enabling it to automatically measure and set the workpiece coordinate system according to the specified parameters.
[0058] Step S202: Generate the second calling instruction based on the second instruction generation template and the second parameter data in the main program framework. The second calling instruction is used to call the milling macro program and pass parameters to the milling macro program.
[0059] The second parameter data consists of machining parameters specifically designed for milling macro programs. These parameters may include geometric dimensions such as the length, width, and depth of the milling area, or data used to calculate these dimensions. These dimensions will control the range and depth of the milling process.
[0060] The post-processing system can generate a second call instruction based on the second instruction generation template and second parameter data in the main program framework. The second instruction generation template is an instruction format template designed for the main program to call the milling macro program. Similar to the first instruction generation template, it may also contain a macro program call instruction, the program number of the milling macro program, and parameter passing address characters. The generation process can be, for example, as follows: determine the parameters to be passed to the milling macro program based on the second parameter data (e.g., length 100.0, width 50.0, depth 2.0), map these parameters to the corresponding parameter passing address characters in the template, and generate the second call instruction. This second call instruction is used to call the pre-stored milling macro program in the machine tool and pass the parameters to the milling macro program, enabling the milling macro program to automatically calculate the tool path and complete the planar milling machining based on these parameters.
[0061] Step S203: Generate the machining formula based on the third parameter data and the tool path data.
[0062] The third parameter data is used to generate machining programs. For example, it may include tool number and tool compensation number, or specific cutting parameters such as the rotational speed, feed rate, step distance, and depth of cut of the finishing tool. These data will directly affect the machining quality and efficiency of the final part.
[0063] The post-processing system can generate machining programs based on third parameter data and toolpath data. For example, the post-processing system uses toolpath data (i.e., the geometric trajectory of tool movement) and third parameter data (such as spindle speed S2000, feed F500, etc.) to convert this information into a specific G-code instruction sequence that can be executed by the machine tool. This includes motion instructions such as G00 rapid positioning, G01 linear interpolation, and G02 / G03 circular interpolation, as well as corresponding auxiliary function instructions such as spindle start / stop and coolant control, forming a complete finishing program segment.
[0064] In one feasible implementation, the third parameter data may also include a machining coordinate system type, used to specify the coordinate system referenced by the machining step.
[0065] Step S204: Generate the main program, which includes at least the first calling instruction, the second calling instruction, and the processing program, according to the execution order of the main program instructions indicated in the main program framework.
[0066] The post-processing system can integrate and assemble the aforementioned first call instruction, second call instruction, and machining program according to the predefined program structure logic in the main program framework, following a prescribed execution order. The main program framework explicitly defines the execution order of these components: first, coordinate system setting is executed (first call instruction), then planar milling is executed (second call instruction), and finally finishing machining (machining program). The post-processing system embeds these components into a complete program structure containing a program header (safety initialization instruction) and a program tail (tool homing, program end instruction), ultimately generating a continuously executable main program file.
[0067] In one feasible implementation, the main program framework further includes a coordinate system setting state detection instruction, and step S204 includes:
[0068] S2041, according to the execution order of the main program instructions indicated in the main program framework, generate a main program that includes at least the first call instruction, the coordinate system setting state detection instruction, the second call instruction, and the machining program, wherein the coordinate system setting state detection instruction is executed after the first call instruction and before the second call instruction, and is used to output an alarm when the first preset variable is detected to be not the first preset value, and the coordinate system setting macro program includes an instruction to assign the first preset value to the first preset variable after the coordinate system setting is completed.
[0069] In this embodiment, a proactive error prevention mechanism is introduced to ensure the reliability of the processing flow. In addition to the basic instruction execution sequence, the main program framework can also define a key coordinate system setting status detection instruction for status checking and logical judgment. Essentially, it is a quality control node embedded in the main program flow.
[0070] When assembling the final main program, the post-processing system follows the execution sequence logic defined by the main program framework. This sequence requires: the machine tool first executes the first call instruction, that is, runs the coordinate system setting macro program to complete the calibration of the workpiece coordinate system; before starting any subsequent machining action, the coordinate system setting status check instruction is executed; only after passing this status check can the second call instruction (calling the milling macro program) and subsequent machining programs be executed. This sequential arrangement constitutes a strict "set-verify-execute" closed-loop process, logically eliminating the possibility of forcibly performing machining if the coordinate system setting fails.
[0071] The specific function of this coordinate system setting status detection instruction is to detect whether the current value of the first preset variable is equal to the first preset value. The first preset variable can be a specific, readable and writable storage unit in the CNC system of the machine tool, used to pass status flags between different program modules. The first preset value is a predefined specific numerical value (e.g., 1) representing success. The coordinate system setting status detection instruction can be a conditional statement with the following logic: if the value of the first preset variable is not equal to the first preset value, jump to the alarm routine or directly trigger an alarm and stop the machine; or, it can be: if the value of the first preset variable is equal to the third preset value, jump to the alarm routine or directly trigger an alarm and stop the machine. The third preset value is a pre-set value different from the first preset value (e.g., 0). For example, the coordinate system setting status detection instruction in G-code might be expressed as "IF [#500 EQ 0] GOTO ERROR", where #500 is the first preset variable, 0 is the third preset value, and the first preset value is not 0, such as 1.
[0072] To ensure the effectiveness of this error prevention mechanism, the coordinate system setting macro program is designed to assign a first preset value to a first preset variable after successfully completing all measurement and calculation tasks. This means that only after the coordinate system setting macro program has been fully executed and the calculation results have been correctly written into the machine tool coordinate system (such as G54) will it execute an instruction such as "#500=1" to send a confirmation signal to subsequent program modules that "the coordinate system has been successfully set". If the coordinate system setting macro program fails or is not fully executed due to any reason such as the probe not being triggered or the calculation exceeding the tolerance, this assignment statement will not be executed, and the first preset variable will remain in its original state (usually 0 or empty). This allows the subsequent status detection instruction to immediately detect the abnormality and trigger an alarm, forcibly interrupting the machining process and waiting for operator intervention, thereby effectively avoiding batch scrap or machine tool collision accidents caused by coordinate system errors.
[0073] In one feasible implementation, the main program framework further includes a milling surface state detection instruction, and step S204 includes:
[0074] Step S2042: Based on the execution order of the main program instructions indicated in the main program framework, generate a main program that includes at least the first call instruction, the second call instruction, the milling state detection instruction, and the machining program. The milling state detection instruction is executed after the second call instruction and before the machining program, and is used to output an alarm when the second preset variable is detected to be not the second preset value. The milling macro program includes an instruction to assign the second preset value to the second preset variable after the coordinate system is set.
[0075] The post-processing system follows the execution sequence logic defined by the main program framework when integrating the main program. This sequence requires that after the machine tool successfully executes the first call instruction (i.e., setting the coordinate system) and the second call instruction (i.e., calling the milling macro program for actual milling), and before starting the final machining program, a milling status detection instruction is inserted and executed. This sequence constitutes a continuous process chain of "setting the coordinate system - executing milling - verifying milling results - executing machining," ensuring that subsequent finishing operations, which may use smaller diameter tools and finer cutting forces, will only be initiated after the milling operation has been confirmed as successful. This avoids the risks of tool damage, overcutting, or workpiece scrap that may result from performing finishing operations when milling is incomplete or has failed.
[0076] The specific function of this milling status detection instruction is to detect whether the current value of a second preset variable is equal to a second preset value. Like the first preset variable, the second preset variable is a global variable used in the CNC system to transmit status signals between different program modules, but it is specifically used to identify the status of the milling operation. The second preset value is a specific numerical value representing a successful milling operation. This milling status detection instruction can be a conditional statement with the following logic: if the current value of the second preset variable is not equal to the second preset value, jump to the alarm routine or directly trigger an alarm and stop the machine; or, it can be: if the value of the second preset variable is equal to a fourth preset value, jump to the alarm routine or directly trigger an alarm and stop the machine. The fourth preset value is a pre-set value different from the second preset value. For example, the milling status detection instruction in G-code might be expressed as "IF [#100 EQ 0] GOTO ERROR", where #100 is the second preset variable, 0 is the fourth preset value, and the second preset value is not 0, such as 1.
[0077] To achieve the aforementioned detection function, the milling macro program is designed to assign a second preset value to a second preset variable after successfully completing all milling calculations and machining paths. This means that only after the milling macro program has executed all milling operations completely and without error will it send a confirmation signal to subsequent program modules, such as "#100=1", indicating that the milling operation has been successfully completed. If the milling macro program fails or terminates abnormally due to any reason such as tool breakage, insufficient power, or exceeding the travel limit, this final status assignment statement will not be executed, and the second preset variable will remain unchanged (usually 0). This allows the subsequent milling status detection instruction to immediately detect the abnormal state and activate the alarm system, thereby preventing the program from entering the finishing stage at the first opportunity. This effectively protects the safety of the workpiece, tool, and equipment, ensuring the reliability and continuity of the entire machining process.
[0078] In one feasible implementation, the process can be monitored through an HMI (Human-Machine Interface): the program execution status is displayed in real time. If the coordinate system is successfully set, "Coordinate system set" is displayed. If the milling program is completed, "Milling completed" is displayed.
[0079] Based on the second embodiment described above, a third embodiment of the CNC machining method of this application is proposed. In this embodiment, content that is the same as or similar to the first and second embodiments described above can be referred to the above description and will not be repeated hereafter. In this embodiment, the first parameter data may include at least one of the following: Z-value acquisition method, center-division method, probe type, and the position of each detection point in the digital model.
[0080] The Z-value acquisition method is the parameter data that determines the reference plane of the Z-axis zero point, used to determine whether the Z-value measured by the probe is relative to the top surface of the workpiece, the reference surface of the fixture, or the machine tool worktable surface. Different Z-value acquisition methods correspond to different coordinate system macro programs. The centering method is the parameter data that determines the mathematical algorithm and number of points for detection, such as whether the mathematical algorithm determines whether to find the center by dividing the four sides, taking data from a single side, or finding the center of an inner hole, etc. Each method requires a different number of points and has different calculation logic, corresponding to different coordinate system macro programs. Different brands or models of probes may correspond to different coordinate system macro programs; the probe type is the parameter data that determines which coordinate system macro program to use. The positions of each detection point in the digital model are parameter data used to provide the precise geometric coordinates of the detection target.
[0081] The post-processor can dynamically construct the final first call instruction based on the first instruction generation template in the main program framework and the specific content in the first parameter data mentioned above. The first instruction generation template can be a paradigm that defines the call instruction structure and parameter placeholders, and can include macro program call instructions (such as G65), program numbers of multiple coordinate system setting macro programs (such as P9xxx), and parameter passing address characters (such as X, Y, Z, A, B, etc.). The generation process is as follows: The post-processing system determines the macro program number corresponding to the parameter data "probe type" and "segmentation" from multiple macro program numbers in the first instruction generation template, thereby determining the number after the "P" address in the first call instruction; The post-processing system determines the coordinate values of each probe point, such as the coordinate values of the four sides, based on the parameter data "position of each probe point in the digital model", and maps these coordinate values to the corresponding parameter passing address in the first instruction generation template; The post-processing system maps the parameter data "Z value acquisition method" to the corresponding parameter passing address in the first instruction generation template to pass it to the coordinate system setting macro program, informing it how to calculate the Z-axis zero point.
[0082] Through the aforementioned mapping and filling mechanism, the post-processing system ultimately generates a complete and executable first call instruction. For example, it generates "G65 P9011 X100.0 Y50.0 Z-5.0 R1.0", where G65 is the macro program call instruction, P9011 is the program number of the coordinate system setting macro program determined based on the probe type and the centering method, the X, Y, and Z values originate from the probe point position, and R1.0 represents the Z value acquisition method. After this instruction is sent to the machine tool, the machine tool's CNC system will execute its internally stored coordinate system setting macro program corresponding to P9011 and receive these parameter values, thereby completing the automatic and precise setting of the entire coordinate system according to these specific work instructions.
[0083] In one feasible implementation, the parameter data may further include the fixture type. The fixture type is parameter data that determines the safe movement path and avoidance points of the probe. Different fixtures (such as vises, clamps, and chucks) have different shapes, sizes, and positions, and the probe must avoid them during movement and probing to prevent collisions. The post-processing system can generate a tool safe movement path instruction based on the "fixture type" parameter data, placing this instruction before or after the first call instruction in the main program to ensure that the probe can effectively avoid fixture obstacles during movement.
[0084] Based on the second embodiment described above, a fourth embodiment of the CNC machining method of this application is proposed. In this embodiment, content that is the same as or similar to the first, second, and third embodiments described above can be referred to the above description and will not be repeated hereafter. In this embodiment, the third parameter data includes tool parameter names corresponding to each machining step of the machining program, and the tool parameter names are bound to the machine tool. The tool parameter name is not a physical attribute of the tool itself, but rather a variable name representing the tool's identity and compensation value, such as tool number T01, tool length compensation number H01, and tool radius compensation number D01, etc. In a feasible implementation, when the post-processing system generates the machining program based on the third parameter data and tool path data, it can use the tool parameter name corresponding to the machining step in the third parameter data as the tool parameter name for the corresponding machining step in the machining program.
[0085] Tool parameter names can be pre-configured to establish a binding relationship with specific machine tools, so that the tool parameter names of each machining step in the generated machining program correspond to the tool parameter information in the corresponding register of the machine tool.
[0086] In one feasible implementation, refer to Figure 3 After step S20, steps S40 to S50 are also included:
[0087] Step S40: Obtain tool parameter information obtained by automatically setting the tool for loading into the machine tool magazine.
[0088] Intelligent manufacturing systems can integrate tool management systems. The tool management system acquires tool parameter information from the automated measurement process of physical tools about to be loaded into the machine tool magazine. Specifically, operators can use automated measuring equipment such as external tool setters (e.g., external laser tool setters with contact probes) to measure the tools mounted on the tool holders. The resulting precise tool length and radius values are automatically collected and uploaded to the tool management system; these measurement results constitute the "tool parameter information." The tool management system can store the tool parameter information of each tool in a central tool database.
[0089] Step S50: Based on the binding relationship between the machine tool and the tool parameter name, the tool parameter information is written into the register corresponding to the tool parameter name, so that the machine tool can obtain the tool parameter information from the register corresponding to the tool parameter name when executing the main program.
[0090] The tool management system, based on the established "machine tool-tool parameter name" binding relationship (for example, the system knows that T01 / H01 / D01 in the main program of the machine tool corresponds to tool position 01 in its physical tool magazine), writes the acquired specific tool parameter values (such as length 15.2mm, radius 5.0mm) into the physical registers corresponding to the tool parameter names in the machine tool (for example, writing the length value 15.2 to register H01 and the radius value 5.0 to register D01). When the machine tool starts executing the main program, it can directly obtain accurate tool parameter information obtained from automatic tool setting from registers such as H01 and D01, thereby driving the machine tool to perform precise machining, completely avoiding errors and interruptions that may be caused by manual measurement and input.
[0091] In one feasible implementation, refer to Figure 4 After step S10, which involves obtaining the toolpath data, steps S60-S70 are also included:
[0092] Step S60: Generate a program sheet corresponding to the tool path data, the program sheet including a tool list.
[0093] After obtaining the toolpath data, the corresponding program sheet can be generated using UG software. "Toolpath data" is the raw data set calculated by CAM software that describes the tool's movement trajectory, while the "program sheet" is a structured report document formed by analyzing this data, extracting and formatting key process information. This program sheet may include a tool list, which includes information about the tools required for each machining step, such as the tool number, tool type, geometric parameters, cutting parameters, and specific machining operations for each tool in the machining program.
[0094] In some feasible implementations, the program sheet may also include part drawing number, program name, machining coordinate system, clamping diagram and important machining precautions (such as "new cutting tools are required for finishing"), making it a comprehensive guidance document for operators to debug machine tools, quality inspectors to verify products and managers to trace production.
[0095] Step S70: Output the program sheet, which is at least used to instruct the tool installer to install tools according to the tool list.
[0096] The output of the toolsheet can be in a printable and viewable electronic document format, such as a PDF file. The core purpose of the toolsheet is to provide precise instructions for downstream physical production activities, including instructing tool installers to install tools according to the tool list. Tool installers do not need to consult complex CAD models or CAM software interfaces; they can accurately know which tools need to be prepared, the specific specifications of each tool, and which tool position on the machine tool they will be installed in, simply by referring to the tool list on this toolsheet. This allows them to complete tool assembly, measurement, and other preparation work in parallel and efficiently.
[0097] Traditional machining methods rely on in-machine tool setting and manual tool length confirmation, resulting in a separation between the preparation stage (such as tool measurement) and the machining stage. Manual operation is time-consuming (typically several minutes) and cannot achieve parallel tool measurement and machining, impacting overall equipment utilization and production efficiency. This embodiment, however, implements a parallel tool management mechanism, enabling "measuring the next workpiece tool during machining," bringing changeover preparation time close to zero and maximizing equipment utilization.
[0098] It should be noted that the above embodiments can be combined to achieve full-process automation and reduced cycle time. Through a CAM-machine tool integrated intelligent manufacturing system, automatic program transfer is achieved (eliminating manual USB copying / network transmission interruptions), reducing the traditional 20-minute program transfer and debugging time to the second level. By integrating coordinate system setting, roughing, and finishing (single main program sequential execution) through the main program framework, manual start / stop intervals between processes are eliminated, reducing the single-piece machining cycle time by 15%-20%. Through a parallel tool management system, "measuring the next workpiece tool during machining" is achieved, bringing changeover preparation time close to zero and maximizing equipment utilization. The system features: PLC-triggered automatic processing enables 24-hour continuous operation, achieving an OEE (Overall Equipment Effectiveness) exceeding 80% with zero human intervention and a precision closed-loop system; automatic tool parameter compensation (accuracy ±0.002mm) is achieved through an external laser tool setter and contact probe, eliminating manual tool setting errors; automatic workpiece zero-point calibration via machine tool probe (G54 setting error ≤0.005mm) improves accuracy by 5 times compared to manual centering, enhancing process stability; and mandatory detection of pre-process steps via status detection commands in the main program (e.g., alarm if no milling is performed), preventing over 50% of collision accidents.
[0099] Based on the CNC machining method implemented in combination with the above embodiments, the following is an example of a work process.
[0100] Development phase:
[0101] 1. Develop the main program framework within UG software and import it into the intelligent manufacturing system. The intelligent manufacturing system is then connected to the program post-processing system.
[0102] 2. Develop milling macro programs within the machine tool, using variable integration for all programs, and import the variable numbers used into the UG software;
[0103] 3. Develop coordinate system setting macro programs (such as automatic centering and marking macro programs), import them into the machine tool, and bind them with the intelligent manufacturing system and UG software;
[0104] Programming stage:
[0105] 4. Before machining the target part, the CAM programmer programs in the UG software to establish and sort the machining steps, and the UG software generates toolpath data.
[0106] 5. After selecting the toolpath data corresponding to all machining steps, select the specific post-processing function added in the UG software and wait for the toolpath data to be post-processed.
[0107] 6. After selecting the toolpath data corresponding to all machining steps, select the "Generate Program Sheet" function in the UG software and mark the machining precautions in the program sheet;
[0108] 7. Export the program sheet as a PDF and return to the processing page;
[0109] 8. Click the automatic centering command in the steel part programming, and specify the fixture type, Z value acquisition method, centering method, and select the side head type in sequence;
[0110] 9. In the machining model, select the X+, X-, Y+, and Y- measurement points in sequence, and then click OK to save.
[0111] On-site operation phase:
[0112] 10. On-site machining technicians log into the intelligent manufacturing system and check whether toolpath data is generated by scanning the program barcode or entering the material code;
[0113] 11. If yes, select the steel part name according to the program sheet and drawing version number; if no, provide feedback to the CAM programmer. After the CAM programmer confirms that the post-processing function has been triggered, provide feedback to the on-site technician.
[0114] 12. Select the machine tool brand and serial number, select the coordinate system type such as G54, select the tool number and tool compensation number according to the tool model in the program sheet, and click "Generate Program and Upload";
[0115] 13. Click the "CNC Program Management" dialog box to check if the main program has been generated and uploaded successfully;
[0116] Tool loading stage:
[0117] 14. Upload the program sheet to the tool loading area;
[0118] 15. The tool-loading technician loads the tools according to the tool model and cutting depth indicated on the program sheet provided by the on-site feedback;
[0119] 16. The on-site technician determines whether a tool needs to be installed in the tool loading area. If so, the PDA (wireless handheld terminal) is used to remove the tool holder from the machine tool and send it to the tool loading area.
[0120] 17. The tool-setting technician uses a computer to access the intelligent management system and unbinds the tool holder from the machine tool in the system;
[0121] 18. Select the machine tool brand and serial number to install the tool, scan the tool holder QR code to bind the tool holder to the machine tool, select the tool brand, and enter the tool overhang length;
[0122] 19. Select the external tool setting function, scan the tool holder QR code, and bind the tool holder with the tool parameter information obtained from the external tool setting;
[0123] 20. Move the cutting tool to the equipment where it needs to be installed, hand it to the operator, and use the PDA to install the required cutting tool onto the equipment;
[0124] Program execution phase:
[0125] 21. Open the machine tool program folder, select the main program to be executed, clamp the workpiece, and start the machine tool with one click to process the workpiece.
[0126] This application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the CNC machining method described in the above embodiments.
[0127] The following is for reference. Figure 5 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of this application. The electronic devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0128] like Figure 5 As shown, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. The communication device 1009 allows the electronic device to communicate wirelessly or wiredly with other devices to exchange data. Although the diagrams show electronic devices with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented alternatively.
[0129] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0130] The electronic device provided in this application adopts the CNC machining method in the above embodiments. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the CNC machining method provided in the above embodiments. Furthermore, the other technical features of the electronic device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0131] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0132] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0133] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the CNC machining method in the above embodiments.
[0134] The computer-readable storage medium provided in this application embodiment may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0135] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.
[0136] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by an electronic device, cause the electronic device to perform the functions defined in the methods of the embodiments disclosed in this application.
[0137] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof. These programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0138] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0139] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0140] The readable storage medium provided in this application embodiment is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-described CNC machining method. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application embodiment are the same as the beneficial effects of the CNC machining method provided in the above-described embodiments, and will not be repeated here.
[0141] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the numerical control machining method described above.
[0142] Compared with the prior art, the beneficial effects of the computer program product provided in this application embodiment are the same as the beneficial effects of the CNC machining method provided in the above embodiments, and will not be repeated here.
[0143] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method of numerically controlled machining, characterized by, The numerical control machining method comprises: obtaining setting parameter data and tool path data for generating an addendum equation; generating a main program according to a preset main program framework, the setting parameter data and the tool path data, wherein the main program comprises a first calling instruction for calling a coordinate system setting macro program, a second calling instruction for calling a milling surface macro program and the addendum equation which are executed in sequence, and the coordinate system setting macro program and the milling surface macro program are preset in a machine tool; wherein the main program framework further comprises a quality control node in addition to a basic instruction execution sequence, and the quality control node comprises a coordinate system setting state detection instruction for state checking and logical judgment; the execution sequence of the coordinate system setting state detection instruction is after the first calling instruction and before the second calling instruction, and the coordinate system setting state detection instruction is used to output an alarm when a first preset variable is detected to be not a first preset value, and the coordinate system setting macro program comprises an instruction for assigning the first preset value to the first preset variable after completion of coordinate system setting; transmitting the main program to the machine tool for execution of the main program by the machine tool.
2. The numerical control machining method according to claim 1, wherein The setting parameter data comprises first parameter data, second parameter data and third parameter data. The step of generating the main program according to the preset main program framework, the setting parameter data and the tool path data comprises: generating the first calling instruction according to a first instruction generation template in the main program framework and the first parameter data, the first calling instruction being used to call the coordinate system setting macro program and input parameters into the coordinate system setting macro program; generating the second calling instruction according to a second instruction generation template in the main program framework and the second parameter data, the second calling instruction being used to call the milling surface macro program and input parameters into the milling surface macro program; generating the addendum equation according to the third parameter data and the tool path data; generating the main program comprising at least the first calling instruction, the second calling instruction and the addendum equation according to the execution sequence of the instructions of the main program indicated in the main program framework.
3. The numerical control machining method according to claim 2, wherein The main program framework further comprises a coordinate system setting state detection instruction, and the step of generating the main program comprising at least the first calling instruction, the second calling instruction and the addendum equation according to the execution sequence of the instructions of the main program indicated in the main program framework comprises: generating the main program comprising at least the first calling instruction, the coordinate system setting state detection instruction, the second calling instruction and the addendum equation according to the execution sequence of the instructions of the main program indicated in the main program framework.
4. The numerical control machining method according to claim 2, wherein The main program framework further comprises a milling surface state detection instruction, and the step of generating the main program comprising at least the first calling instruction, the second calling instruction and the addendum equation according to the execution sequence of the instructions of the main program indicated in the main program framework comprises: According to the execution sequence of the instructions of the main program indicated in the main program framework, the main program is generated, and the main program at least includes the first calling instruction, the second calling instruction, the milling surface state detection instruction and the machining formula, wherein the execution sequence of the milling surface state detection instruction is after the second calling instruction and before the machining formula, and the milling surface state detection instruction is used for outputting an alarm when the second preset variable is not the second preset value, and the milling surface macro program includes an instruction of assigning the second preset value to the second preset variable after the coordinate system setting is completed.
5. The numerical control machining method according to claim 2, wherein The first parameter data includes at least one of a Z value taking mode, a sub-division formula, a probe type and a position of each detection point in a digital model.
6. The numerical control processing method according to claim 2, wherein The third parameter data includes a tool parameter name corresponding to each machining step of the machining formula, and the tool parameter name is bound to the machine tool. After the step of generating the main program according to the preset main program framework, the setting parameter data and the tool path data, the method further includes: obtaining tool parameter information obtained by automatically setting a tool in a tool magazine of the machine tool; According to the binding relationship between the machine tool and the tool parameter name, the tool parameter information is written into a register corresponding to the tool parameter name, so that the machine tool obtains the tool parameter information from the register corresponding to the tool parameter name when executing the main program.
7. The numerical control machining method according to any one of claims 1 to 6, wherein After the step of obtaining the tool path data, the method further includes: generating a program sheet corresponding to the tool path data, and the program sheet includes a tool list; outputting the program sheet, and the program sheet is used at least for instructing a tool setter to set the tool according to the tool list.
8. An electronic device, comprising: The electronic device includes a memory, a processor and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the numerical control machining method according to any one of claims 1 to 7.
9. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the numerical control machining method according to any one of claims 1 to 7.
10. A computer program product, characterised in that, The computer program product includes a computer program, and the computer program is executed by a processor to implement the steps of the numerical control machining method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Numerical control equipment processing method based on standardized and structured programming of numerical control program
CN116088423A
Method for checking machining original point and cutter size through numerical control system macro program
CN116500967A