Modular macro program inner groove processing method
The modular macro-programmed internal groove processing method simplifies the programming process of CNC machine tools. The operator only needs to input parameters and the program will be automatically executed, which solves the tedious programming and error problems in complex internal groove processing and improves processing accuracy and efficiency.
Patent Information
- Application Number
- CN202310255406.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-16
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2043-03-16
AI Technical Summary
In the prior art, when machining complex internal grooves on CNC machine tools, manual programming is tedious and error-prone, and tool replacement and size adjustment are troublesome, resulting in low programming efficiency and low precision.
The internal groove processing method of modular macro program is adopted. By establishing a logical macro program model and solidifying it in the machine tool system, the operator only needs to input macro instructions and variable assignments, and Program 2 automatically determines and executes processing.
It simplifies the programming process, reduces the operator's programming ability requirements, improves processing accuracy and efficiency, and reduces programming time and the possibility of correction errors.
Smart Images

Figure CN116243655B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to machine tool processing, in particular to a method for processing inner grooves of a modular macro program. Background Art
[0002] In CNC machining, manual programming is still used for CNC machine tools in many non-mold processing companies because of its simplicity, fast compilation speed, strong adaptability, ease of use, and ease of modification. Most operators are also programmers. When the structure of the part to be machined is complex, the process of manually programming the machining program becomes very cumbersome. For example, when using a T-slot cutter to machine multiple internal grooves inside a complex structure, even if the subroutine call method is used for program compilation, the compiled program will still be very long, and even numerical changes will make calculations cumbersome and prone to errors. Modifying errors after they occur is also very troublesome. In addition, if the tool needs to be replaced, sizing adjustments are also very troublesome.
[0003] Therefore, it is necessary to design a modular macro-programmed CNC machine tool processing method for inner grooves to overcome or alleviate the above technical problems. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a modular macro program inner groove processing method, which is simple to operate and easy to modify, does not require high programming skills of the machine tool operator, and can realize automatic layered processing, thereby improving processing accuracy and processing efficiency.
[0005] In order to solve the above technical problems, the present invention provides a method for processing an inner groove of a modular macro program, comprising the following steps:
[0006] Step 1: Processing technology analysis: Analyze and select the blank size and material of the workpiece that needs to be processed with the inner groove;
[0007] Step 2, establishing a program model: establishing a logic macro program model capable of processing the inner groove as program 2, and solidifying the program 2 in the machine tool system;
[0008] Step 3, performing inner groove processing on the workpiece: establishing a macro instruction program 1, inputting macro instructions in the main program 1, assigning variables to the program 2 and calling the program 2, and the program 2 running and controlling the machine tool system to perform inner groove processing on the workpiece to be processed.
[0009] Furthermore, the processing technology analysis includes the following steps:
[0010] The blank size and material of the workpiece on which the inner groove is to be machined are analyzed, and a suitable tool is selected according to the structural characteristics of the blank of the workpiece to determine the machining parameters.
[0011] Furthermore, in step 3, the program 1 is used to select and replace a tool, and select a suitable coordinate system to locate the position of the inner groove to be processed.
[0012] Furthermore, the tool is a T-slot milling cutter.
[0013] Furthermore, the main program 1 inputs a macro instruction, and calls the program 2 to assign variables, including the following steps:
[0014] The program 2 determines various processing parameters for the inner groove processing according to the main program 1, and calls the corresponding machining program segments of each processing parameter in the program 2.
[0015] Furthermore, the main program 1 assigns variables to the program 2, including setting the initial position of the inner groove to be processed, the diameter of the inner groove, the blade diameter of the tool, the blade width of the tool, the processing speed and the processing feed rate.
[0016] Furthermore, the groove width of each inner groove is calculated as follows: PK = ABS [ZZ1 - ZZ2]
[0017] Wherein, PK is the groove width, ZZ1 is the distance between the bottom end face of the inner groove and the upper surface of the workpiece, ZZ2 is the distance between the top end face of the inner groove and the upper surface of the workpiece, and ABS is the absolute value.
[0018] Furthermore, the program 2 is provided with a layered processing program segment for performing layered processing on the inner groove and a one-time processing program segment for completing one-time processing on the inner groove, and the program 2 is provided with a processing judgment control block for calling and selecting the layered processing program segment or the one-time processing program segment.
[0019] Furthermore, the absolute value of the maximum distance between the inner surface of the bottom of the inner groove and the upper end face of the workpiece is selected as the first distance parameter, and the absolute value of the difference between the minimum distance between the inner surface of the top of the inner groove and the upper end face of the workpiece and the blade width of the tool is selected as the second distance parameter. Based on the comparison result of the first distance parameter and the second distance parameter, the processing judgment process control block selects and calls the layered processing program segment or the one-time processing program segment.
[0020] Furthermore, the program 2 is also provided with an error-proof judgment statement program segment and an error-proof prompt information program segment. The error-proof judgment statement program segment is used to detect errors in the operation of the processing program in the program 2, and the error-proof prompt information program segment is used to pause the operation of the program 2 when the error-proof judgment statement program segment determines that the program in the program 2 is wrong.
[0021] Through the above technical solution, the beneficial effects of the present invention are as follows:
[0022] The present invention provides a modular macro program for machining internal grooves, comprising three steps: first, performing a machining process analysis to analyze and select the size and material of a workpiece blank on which the internal grooves are to be machined; second, establishing a program model, establishing a logic macro program model capable of machining the internal grooves as program 2, and solidifying the established program 2 in a machine tool system; finally, machining the internal grooves on the workpiece, establishing a macro instruction program 1, inputting macro instructions into program 1, assigning variables to program 2, and calling program 2, which determines the internal grooves to be machined and completes the machining of the internal grooves. The present invention facilitates the use of airport operators by establishing a logic macro program solidified in the machine tool system. The machine operator only needs to edit program 1 as a macro instruction and confirm the parameters to be machined. Program 2 can self-determine and execute the machining program based on the variables in program 1. In this way, no specific programming is required, the program is simple and easy to modify, and does not require high programming skills from the operator, making it convenient for front-line workers to use and adjust, and can improve work efficiency and machining accuracy.
[0023] Other features and advantages of the present invention will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the following detailed description, they are used to explain the present invention but do not constitute a limitation of the present invention. In the accompanying drawings:
[0025] Figure 1 It is a workflow diagram of the inner groove processing method of the modular macro program of the present invention;
[0026] Figure 2 This is a specific embodiment of using the processing method of the present invention to process inner grooves. DETAILED DESCRIPTION
[0027] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present invention, and the scope of protection of the present invention is not limited to the specific embodiments described below.
[0028] The application provides a machining method for inner grooves of a modular macro program, referring to Figure 1 , comprising the following steps:
[0029] Step 1, machining process analysis: analyzing and selecting the blank size and material of a workpiece requiring inner groove machining;
[0030] Step 2, establishing a program model: establishing a logical macro program model capable of machining inner grooves as program 2, and solidifying the program 2 in a machine tool system;
[0031] Step 3, machining inner grooves of a workpiece: establishing a macro instruction program 1, inputting macro instructions in the main program 1, assigning variables to the program 2 and calling the program 2, and the program 2 runs and controls the machine tool system to machine inner grooves of a workpiece requiring machining.
[0032] The application completes machining of inner grooves in a workpiece by calling the program 2 solidified in a numerical control machine tool in advance, first, the specific machining process is determined according to the blank material and size of the workpiece; second, the program model is established, the tool path of the inner groove is programmed in the program 2, and the program 2 is solidified in the machine tool system as a logical macro program; finally, the inner groove machining is performed, the main program 1 is established as a macro instruction program, the program 2 is called to assign variables to the program 2, and then the program 2 is used to judge the inner groove requiring machining to complete the inner groove machining.
[0033] The application integrates the tool path program of machining inner grooves into a logical macro program solidified in the machine tool system, so that even workers who cannot program computers can directly call the machining program in the program 2 for machining. It can be understood that the purpose of establishing the main program 1 is mainly to call the program 2 and assign variables to the program 2, that is, when the worker understands the size parameters of the inner groove requiring machining, the parameter setting can be performed through the main program 1, then the program 2 is called, the program 2 will make a judgment according to the parameters in the main program 1, and then complete the machining of the inner groove. In this way, the programming process of the inner groove machining program according to the structure of the workpiece is saved, the programming ability requirement of the operator is not high, as long as the variable parameters can be changed according to the size required by the inner groove machining, the program 2 will make a judgment and machining according to the variable parameters, which speeds up the work efficiency, saves the programming time, and avoids errors caused by complex programs when modification is required.
[0034] Furthermore, the processing technology analysis in step 1 includes analyzing the size and material of the workpiece blank that needs to be processed into the inner groove, selecting a suitable tool according to the structural characteristics of the workpiece blank, and analyzing the appropriate processing parameters. Before performing the inner groove processing, a specific analysis of the workpiece blank is required to determine the various processing parameters.
[0035] It should be noted that the above analysis of the workpiece blank may include analyzing the material hardness of the blank to select a suitable tool, etc. For example, if the blank material is metal aluminum, the selected tool may be made of diamond, and the specific setting is made according to actual processing requirements.
[0036] Specifically, see Figure 2 ,by Figure 2 Take the workpiece in the figure as an example, and process the inner groove of the workpiece. Taking the system used by the CNC machine tool as the OKUMA system, the program of the main program 1 is as follows:
[0037]
[0038]
[0039] Among them, the program segment "T1 M6" is a tool change instruction. The code of the tool in this system is T1. In the main program 1, it means replacing tool T1. This instruction can instruct the tool library of the machine tool to replace the tool. As a preferred embodiment of the present invention, a T-slot milling cutter is preferably used as the tool. Secondly, the meaning of the program segment "G15 H2" is to select coordinate system No. 2. It can be understood that the above program is only a specific embodiment of the main program 1. The selection of coordinates can be changed according to the specific usage environment. Secondly, the main program 1 is also provided with a program segment that enables the tool to quickly locate to the hole where the inner groove to be processed is located, and establishes appropriate tool compensation, etc. Then, combined with Figure 2 In the program segment "CALLOG119 ZZ1=-79.5ZZ2=-66.5GD=19DD=14.5PR=3PS=800FF=100", "CALL OG119" can be understood as calling program 2 named "OG119", and the program segment "ZZ1=-79.5ZZ2=-66.5" can determine the initial position of the inner groove to be processed and the width of the inner groove. The program segment "GD=19" refers to the diameter of the inner groove to be processed, the program segment "DD=14.5" refers to the blade diameter of the tool, and the program segment "PR=3" refers to the blade width of the tool. In addition, the main program 1 also sets the rotation speed and processing feed rate.
[0040] It should be noted that the above is only a specific implementation method of the main program 1, and is only a main program 1 for processing one inner groove. If multiple inner grooves need to be processed, the processing can be completed by calling program 2 multiple times and assigning values. Specifically, it can be set according to the actual processing situation.
[0041] Furthermore, the main program 1 is input into the CNC machine tool, and program 2 is called. The program of program 2 is as follows:
[0042]
[0043]
[0044]
[0045] Among them, combined with the main program 1 in the above specific implementation method, the groove width of the inner groove is calculated in program 2 by the calculation formula: PK=ABS[ZZ1-ZZ2], and ZZ1 is the distance between the bottom end face of the inner groove and the upper surface of the workpiece, and ZZ2 is the distance between the top end face of the inner groove and the upper surface of the workpiece. The groove width of the inner groove to be processed can be obtained through the autonomous calculation of this program segment, and then the program is executed downward to enter the error-proof judgment statement program segment, among which, when "ZZ1" and "ZZ2" are not assigned, when "ZZ1" is greater than "ZZ2", or when When the groove width is smaller than the blade width, or when the inner groove diameter is smaller than the blade diameter, program 2 will automatically jump to the error-proofing prompt information program segment corresponding to each of the above situations. The error-proofing prompt information program segment will control the machine tool to pause and issue an alarm message to remind the staff to check and modify the program. If program 2 successfully passes the error-proofing judgment statement program segment during operation, it will continue to execute downward, and set the conventional parameters such as the layer step distance and the radius value of the interpolation arc during processing in turn through the variable assignment in the main program 1, and through the judgment statement "IF[ZZ1 EQ[ZZ2-PR]]NCUT2" is used to determine whether the inner groove to be processed needs to be processed in one time or in multiple layers. When the groove width is equal to the tool blade width, it can be completed in one time. Therefore, a layered processing program segment for layered processing of the inner groove and a one-time processing program segment for processing the inner groove in one time are provided in Program 2. A processing judgment control block capable of selecting a layered processing program segment or a one-time processing program segment is provided in Program 2. In this specific implementation manner, this processing judgment control block is "IF[ZZ1 EQ[ZZ2-PR]]NCUT2", and in the specific implementation manner of Program 2, the starting segment number of the layered processing program segment is "NCUT1", and the starting segment number of the one-time processing program segment is "NCUT2". Program 2 uses the processing judgment control block to determine the selection of the processing program segment. If the inner groove to be processed cannot be processed in one time, Program 2 automatically descends and executes the layered processing program segment to process the inner groove until the processing is completed and Program 2 is finished.
[0046] It should be noted that the significance of establishing a single-processing program segment and a layered processing program segment is that when the inner groove to be processed cannot be completed by the tool in one process, Program 2 will automatically judge and calculate how many layers are needed for processing, and adopt a multiple processing method, which can not only ensure the processing accuracy but also stop in time when an error occurs.
[0047] In addition, it should be noted that Figure 2 As a specific embodiment, its purpose is to facilitate understanding as an example, and Figure 2 The processing path of the workpiece in the figure is from left to right, but in the actual processing environment, the tool cuts from the top of the workpiece and processes the inner groove from bottom to top.
[0048] The present invention provides a method for processing inner grooves of a modular macro program. By establishing a program 2 as a logical macro program and solidifying it in a machine tool system, it is convenient for workers to call it. When in use, it is only necessary to edit the macro instruction program as the main program 1, and then call the program 2. The program 2 can perform self-judgment according to the variable parameters in the main program 1 to complete the processing. The operation is simple, easy to modify, and has strong applicability. The operator does not need to have relatively comprehensive programming skills, the learning cost is low, the production efficiency can be improved, and the investment in software and hardware is reduced.
[0049] It should be noted that in addition to using the OKUMA system machining center for engraving processing, other CNC system (such as SIEMENS, FANUC system, MITSUBISHI Mitsubishi, HNC Huazhong) machining centers can also be used for processing. As long as it is a macro program compiled according to the processing steps of the present invention, it also falls within the scope of protection of the present invention.
[0050] In the description of the present invention, reference to terms such as "one embodiment," "some embodiments," or "a specific implementation" means that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of the present invention. In the present invention, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0051] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings. However, the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, various simple modifications can be made to the technical solution of the present invention, and these simple modifications all fall within the scope of protection of the present invention.
[0052] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any appropriate manner without contradiction. To avoid unnecessary repetition, the present invention will not further describe various possible combinations.
[0053] In addition, the various embodiments of the present invention may be arbitrarily combined, and as long as they do not violate the concept of the present invention, they should also be regarded as the contents disclosed by the present invention.
Claims
1. A method for machining inner grooves of a modular macro program, characterized in that: The following steps are involved: Step 1: Processing technology analysis: Analyze and select the blank size and material of the workpiece that needs to be processed with the inner groove; Step 2: Establish a program model: Establish a logic macro program model capable of processing the inner groove as Program 2, and solidify Program 2 in the machine tool system; Step 3: Processing the inner groove of the workpiece: Create a macro instruction program 1, input the macro instruction in the main program 1, assign variables to program 2 and call program 2, and program 2 runs and controls the machine tool system to process the inner groove of the workpiece to be processed; Among them, program 2 is provided with a layered processing program segment for layered processing of the inner groove and a one-time processing program segment for completing the inner groove processing once. Program 2 is provided with a processing judgment process control block for calling and selecting the layered processing program segment or the one-time processing program segment. The absolute value of the maximum distance between the inner surface of the bottom of the inner groove and the upper end face of the workpiece is selected as a first distance parameter, and the absolute value of the difference between the minimum distance between the inner surface of the top of the inner groove and the upper end face of the workpiece and the blade width of the tool is selected as a second distance parameter. Based on the comparison result of the first distance parameter and the second distance parameter, the processing judgment process control block selects and calls the layered processing program segment or the one-time processing program segment; The calculation formula for the groove width of each inner groove is: PK=ABS[ZZ1-ZZ2]; PK is the groove width, ZZ1 is the distance between the bottom end face of the inner groove and the upper surface of the workpiece, ZZ2 is the diffuse distance between the top end face of the inner groove and the upper surface of the workpiece, and ABS is the absolute value; Program 2 is also provided with an error-proofing judgment statement program segment and an error-proofing prompt information program segment. The error-proofing judgment statement program segment is used to detect errors in the operation of the machining program in Program 2, and the error-proofing prompt information program segment is used to suspend the operation of Program 2 when the error-proofing judgment statement program segment determines that the program in Program 2 is incorrect. When "ZZ1" and "ZZ2" are not assigned values, or when "ZZ1" is greater than "ZZ2", or when the groove width is smaller than the blade width, or when the inner groove diameter is smaller than the blade diameter, Program 2 will automatically jump to the error-proofing prompt information program segment corresponding to the above situations. The error-proofing prompt information program segment will control the machine tool to suspend work and issue an alarm message.
2. The method for processing inner grooves of modular macro program according to claim 1, characterized in that: The processing technology analysis includes the following steps: The blank size and material of the workpiece on which the inner groove is to be machined are analyzed, and a suitable tool is selected according to the structural characteristics of the blank of the workpiece to determine the machining parameters.
3. The method for machining inner grooves of modular macro program according to claim 1, characterized in that: In step 3, the program 1 is used to select and replace the tool, and select a suitable coordinate system to locate the position of the inner groove to be processed.
4. The method for machining inner grooves of modular macro program according to claim 3, characterized in that: The tool is a T-slot milling cutter.
5. The method for machining inner grooves of modular macro program according to claim 1, characterized in that: Inputting macro instructions into the main program 1 and calling the program 2 to assign variables includes the following steps: The program 2 determines various processing parameters for the inner groove processing according to the main program 1, and calls the corresponding machining program segments of each processing parameter in the program 2.
6. The method for machining inner grooves of modular macro program according to claim 5, characterized in that: The main program 1 assigns variables to the program 2, including setting the initial position of the inner groove to be processed, the diameter of the inner groove, the blade diameter of the tool, the blade width of the tool, the processing speed and the processing feed rate.
Citation Information
Patent Citations
Non-circular quadratic curve part numerical control machine tool machining method of modular macro program
CN114265366A
Arc groove milling method based on numerical control machine tool and application
CN115055744A