Macroprogram modular programming method based on FANUC system
By adopting the macro program modular programming method in the FANUC system, using general templates and parameter changes to achieve rapid programming, the problems of poor programming capabilities and low production efficiency of machining operators are solved, and the production efficiency is significantly improved.
Patent Information
- Application Number
- CN202510116250.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-27
AI Technical Summary
The programming capabilities of on-site machining operators are uneven, and programming is time-consuming and labor-intensive, resulting in low production efficiency and lack of standardized programming methods.
The macro program modular programming method based on the FANUC system is adopted. By creating a general template, the corresponding macro program number can be called by changing the parameters to achieve fast programming.
Simplifies the programming process, reduces writing errors, improves production efficiency, and improves efficiency by more than 80%.
Smart Images

Figure CN120044881A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machining of construction machinery, and particularly to a macro program modular programming method based on the FANUC system. Background Art
[0002] With the diversification and new energy of construction machinery products, the product structure will be continuously improved and updated after market use verification. In order to better meet the needs of users to experience high-end products as early as possible, manufacturing enterprises will require that from the drawing design, process preparation to the actual production process, the shorter the production cycle, the earlier one can enter the testing stage, the earlier one can improve, and the earlier one can be put on the market. Therefore, the pressure is on the manufacturing department. However, the programming capabilities of on-site machining operators vary, programming is time-consuming and laborious, and production efficiency is low. How to provide a set of standardized programming methods is an urgent problem to be solved. Summary of the Invention
[0003] Object of the Invention: The object of the present invention is to provide a macro program modular programming method based on the FANUC system.
[0004] Technical Solution: The present invention includes making general templates for common machining processes such as reciprocating milling of plane, dynamic milling of hole, helical milling of hole, milling of outer circle, milling of equally divided circumferential holes, milling of polygon, milling of rectangular groove, milling of internal and external threads, milling of groove, and chamfering of hole opening. One only needs to change the parameters therein according to the instructions and call the corresponding macro program number to achieve rapid programming.
[0005] Further, the production of the general template includes first clarifying the independent variable parameters, operation instruction types, conditional expressions, operation order, and call parameter descriptions of the FANCU system, and then making modular usage scenarios.
[0006] Further, the milling of the plane is controlled by parameters such as the length and width of the given plane, the safe plane for tool entry, the tool diameter, the starting point of the cutting plane, the end point of the cutting plane, the step distance, the cutting depth per layer, and the cutting speed.
[0007] Further, the starting position for measuring the milling of the plane is the specified safe plane and the cutting starting point.
[0008] Further, the parameter description of the milling of the plane includes:
[0009] Given the S parameter, S is the step distance, which is between 0.6 and 0.9 of the tool diameter and does not exceed 1 at most;
[0010] Given the Q parameter, Q is the cutting amount per layer, which is between 0.5 and 1.2 and is determined according to different materials and tool performances;
[0011] Given the F parameter, where F is the feed rate, which is determined according to the cutting amount per layer and the material properties, and should also be within the maximum cutting force of the machine tool.
[0012] Furthermore, the dynamic milling of holes is parameter-controlled by specifying the hole milling diameter, hole milling depth, spiral plunge diameter, tool diameter, starting point of the cutting plane, cutting depth per segment each time, lateral step, cutting depth per layer, and cutting speed.
[0013] Furthermore, the starting position for measuring the dynamic milling of holes is the specified cutting start plane parameter.
[0014] Furthermore, the description of the dynamic milling of holes parameters includes:
[0015] Given the C parameter, where C is the spiral milling diameter, with a maximum of 2 times the tool diameter - 1 and a minimum of 1 times the diameter + 1;
[0016] Given the Z parameter, where Z is the cutting depth per segment each time, less than or equal to the effective cutting edge length of the tool and less than or equal to the hole milling depth;
[0017] Given the S parameter, where S is the lateral step, ranging from 0.1 to 0.15;
[0018] Given the Q parameter, where Q is the cutting depth per layer, ranging from 0.5 to 0.8.
[0019] Furthermore, the spiral milling of holes is parameter-controlled by specifying the center coordinates of the hole, hole milling diameter, tool diameter, starting point of the cutting plane, end point of the cutting plane, cutting depth per layer, and cutting speed parameters.
[0020] Furthermore, the description of the spiral milling of holes parameters includes:
[0021] Given the XY parameter, which is the center coordinates of the hole milling; given the A parameter, where A is the hole milling diameter; given the D parameter, where D is the tool diameter, less than the hole diameter of the hole milling; given the Z parameter, where Z is the end coordinate of the hole milling; given the Q parameter, where Q is the cutting depth per layer, ranging from 0.5 to 0.8; given the F parameter, where F is the cutting speed.
[0022] Beneficial effects: Compared with the prior art, the present invention has the following remarkable advantages: When programming for the same machining process requirements, there is no need to start editing from scratch. By inputting the corresponding parameters, the program can be called, simplifying the programming, avoiding programming errors, improving production efficiency, and the efficiency is increased by more than 80%. Description of the Drawings
[0023] Figure 1 Is the path generated by the program of the present invention;
[0024] Figure 2 Is the independent variable parameter diagram of the FANCU system;
[0025] Figure 3 It is the operation instruction diagram of the FANCU system;
[0026] Figure 4 It is the conditional expression diagram of the FANCU system;
[0027] Figure 5 It is the schematic diagram of the milling plane structure;
[0028] Figure 6 It is the schematic diagram of the dynamic milling hole structure;
[0029] Figure 7 It is the schematic diagram of the helical milling hole structure. Specific implementation mode
[0030] The technical solution of the present invention will be further described below in conjunction with the accompanying drawings.
[0031] The present invention includes the following steps: making the common machining processes such as reciprocating milling plane, dynamic milling hole, helical milling hole, milling outer circle, milling equally divided circumferential holes, milling polygons, milling rectangular grooves, milling internal and external threads, milling bevels, and hole chamfering into a general template. Just change the parameters therein according to the instructions and call the corresponding macro program number to achieve rapid programming.
[0032] The production of the general template includes first clarifying the independent variable parameters, operation instruction types, conditional expressions, operation sequence, and call parameter descriptions of the FANCU system, and then making modular usage scenarios.
[0033] For example: a large plane with a length × width of 2000 × 1000 needs to mill the upper surface, and a φ160 rough surface milling cutter is selected.
[0034] It can be quickly realized by calling the macro program O8401, and the program writing is as follows:
[0035] G65P8401A2000B 1000C50D 160E5Z0S0.85Q0.85F2000. For subsequent workpiece changes and re-milling the surface, only change the A and B parameters. The path generated by the program is as Figure 1 shown.
[0036] Such as Figure 2 , 3 , and 4 shown. Before the modular programming of writing the macro program, the independent variable parameters of the FANCU system ( Figure 2 ), operation instructions ( Figure 3 ), conditional expressions (such as 4), operation sequence, and call parameter descriptions should be very clear.
[0037] After the above parameters and arithmetic symbols are clear, modular usage scenarios can be created. Common machining usage scenarios include face milling, dynamic hole milling, helical hole milling, milling internal and external threads, chamfering the hole opening with a C angle and an R angle, milling polygons, milling slots, milling slope edges, etc. The following will explain the process instructions for face milling, dynamic hole milling, and helical hole milling:
[0038] Face milling:
[0039] Program description: It is mainly used to mill the plane with the center of the plane as the coordinate origin.
[0040] It is controlled by parameters such as the length and width of the given plane, the safe plane for tool entry, the tool diameter, the starting point of the cutting plane, the end point of the cutting plane, the step distance, the cutting depth per layer, and the cutting speed.
[0041] Schematic diagram: As Figure 5 shown
[0042] Starting position: Specify the safe plane (C) and the cutting starting point (E)
[0043] Call format: G65 P8401 A B C D E Z S Q F
[0044] Parameter description: As shown in Table 1:
[0045] Table 1: Meanings of face milling parameters
[0046]
[0047] The given S parameter (step distance) is generally between 0.6 and 0.9 times the tool diameter, and the maximum cannot exceed 1.
[0048] The given Q parameter (cutting amount per layer) is generally between 0.5 and 1.2, and it needs to be determined according to different materials and tool performance.
[0049] The given F parameter needs to be determined according to the cutting amount per layer and the material properties, and it should also be within the maximum cutting force of the machine tool.
[0050] Program example:
[0051] %
[0052] O1234
[0053] N1(D20-EndMill)
[0054] T01M6
[0055] G40G80G90G94G15
[0056] G54G0X0.Y0.S950M03
[0057] G43H01Z200.
[0058] G65P8401A200B100C30D20E5Z0S0.85Q1.2F1000
[0059] M30
[0060] %
[0061] Dynamic milling of holes:
[0062] Program description: It is mainly used to give the center coordinates of the hole. Starting from the upper surface of the hole, it performs in segments in a spiral down-cutting manner, combining the hole depth and the effective cutting edge length of the tool, and uses the side cutting edge of the tool to perform rapid cutting at a given lateral step to remove materials.
[0063] It is controlled by given parameters such as the milling hole diameter, milling hole depth, spiral down-cutting diameter, tool diameter, starting point of the cutting plane, cutting depth per segment, lateral step, cutting depth per layer, and cutting speed.
[0064] Schematic diagram: As Figure 6 shown
[0065] Starting position: Specified cutting start plane E parameter
[0066] Call format: G65P8402X Y A B C D E Z S Q F
[0067] Parameter description is shown in Table 2:
[0068] Table 2: Meanings of dynamic milling hole parameters
[0069]
[0070] Given C parameter (spiral milling diameter), generally the maximum is 2 times the tool diameter - 1, and the minimum is 1 times the diameter + 1.
[0071] Given Z parameter (cutting depth per segment), it should be noted that it cannot be greater than the effective cutting edge length of the tool and should be less than or equal to the milling hole depth.
[0072] Given S parameter (lateral step), generally it is 0.1 - 0.15.
[0073] Given Q parameter (cutting depth per layer), generally it is 0.5 - 0.8.
[0074] Program example:
[0075] %
[0076] O1234
[0077] G40 G80 G90 G94 G15
[0078] T01M6
[0079] G54 G90 G0X10.Y10.
[0080] G43H01 Z100.
[0081] G65P8402X10.Y10.A80B20C38D20E1.Z10S0.5Q0.3F1000
[0082] M30
[0083] %.
[0084] Helical milling of holes:
[0085] Program description: It is mainly used to calculate automatically the high-speed helical milling starting from the hole wall with the hole center as the coordinate origin.
[0086] It is controlled by given center coordinates of the hole, hole milling diameter, tool diameter, starting point of the cutting plane, end point of the cutting plane, cutting depth per layer, and cutting speed parameters.
[0087] Schematic diagram: As Figure 7 shown
[0088] Starting position: Specified cutting start plane E parameter
[0089] Call format: G65P8403 X Y A D E Z Q F
[0090] Parameter description is shown in Table 3:
[0091] Table 3: Meanings of helical milling of holes parameters
[0092]
[0093] Given XY parameters (hole milling center coordinates) 2, given A parameter (hole milling diameter) 3, given D parameter (tool diameter), which should be smaller than the hole diameter for hole milling; 4, given Z parameter (hole milling end coordinates) 5, given Q parameter (cutting depth per layer), generally 0.5 - 0.8 6, given F parameter (cutting speed)
[0094] Program example:
[0095] %
[0096] O1234
[0097] G40G80G90G94G15
[0098] T01M6
[0099] G54G0X0Y0S1500M03
[0100] G43H01Z100.
[0101] G65P8403X0.Y0.A180D20E0.5Z-20.Q2.F1000
[0102] G65P8403X150.Y0.A80D20E0.5Z-20.Q1.2F1000
[0103] M30 %.
Claims
1. A macro program modular programming method based on FANUC system, characterized in that: The method comprises the following steps: making the commonly used machining processes of reciprocating plane milling, dynamic hole milling, spiral hole milling, external circle milling, equally divided circular hole milling, polygon milling, rectangular groove milling, internal and external thread milling, groove milling, and hole chamfering into a universal template, and realizing fast programming by simply changing the parameters according to the instructions and calling the corresponding macro program number.
2. The macro program modular programming method based on FANUC system according to claim 1 is characterized in that: The general template production includes first clarifying the independent variable parameters, operation instruction types, conditional expressions, operation order and calling parameter descriptions of the FANCU system, and then performing modular use scenario production.
3. The macro program modular programming method based on FANUC system according to claim 1 is characterized in that: The milling plane is controlled by the length, width, cutting safety plane, tool diameter, starting point of the cutting plane, end point of the cutting plane, step distance, cutting depth of each layer and cutting speed parameters of the given plane.
4. The macro program modular programming method based on FANUC system according to claim 3 is characterized in that: The starting position of the milling plane measurement is the designated safety plane and the cutting starting point.
5. The macro program modular programming method based on FANUC system according to claim 3 is characterized in that: The milling plane parameter description includes: Given the S parameter, S is the step distance, which is between 0.6 and 0.9 of the tool diameter and does not exceed 1; Given the Q parameter, Q is the amount of cutting per layer, which is between 0.5 and 1.2, determined according to the material and tool performance; Given the F parameter, F is the feed rate, which is determined based on the amount of cutting per layer and the material properties, and must be within the maximum cutting force of the machine tool.
6. The macro program modular programming method based on FANUC system according to claim 1 is characterized in that: The dynamic milling is controlled by parameters such as given milling hole diameter, milling hole depth, spiral cutter diameter, tool diameter, cutting plane starting point, segmented cutting depth, lateral step, cutting depth per layer and cutting speed.
7. The macro program modular programming method based on FANUC system according to claim 6 is characterized in that: The dynamic milling hole measurement starting position is the specified cutting start plane parameter.
8. The macro program modular programming method based on FANUC system according to claim 6 is characterized in that: The dynamic milling parameter description includes: Given the C parameter, C is the spiral milling diameter, the maximum is 2 times the tool diameter - 1, and the minimum is 1 times the diameter + 1; Given the Z parameter, Z is the cutting depth of each segment, which is less than or equal to the effective blade length of the tool and less than or equal to the milling depth; Given the S parameter, S is the lateral step distance, which is 0.1 to 0.15; Given the Q parameter, Q is the cutting depth of each layer, which is 0.5 to 0.
8.
9. The macro program modular programming method based on FANUC system according to claim 1, characterized in that: The spiral milling hole is controlled by given hole center coordinates, milling hole diameter, tool diameter, starting point of cutting plane, end point of cutting plane, cutting depth of each layer and cutting speed parameters.
10. The macro program modular programming method based on FANUC system according to claim 9, characterized in that: The spiral milling parameter description includes: Given the XY parameters, i.e. the coordinates of the center of the milling hole; given the A parameter, A is the diameter of the milling hole; given the D parameter, D is the tool diameter, which is smaller than the diameter of the milling hole; given the Z parameter, Z is the coordinates of the end point of the milling hole; given the Q parameter, Q is the cutting depth of each layer, which is 0.5~0.8; given the F parameter, F is the cutting speed.