CNC equipment processing method based on standardization and structured programming of CNC programs

By adopting standardized and structured programming methods in CNC equipment, and using the modular combination of general macro programs and general macro subprograms, the problems of long programming time and poor reliability in traditional CNC equipment processing methods are solved, and rapid programming and efficient production of CNC processing are achieved.

CN116088423BActive Publication Date: 2025-02-28CRRC CHANGCHUN RAILWAY VEHICLES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310007838.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-04
Publication Date
2025-02-28
Estimated Expiration
2043-01-04

AI Technical Summary

Technical Problem

When traditional CNC equipment processing methods face multiple varieties, small batches and frequently replaced workpieces, the programming time is long and the reliability is poor, which limits the improvement of production efficiency and quality.

Method used

Using standardized and structured programming methods based on CNC programs, we use thousands of general macro programs and general macro subprograms to pre-develop and store thousands of general macro programs and general macro subprograms, and use these modular combinations to complete the rapid compilation of CNC programs.

Benefits of technology

It greatly saves the programming time required for the processing method of CNC equipment, improves processing efficiency and quality, and solves the problems of poor reliability and long programming time caused by the many new products and many new programs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present invention relates to a numerical control equipment processing method based on the standardization and structured programming of numerical control programs, including: obtaining part drawings, determining the type of numerical control equipment, processing routes, etc.; determining the fixture and positioning method of the part, and establishing a workpiece coordinate system; equipping the numerical control equipment with corresponding tools; directly inputting the pre-compiled general macro program and general macro subroutine required for the part by using a numerical control input device or calling the pre-compiled general macro program and general macro subroutine from the control medium through the numerical control equipment communication interface, completing the standardization and structured programming of the numerical control program by using the modular combination of the general macro program and the general macro subroutine, assigning values ​​to the parameter variables of the programmed numerical control program, and obtaining the main processing program; verifying the correctness of the main processing macro program; after the verification is passed, the numerical control equipment executes the main processing program to process the part. The present invention greatly saves the programming time required for the numerical control equipment processing method, realizes the rapid programming of numerical control processing, and improves the processing efficiency of the numerical control equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of numerical control machining, and in particular to a numerical control equipment machining method based on standardization and structured programming of numerical control programs. Background Art

[0002] CNC technology refers to the technology of using digital control methods to achieve automatic control of a certain work process, and the equipment that applies CNC technology is CNC equipment. CNC technology and CNC equipment are important foundations for the modernization of the manufacturing industry.

[0003] At present, the basic working principle of CNC equipment processing is to control the motion trajectory and timing of each part according to the pre-compiled and stored CNC program, so as to process parts that meet the requirements of the drawing. The CNC program consists of a series of program segments and program blocks. Each program segment is used to describe the preparation function, auxiliary function, tool center coordinate position and process parameters. When processing, traditional CNC equipment needs to compile the corresponding CNC program according to the requirements of the drawing. The programming steps of the CNC program are: (1) determine the process; (2) calculate the coordinates of the tool center motion trajectory; (3) write the program sheet; (4) prepare the control medium; (5) program verification and first piece trial cutting. When CNC equipment processes multiple varieties, small batches and frequently changed workpieces, the operator needs to re-compile the CNC program before each workpiece processing. The traditional programming method takes a lot of time, which delays the processing efficiency of CNC equipment. In addition, programming is prone to errors, which limits the further improvement of production quality. Summary of the invention

[0004] In view of the problem that the current CNC equipment processing method affects the improvement of CNC equipment processing production efficiency and quality for workpieces of multiple varieties, small batches and frequent replacement, the present invention provides a CNC equipment processing method based on standardized and structured programming of CNC programs.

[0005] To solve the above problems, the present invention adopts the following technical solutions:

[0006] A CNC equipment processing method based on standardization and structured programming of CNC programs comprises the following steps:

[0007] Step 1: Obtain part drawings, analyze the material composition, three-dimensional shape, dimensional tolerance, and geometric tolerance of the parts according to the part drawings, and determine the type of CNC equipment, processing route, processing technology plan, and key point accuracy requirements;

[0008] Step 2: Determine the fixture and positioning method of the part, establish the workpiece zero point coordinate system, and determine the program origin of the X-axis, Y-axis, and Z-axis;

[0009] Step 3: After determining the processing route and processing technology plan, equip the CNC equipment with corresponding tools according to the content of the part processing process, and select cutting parameters, which include tool positioning parameters, machine tool parameters, program parameters, tool parameters and cutting parameters;

[0010] Step 4: directly input the pre-compiled general macro program and general macro subroutine required for the part by using the numerical control input device or call it from the control medium through the numerical control equipment communication interface, complete the standardization and structured programming of the numerical control program by using the modular combination of the general macro program and general macro subroutine, assign values ​​to the parameter variables of the programmed numerical control program, and obtain the main processing program;

[0011] Step 5: Verify the correctness of the main macro program through the CNC equipment's own program image simulation or dry run;

[0012] Step 6: After the verification is passed, the CNC equipment executes the main processing program to process the parts.

[0013] Compared with the prior art, the present invention has the following beneficial effects:

[0014] The numerical control equipment processing method proposed by the present invention is applicable to various numerical control equipment operating systems such as Siemens SIEMENS, FANUC FANUC, OKUMA Okuma, NUM, Guangzhou CNC, and Huazhong CNC. By storing thousands of pre-developed general macro programs and general macro subroutines, a program module is formed. When a new main processing program of a workpiece is compiled, the pre-compiled general macro programs and general macro subroutines are called for modular combination, thereby quickly completing the standardization and structured programming of the numerical control program, solving the problems of poor reliability and long programming time caused by many new products and many new programs, thereby greatly saving the programming time required for the numerical control equipment processing method, realizing the rapid programming of numerical control processing, improving the processing efficiency of numerical control equipment, and playing a huge role in the quality and efficiency improvement of numerical control equipment processing. The application of the present invention not only saves auxiliary preparation time, saves money, simplifies program writing, saves time and effort, but also improves the reliability and accuracy of the numerical control program, and improves the processing efficiency and quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a flow chart of the numerical control equipment processing method based on the standardization and structured programming of numerical control programs of the present invention;

[0016] Figure 2 This is a schematic diagram of the machining results of the general macro subroutine for internal circle machining;

[0017] Figure 3 This is a schematic diagram of the processing results of the general macro program for external ellipse processing;

[0018] Figure 4 This is a schematic diagram of the processing results of the general macro program for processing convex spherical surfaces;

[0019] Figure 5 This is a schematic diagram of the processing results of the production base plate mold;

[0020] Figure 6 It is a schematic diagram of the processing result of the general macro subroutine for mirror processing;

[0021] Figure 7 This is a schematic diagram of the CNC milling processing results of the five golden flowers;

[0022] Figure 8 This is a schematic diagram of the frame processing results for the Chengdu Metro Line 3 and 4 urban rail vehicles. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] In one embodiment, if Figure 1 As shown, the present invention provides a CNC equipment processing method based on standardized and structured programming of CNC programs, and the CNC equipment processing method specifically includes the following steps:

[0025] Step 1: Get the part drawing, analyze the material composition, 3D shape, dimensional tolerance, form and position tolerance (shape tolerance, position tolerance) of the part according to the part drawing, and determine the type of CNC equipment, processing route, processing technology plan and key point accuracy requirements. In this step, the part drawing should be analyzed to analyze the material composition, 3D shape, dimensional tolerance, shape tolerance, position tolerance, etc. of the part, so as to determine which type of CNC equipment is suitable for processing, clarify the processing route, formulate the process plan and ensure the key point accuracy requirements.

[0026] Step 2: Determine the fixture and positioning method of the part, establish the workpiece zero-point coordinate system, and determine the X-axis, Y-axis, and Z-axis program origins. After selecting the CNC equipment, determine the processing route and processing method of the part, select the fixture and positioning method, establish the workpiece zero-point coordinate system, determine the X-axis, Y-axis, and Z-axis program origins, and ensure the dimensional tolerance and geometric tolerance requirements of the part drawing.

[0027] Step 3: After determining the processing route and processing technology plan, equip the CNC equipment with corresponding tools according to the content of the part processing process, and select cutting parameters. The cutting parameters include tool positioning parameters, machine tool parameters, processing program parameters, tool parameters and cutting parameters. After determining the processing technology plan in step 1 and the processing route in step 2, this step selects and equips the corresponding appropriate tools according to the content of the part processing process, such as turning, milling, planing, boring, grinding, plane processing, surface processing, positioning holes, drilling, expanding holes, boring, reaming, tapping, etc., and selects reasonable cutting parameters, such as workpiece positioning parameters, tool positioning parameters, machine tool parameters, and processing program parameters. 、 Tool parameters, three elements of cutting parameters (cutting speed, feed rate or feed rate Vf, back cutting amount), etc.

[0028] Step 4: Use the CNC input device to directly input or call the pre-compiled general macro program and general macro subroutine required for the part from the control medium through the CNC equipment communication interface, use the modular combination of general macro program and general macro subroutine to complete the standardization and structured programming of the CNC program, assign values ​​to the parameter variables of the programmed CNC program, and obtain the main processing program.

[0029] In this step, the general macro program and general macro subroutine are pre-developed and compiled programs and stored in the control medium. During the pre-development and compilation, the general macro program and general macro subroutine parameters are first determined (for example: Siemens SIEMENS operating system parameters R0 to R99 - can be used freely; R100 to R249 - processing cycle transfer parameters; R250 to R299 - used for processing cycle transfer internal calculation parameters; calculation: follow the usual mathematical operation rules, brackets take precedence, multiplication and division take precedence over addition and subtraction), and then the general macro program and general macro subroutine are developed and compiled.

[0030] There are several input methods for inputting various general macro programs and general macro subroutines into CNC equipment:

[0031] (1) Directly input general macro programs and general macro subroutines manually using the CNC input device

[0032] Use the symbols, letters, numbers, etc. on the operating system keyboard to input the "required general macro program and general macro subroutine". At the same time, you can use the keyboard operation function on the CNC equipment operation panel to check and modify the processing program content displayed on the monitor;

[0033] (2) Use CNC equipment to control the medium to input general macro programs and general macro subroutines

[0034] Call the general macro program or general macro subroutine from the control medium through the communication interface of the CNC equipment. The program control medium of each CNC equipment is different. According to the instruction code and program format specified by each CNC equipment, thousands of general macro programs and general macro subroutine processing program sheets have been developed and compiled. The contents of the program sheet are then recorded on the control medium. According to the needs of programming the processed parts, the program is inserted into the CNC equipment system interface for calling, and then input into the CNC device of the CNC equipment (with a network port, which can be directly shared by the file transfer protocol FTP). The developed general macro program and general macro subroutine can be called to quickly compile the program for processing parts. Any control medium such as: punched paper tape, magnetic tape, disk, USB flash drive, CF card, computer, notebook, etc. can be selected.

[0035] After inputting the general macro program and general macro subroutine, the modular combination of the general macro program and the general macro subroutine is used to complete the standardization and structured programming of the CNC program, and the programmed CNC program is obtained. By changing the parameter variables of the programmed CNC program and assigning values ​​to the parameter variables, the compilation of the main processing program can be completed. For example, to process a sphere, after calling the sphere general macro program, just change the processing ball radius parameter variable of the general macro program sphere drawing to complete the compilation of the main processing program.

[0036] Step 5: Through the CNC equipment's own program image simulation or dry run, simulate the main processing program to verify the correctness of the main processing macro program. If the main processing program is correct, execute step 6; if the main processing program is incorrect, check the input or called general macro program and / or general macro subroutine.

[0037] Furthermore, after completing the simulation test of the main processing program, the name, drawing number, material number and other key text displays of the general macro program and general macro subprogram used to process the new parts are marked, and the important program segments are well explained and marked according to the optimized processing procedures and processing steps and the selected tools. In addition, the successfully optimized general macro programs and general macro subprograms are stored in the memory of the CNC equipment and in storage media such as USB flash drives and computers, and the general macro programs and general macro subprograms for processing the same or similar parts are well reserved and preserved.

[0038] Step 6: After verification, the CNC equipment executes the main processing program to process parts.

[0039] After the verification of step 5 is passed, the CNC equipment executes the main processing program to perform trial cutting of the first piece to verify the correctness of the main processing program and whether the processing accuracy meets the tolerance requirements of the drawing. When the main processing program is correct, the fixtures and tools are reasonable, and the processing accuracy meets the tolerance requirements of the drawing, the CNC equipment executes the main processing program to carry out batch processing and production of parts.

[0040] By storing the pre-compiled general macro programs and general macro subroutines to form a program module, when compiling a new main processing program for a workpiece, the pre-compiled general macro programs and general macro subroutines are called for modular combination, thereby quickly completing the standardization and structured programming of the numerical control program, solving the problems of poor reliability and long programming time caused by many new products and new programs, thereby greatly saving the programming time required for the numerical control equipment processing method, realizing the rapid programming of numerical control processing, improving the processing efficiency of numerical control equipment, and playing a huge role in improving the quality and efficiency of numerical control equipment processing. The application of the present invention not only saves auxiliary preparation time, saves money, simplifies program writing, saves time and effort, but also improves the reliability and accuracy of the numerical control program, and improves the processing efficiency and quality.

[0041] Standardization and structured programming of CNC programs have achieved the universality and interchangeability of programs by variable parameters of machining programs, macro programs and macro subprograms, and self-made program packages (development and compilation of thousands of general macro programs and general macro subprograms with variable parameters), including rectangles, polygons, circles, ellipses, slots, cones, spheres, convex and concave inner and outer circles, convex and concave polygons, convex and concave keyways, convex and concave oblong holes, drilling, tapping, convex and concave ellipses, convex and concave balls, rounded corners of circular holes, chamfered right angles of circular holes, rounded corners of elliptical holes, chamfered right angles of elliptical holes, rounded corners of polygonal holes, chamfered right angles of polygonal holes, and processing of convex and concave models of mathematical formulas (such as hyperbolas, parabolas, etc.) When processing geometric shapes such as lines, Archimedean spirals, sine curves, cosine curves, tangent curves, etc.), hole matrices, etc., by calling its parameter variables, it can realize the automatic selection of solid or hollow (processing of convex and concave shapes), rough and fine processing, processing depth, etc., and can realize multi-dimensional functions. On this basis, according to the characteristics of railway passenger car bogie products, arithmetic operations, program jumps, programmable zero offset functions, programmable rotation functions, programmable scaling functions, programmable mirror functions and other processing, array processing (including linear arrays and circular arrays) functions have been developed successively, and their module functions can be called mutually to complete the processing of large workpieces. Each general macro program and macro subroutine is concise and occupies less byte space. It is a well-deserved "chip-type general macro program and general macro subroutine" with convenient and applicable characteristics of carrying, storage and transmission. When compiling part programs, a lot of auxiliary time is reduced, such as: no need to use computer software to draw, mark coordinate points and calculate values, program automatic programming software, manually program, enter programs, verify the correctness of programs, etc., calling general macro programs and general macro subroutines can quickly complete program compilation, with high efficiency and good stability, ensuring the processing accuracy of workpieces and railway passenger car bogies.

[0042] The general macro program and general macro subprogram in the present invention include general macro program and general macro subprogram for convex-concave inner and outer circle processing, general macro program and general macro subprogram for convex-concave polygon processing, general macro program and general macro subprogram for convex-concave keyway processing, general macro program and general macro subprogram for convex-concave oblong hole processing, general macro program and general macro subprogram for drilling processing, general macro program and general macro subprogram for tapping processing, general macro program and general macro subprogram for convex-concave ellipse processing, general macro program and general macro subprogram for convex-concave spherical surface processing, general macro program and general macro subprogram for circular hole chamfer processing, general macro program and general macro subprogram for circular hole chamfer processing, general macro program and general macro subprogram for elliptical hole chamfer processing General macro programs and general macro programs for processing chamfered corners of elliptical holes, general macro programs and general macro programs for processing chamfered corners of polygonal holes, general macro programs and general macro programs for processing chamfered corners of polygonal holes, general macro programs and general macro programs for processing convex and concave models of mathematical formulas (such as hyperbolas, parabolas, Archimedean spirals, sine curves, cosine curves, tangent curves, etc.), general macro programs and general macro programs for processing arithmetic operations and program jumps, general macro programs and general macro programs for processing arrays (including linear arrays and circular arrays), general macro programs and general macro programs for processing programmable (zero point offset, mirroring function, scaling function, rotation function), etc.

[0043] (1) Compilation and application of a single general macro subroutine

[0044] Example 1 Programming example, machining of a single inner circle (see Figure 2 ), L20 is the general macro subroutine name for internal circle machining.

[0045] L20; general macro subroutine name for internal circle machining;

[0046] N10 G90 G54 G00 Z160; absolute dimension programming, establish the workpiece zero point coordinate system G54, and the tool reaches the Z160 coordinate point at a rapid moving speed;

[0047] N20 Z10; the tool reaches the Z10 coordinate point at a safe distance at a rapid moving speed;

[0048] N30 X=R26 Y=R27; determine the coordinates of the center of the circle, the center X and Y are any coordinate points required by the drawing, and R26 and R27 are parameter variables;

[0049] N40 G01 Z=R28 F1200; linear interpolation, according to the feed rate of 1200 mm / min, the tool reaches the workpiece processing depth Z=R28 coordinate point, and the depth R28 is a parameter variable;

[0050] N50 G91 G41 X0 Y0; use incremental dimension programming, tool radius left compensation, and the tool reaches the X0 Y0 coordinate point;

[0051] N60 R30=R29 / 2; the parameter variables of the arc radius for cutting in and cutting out are set to R30=R29 / 2, and the parameter variable R29 is the machining circle radius required by the drawing;

[0052] N70 G03 X=R29 Y0 CR=R30; counterclockwise arc interpolation cuts in, the arc radius is parameter variable R30, and the tool reaches the coordinate point X=R29 Y0;

[0053] N80 X0 Y0 I=-R29 J=0; counterclockwise full circle interpolation;

[0054] N90 X=-R29 Y0 CR=R29 / 2; anti-clockwise arc interpolation cut out;

[0055] N100 G40 G01 X0 Y0; cancel tool radius compensation, use incremental dimension programming, linear interpolation, and feed rate of 1200 mm / min until the tool reaches the X0Y0 coordinate point;

[0056] N110 G90 G00 Z160; absolute dimension programming, the tool reaches the Z160 coordinate point at a rapid moving speed;

[0057] N120 M17; subroutine ends.

[0058] When encountering this type of internal circle workpiece processing, the main processing program for internal circle workpiece processing is compiled in the following way: call the general macro subroutine for internal circle processing, assign values ​​to parameter variables according to the requirements of the drawing, change the center coordinates, depth and radius, and then complete the rapid compilation of the main processing program for internal circle workpiece processing.

[0059] The main program CRRC_616 for internal workpiece machining is as follows:

[0060] CRRC_616; the main program name for inner circle workpiece machining;

[0061] N10 T16 D2; tool number is 16 (select tool No. 16), cutting edge number is 2 (tool compensation number address is 2);

[0062] N20 G90 G54 G00 Z200; absolute dimension programming, establish the workpiece zero point coordinate system G54, and the tool reaches the Z200 coordinate point at a rapid moving speed;

[0063] N30 M03 S2000 M08 F1500; spindle forward, speed 2000 rpm, coolant on, feed rate 1500 mm / min;

[0064] N40 R26=..R27=..R28=..R29=..; Assign values ​​to parameter variables according to the size requirements of the processing drawing;

[0065] N50 L20; call the general subroutine for internal circle machining;

[0066] N60 M09 M05 G90 G00 Z200; the coolant is turned off, the spindle stops, the absolute dimension is programmed, and the tool reaches the Z200 coordinate point at a rapid moving speed;

[0067] N70 M30; the program ends.

[0068] (2) Using parametric equations to compile general macro programs

[0069] By using parametric equations to compile general macro programs, the fitting accuracy can be controlled by setting value variables, thereby improving the dimensional accuracy and shape and position accuracy of the workpiece.

[0070] Example 2 Programming example, taking the processing of the outer ellipse contour as an example (see Figure 3 ), compile a general macro program for ellipse through parametric equations, and convert the ellipse equation Convert to parametric equation Parameter variable R setting: Set the ellipse major semi-axis length parameter variable R20 = a, the minor semi-axis length parameter variable R21 = b, the processing angle parameter variable R22 = θ, and the selected processing tool radius parameter variable is R23 = D / 2.

[0071] The general macro program CRRC_618 for outer ellipse is as follows:

[0072] CRRC_618; Universal macro program name for outer ellipse;

[0073] N10 T12D1; tool number is 12 (select tool No. 12), cutting edge number is 1 (tool compensation number address is 1);

[0074] N20 R20=..R21=..R23=..; Assign the major and minor semi-axis of the ellipse according to the drawing requirements, and assign the tool radius according to the selected tool;

[0075] N30 G90 G54 G00 Z200; absolute dimension programming, establish the workpiece zero point coordinate system G54, and the tool reaches the Z200 coordinate point at a rapid moving speed;

[0076] N40 M03 S2000; spindle forward, speed 2000 rpm;

[0077] N50 X=R20+R23+R23 Y0; the tool leaves the tool diameter safety distance, and the tool reaches the X=R20+R23+R23 Y0 coordinate point at a rapid moving speed;

[0078] N60 Z10 M08; the tool reaches the safety distance Z10 at a rapid moving speed, and the coolant is turned on;

[0079] N70 G01 Z=R24 F1200; linear interpolation, at a feed rate of 1200 mm / min, reaches the ellipse processing depth Z=R24, and the parameter variable R24 is the ellipse processing depth;

[0080] N80 R22=0; assign an initial value to the ellipse processing angle parameter variable R22, and the tool is at the starting processing angle 0° position;

[0081] N90 ABC:; Identification symbol;

[0082] N100 G64 G42 G01 X=R20*COS(R22)Y=R21*SIN(R22)F1600; continuous path processing mode, tool radius right compensation, linear interpolation, feed rate 1600 mm / min, use linear interpolation to fit the elliptical curve;

[0083] N110 R22=R22+0.1; increase by 0.1 degree each time, this value determines the fitting accuracy;

[0084] N120 IF R22<=360GOTOB ABC; Conditional judgment statement, if R22 is less than or equal to 360°, jump forward to ABC: Identification symbol, the end angle of the ellipse processing angle parameter variable R22 is 360°, until one ellipse processing is completed;

[0085] N130 G40 G00 X=R20+R23+R23 Y0; cancel tool radius compensation, the tool moves at a rapid speed to the position of the tool diameter safety distance, and reaches the coordinate point X=R20+R23+R23 Y0;

[0086] N140 G90 Z160; absolute dimension programming, the tool reaches the Z160 coordinate point at a rapid moving speed;

[0087] N150 M09 M05; coolant is turned off and the spindle stops rotating;

[0088] N160 M30; End of program.

[0089] (3) Use programmable zero offset, logical arithmetic operations and program jump statements to develop general macro programs and general macro subroutines

[0090] Logical arithmetic jump statements are divided into unconditional jump statements and conditional jump statements. Unconditional jump statements do not require any conditions to jump to the required program location. Conditional jump statements must meet a certain condition to jump.

[0091] Example 3 Programming example, processing of convex spherical parts (see Figure 4 )

[0092] CRRC_619; Universal macro program name for convex spherical surface;

[0093] N10 T10 D2; tool number is 10 (select tool No. 10), cutting edge number is 2 (tool compensation number address is 2);

[0094] N20 G17 G54 G90 G00 Z260; select the XY plane, determine the workpiece zero coordinate system as G54, absolute dimension programming, and the tool reaches the Z260 coordinate point at a rapid moving speed;

[0095] N30 M03 S2000M08; spindle forward, speed 2000 rpm, coolant on;

[0096] N40 R1=89.998R2=..R3=..R26=..R27=..; According to the size requirements of the drawing, assign values ​​to the parameter variables R1, R2, R3, R26, and R27, where the parameter variable R1 is the outer convex spherical surface processing angle variable, and the outer convex spherical surface processing angle parameter variable R1 is assigned an initial value of R1=89.998, R2 is the radius SR of the convex spherical surface, R3 is the radius of the selected processing tool, and R26 and R27 are the X and Y coordinates of the center of the outer convex spherical surface required by the drawing respectively;

[0097] N50 TRANS X=R26 Y=R27; Programmable zero point offset to the assigned coordinate point X=R26Y=R27;

[0098] N60 G90 G00 X0 Y0; absolute dimension programming, the tool reaches the programmable zero offset X0 Y0 coordinate point at a rapid moving speed;

[0099] N70 X=R2+R3+R3 Y0; the tool leaves the tool diameter safety distance and reaches the coordinate point X=R2+R3+R3Y0;

[0100] N80 Z=R2+6; the tool reaches the safe distance Z=R2+6 coordinate point at a rapid moving speed;

[0101] N90 G01 Z=R2 F1500; at a feed rate of 1500 mm / min, reach the assigned coordinate point Z=R2;

[0102] N100 AAAA:; Identifier symbol;

[0103] N110 G41 G01 X=R2*COS(R1)Y0 F1800; Tool radius left compensation, linear interpolation, feed rate 1800 mm / min, reach X=R2*COS(R1)Y0 coordinate point;

[0104] N120 Z=R2*SIN(R1); Linear interpolation, at a feed rate of 1800 mm / min, reaches the coordinate point Z=R2*SIN(R1);

[0105] N130 G02 I=-R2*COS(R1)J0;Clockwise circular interpolation full circle;

[0106] N140 R1=R1-0.1;Calculate the parameter variable value of spherical machining angle R1;

[0107] N150 IF R1>=0GOTOB AAAA; Conditional judgment statement, if R1 is greater than or equal to 0°, jump forward to AAAA, the end angle of the convex spherical surface processing angle parameter variable R1 is 0° until the convex spherical surface processing is completed;

[0108] N160 G40 G00 X=R2+R3+R3 Y0; cancel tool radius compensation, and the tool reaches the coordinate point X=R2+R3+R3 Y0 at rapid moving speed;

[0109] N170 G90 Z160; absolute dimension programming, reaching the Z160 coordinate point;

[0110] N180 M09 M05; coolant is turned off and the spindle stops rotating;

[0111] N190 TRANS; Cancel the programmable zero offset command;

[0112] N200 M30; program ends.

[0113] (4) Structured programming combination application of general macro subroutines

[0114] When the workpiece needs to be processed into a rectangle, polygon, circle, ellipse, groove, cone, sphere, convex and concave inner and outer circles, convex and concave polygons, convex and concave keyways, convex and concave oblong holes, drilling, tapping, convex and concave ellipses, convex and concave balls, rounded corners of circular holes, chamfered right angles of circular holes, chamfered corners of elliptical holes, chamfered right angles of elliptical holes, chamfered corners of polygonal holes, chamfered right angles of polygonal holes, processing of mathematical formula convex and concave models (such as hyperbolas, parabolas, Archimedean spirals, sine curves, cosine curves, tangent curves, etc.), hole matrices, drilling, tapping, etc., the respective general macro programs and general macro subroutines can be called respectively, and the starting points of the general macro programs and general macro subroutines can be found by using the absolute dimension programming G90 or the programmable zero offset instruction, and the R parameter variable value in the general macro programs and general macro subroutines can be changed to control the size and precision of the workpiece. The compilation of the main processing program of the part can be completed by modularly combining the various general macro programs and general macro subroutines.

[0115] Example 4 is a programming example. This workpiece is an example of a finished plate mold in production (see Figure 5 )

[0116] Programming instructions: Subroutine name L1034 is a general macro subroutine for concave circle finishing, subroutine name L1014 is a general macro subroutine for concave square hole finishing; subroutine name L1052 is a general macro subroutine for concave longitudinal keyway finishing; subroutine name L1054 is a general macro subroutine for concave transverse keyway finishing; subroutine name L60 is a general macro subroutine for drilling; subroutine name L61 is a general macro subroutine for tapping.

[0117] The main program CRRC_620 for finishing the base plate mold in production is as follows:

[0118] CRRC_620;Program name;

[0119] N10 T12 D2; tool number is 12 (select tool No. 12), cutting edge number is 2 (tool compensation number address is 2);

[0120] N20 G17 G00 G54 G90 Z260; select the XY plane, determine the workpiece zero coordinate system as G54, absolute dimension programming, and the tool reaches the Z260 coordinate point at a rapid moving speed;

[0121] N30 M03 S2000M08 F1600; forward, spindle speed 2000 rpm, coolant on, feed rate 1600 mm / min;

[0122] N50 R31=80 / 2; The drawing requires the radius of the circle to be 80 / 2, so the radius parameter variable R31=80 / 2 is assigned a value;

[0123] N60 G00 G54 G90 X=740 / 2Y=240 / 2; the tool reaches the starting point of inner circle finishing at a rapid moving speed;

[0124] N70 L1034; call the concave circle finishing general macro subroutine to finish 4 inner circles;

[0125] N80 R60=135 / 2R61=80 / 2R62=10; assign parameter variable value;

[0126] N90 G00G54G90X=290 / 4+560 / 4Y=170 / 4+330 / 4; the tool reaches the starting point of inner square hole finishing at a rapid moving speed;

[0127] N100 L1014; call the concave square hole finishing general macro subroutine to finish four inner square holes;

[0128] N110 R51=820 / 2-356 / 2R52=10*2R53=10; assign parameter variable value;

[0129] N120 G00 G54 G90 X=356 / 4+820 / 4Y=40 / 2; the tool reaches the starting point of transverse keyway finishing at a rapid moving speed;

[0130] N130 L1052; call the concave transverse keyway finishing general macro subroutine to finish four transverse keyways;

[0131] N140 R54=10*2R55=83R56=10; assign parameter variable value;

[0132] N150 G00 G54 G90 X=200 / 2Y=-68.5-83 / 2; the tool reaches the starting point of longitudinal keyway finishing at a rapid moving speed;

[0133] N160 L1054; call the concave longitudinal keyway finishing general macro subroutine to finish two longitudinal keyways;

[0134] N170 G00 G54 G90 X=200 / 2Y=125; the tool reaches the drilling starting point at a rapid moving speed;

[0135] N180 L60; call the general macro subroutine for drilling and finish machining 2 holes;

[0136] N190 G00 G54 G90 X=200 / 2Y=125; the tool reaches the tapping starting point at a rapid moving speed;

[0137] N200 L61; call the general tapping macro subroutine to finish tap 2 holes;

[0138] N210 G40 G90 Z160; cancel tool radius compensation, absolute dimension programming, and the tool reaches the Z160 coordinate point at a rapid moving speed;

[0139] N220 M09 M05; coolant is turned off and the spindle stops rotating;

[0140] N230 M30; End of program.

[0141] As can be seen from the above program, by calling the general macro subroutine, the readability of the program is increased, the occupied storage space is reduced, and the program modification is facilitated.

[0142] (5) Develop and compile general macro subroutines using coordinate system transformation instructions

[0143] In the CNC system, powerful special instructions have been developed, such as programmable zero offset (TRANS, ATRANS) function, programmable rotation (ROT, AROT) function, programmable scaling (SCALE, ASCALE) function, programmable mirror processing (MIRROR, AMIRROR) function, etc. If these instructions are combined with the developed general macro programs and general macro subroutines and applied to turning, milling, planing, drilling, boring, reaming, grinding, tapping and other processing, the programming can be greatly simplified.

[0144] Example 5 Using the coordinate system transformation instruction (see Figure 6 ), develop and compile general macro subroutines

[0145] The following are programmable mirror processing (MIRROR, AMIRROR) functions

[0146] CRRC_621;Program name;

[0147] N10 T18 D2; tool number is 18 (select tool No. 18), cutting edge number is 2 (tool compensation number address is 2);

[0148] N20 G17 G00 G54 G90 Z260; select the XY plane, determine the workpiece zero coordinate system as G54, absolute dimension programming, and the tool reaches the Z260 coordinate point at a rapid moving speed;

[0149] N30 M03 S2000M08 F1600; forward, spindle speed 2000 rpm, coolant on, feed rate 1600 mm / min;

[0150] N40 L10; L10 is the general macro subroutine name, machining contour 1;

[0151] N50 MIRROR X=0; mirror image about Y axis, opposite direction to X axis;

[0152] N60 L10; call the general macro subroutine to process contour 2;

[0153] N70 AMIRROR Y=0; mirror image about X axis, opposite direction about Y axis;

[0154] N80 L10; call the general macro subroutine to process contour 3;

[0155] N90 MIRROR Y=0; mirror image about X axis, opposite direction about Y axis;

[0156] N100 L10; call the general macro subroutine to process contour 4;

[0157] N110 MIRROR; Cancel mirror command;

[0158] N120 G00 G90 Z160; absolute dimension programming, the tool reaches the Z160 coordinate point at a rapid moving speed;

[0159] N130 G40 M09 M05; cancel tool radius compensation, turn off coolant, and stop spindle rotation;

[0160] N140 M30; End of program.

[0161] (6) Comprehensive application of CNC milling program standardization and structured programming

[0162] Example 6 CNC milling of five golden flowers (see Figure 7 )

[0163] Programming instructions for the CNC milling program of five golden flowers: This graphic uses the general macro subroutines of circles and ellipses. The execution of the five petals is completed using the ROT and AROT (programmable rotation function) instructions, the execution of the position of each flower is completed using the TRANS and ATRANS (programmable zero point offset function) instructions, the execution of the middle flower and the remaining flowers is completed using the SCALE and ASCALE (programmable scaling function) instructions, and the execution of the four small flowers is obtained using the MIRROR and AMIRROR (programmable mirroring function) instructions.

[0164] This example is a comprehensive application of the general macro subroutine and the coordinate system transformation instruction, which further expands the scope of use of the general macro subroutine and increases the practicality of the general macro subroutine.

[0165] Example 7: Urban rail vehicle frame processing for Chengdu Metro Line 3 and 4 (see Figure 8 )

[0166] Programming instructions: Taking the processing of 8 primary spring seats on the frame of Chengdu Metro Line 3 and 4 as an example, the processing is divided into milling plane, drilling 8 Hole and 8 rough boring Holes, fine boring 8 (+0.05, 0) hole. It can be seen from the processing drawing that the 8 primary spring seats that need to be processed have strong symmetry, and the dimensional tolerance and form and position tolerance require high precision.

[0167] The following processing models can be established:

[0168] 1) Mill the circular plane at the center position of X=2750 / 2Y=1930 / 2;

[0169] 2) Mill the circular plane at the center position of X=1650 / 2Y=1930 / 2;

[0170] 3) Drill at the center position of X=2750 / 2Y=1930 / 2 hole;

[0171] 4) Drill at the center position of X=1650 / 2Y=1930 / 2 hole;

[0172] 5) Rough boring at the center position of X=2750 / 2Y=1930 / 2 hole;

[0173] 6) Rough boring at the center position of X=1650 / 2Y=1930 / 2 hole;

[0174] 7) Fine boring at the center position of X=2750 / 2Y=1930 / 2 (+0.05, 0) hole;

[0175] 8) Fine boring at the center position of X=1650 / 2Y=1930 / 2 (+0.05, 0) hole;

[0176] 9) Mirror the above steps 1) to 8) relative to the line X=0;

[0177] 10) Mirror the above steps 1) to 9) relative to the Y=0 line;

[0178] After completing the above steps, the entire frame processing can be completed.

[0179] The present invention "CNC equipment processing method based on standardization and structured programming of CNC programs" is based on standardization and structured programming of CNC programs, which can maximize the speed and accuracy of programming, thereby improving the human-computer dialogue ability and giving full play to the maximum potential of CNC equipment. By developing and compiling thousands of general macro programs and general macro subroutines, and integrating them with product design, process, processing, and testing, when compiling part programs, calling general macro programs and general macro subroutines for modular combination, the compilation of the main processing program can be completed quickly, the stability of program processing is improved, the efficiency is high, and the processing accuracy of the dimensional tolerance and form and position tolerance of the parts is guaranteed, thereby improving the processing efficiency of the workpiece, especially for multi-variety, small batch and frequently replaced workpieces, while improving the processing production efficiency, ensuring product quality, making great contributions to China's railway industry and China manufacturing.

[0180] The standardization of numerical control programs and the research and application of structured programming in this invention optimize the machining process:

[0181] (1) Reasonable design of cutting-in and cutting-out routes when milling the part contour

[0182] For example, finishing of a single inner circle (see Figure 2 ), when milling the contour of a part, in order to avoid tool marks at the entry and exit points and ensure the surface quality of the part contour, when designing the tool entry and exit route, you should avoid cutting in and out along the normal direction of the part contour. When cutting into the workpiece, gradually cut into the workpiece along the extension line of the cutting starting point or the tangent direction to ensure a smooth transition of the part curve. Similarly, when cutting off the workpiece, you should also avoid lifting the tool directly at the end of the cutting. You should gradually cut off the workpiece along the extension line of the cutting end or the tangent direction. When milling the inner groove, in addition to selecting a tool fillet radius that meets the requirements of the inner groove drawing, in order to ensure the surface roughness of the part and make the feed route short, you can first use the line cutting method to cut off the excess in the middle part, and finally use the ring cutting method to cut a knife, which can not only shorten the total feed route, but also obtain better surface roughness.

[0183] (2) Eliminate the influence of reverse clearance of the feed system on machining accuracy

[0184] After long-term use or due to the structural reasons of the transmission system, CNC machine tools may have reverse clearance errors. Reverse clearance errors will affect the positioning accuracy of the coordinate axis. When processing a group of holes, the positioning accuracy will not only affect the center distance between the holes, but also cause uneven machining allowances and geometric shape errors due to low positioning accuracy. If the tool constantly changes the approach direction during the processing, the coordinate axis reverse clearance will be brought into the processing, causing an increase in positioning errors. When arranging the feed route, the use of general macro programs and general macro subroutines avoids the influence of the reverse clearance of the mechanical feed system on the processing accuracy.

[0185] (3) Correctly handle the impact of dimensional tolerance and geometric tolerance of machined part drawings on machining accuracy

[0186] When compiling general macro programs and general macro subroutines, the dimension markings on the part drawings should be handled correctly. Many dimension markings of parts have tolerances, and the positions of the tolerance zones cannot be consistent. However, CNC programs are generally programmed according to the part contour, that is, according to the basic dimensions of the part, ignoring the influence of the tolerance zone position. If the dimension is asymmetric, even if the CNC machine tool has high precision, the machined parts may not meet the dimensional tolerance requirements. When the parts are programmed with the same milling cutter and the same tool radius compensation value, it is difficult to ensure that the dimensions of each part are within the dimensional tolerance range at the same time due to the different dimensional tolerance zones at different parts of the part contour. At this time, the tolerance zone should be adjusted. The adjustment method of the developed general macro programs and general macro subroutines is: under the premise of ensuring that the limit dimensions of the parts remain unchanged, during programming and calculation, the contour dimensions are usually changed and the tolerance zones are moved, and the symmetrical dimensional tolerance zones are changed to ensure the dimensional tolerance and form and position tolerance accuracy.

[0187] The implementation effect of the present invention solves many problems such as poor reliability and long programming time caused by many new products and new programs, and plays a huge role in improving quality and efficiency.

[0188] Promotion and application of the present invention:

[0189] (1) The standardization of CNC programs and the development and application of structured programming have saved 90% of the time required for programming machining programs. Programming can be completed in just 10% of the time, reducing the number of operators, saving labor costs, and improving economic benefits.

[0190] (2) It effectively avoids omissions or data errors caused by lengthy programs during program compilation by common methods, thereby reducing the scrap rate.

[0191] (3) The program is concise and easy for operators to use. Regardless of whether the CNC operator understands the CNC program or not, he can freely call the general macro program and general macro subroutine, and complete the rapid compilation of the program by modular combination. The program is highly stable and popularizable.

[0192] (4) The use of general macro programs and general macro subroutines reduces a lot of auxiliary time, such as: no need to use computer software to draw, mark coordinate points and perform numerical calculations, program automatic programming software, manual programming, program entry, verify the correctness of the program, etc., which improves production efficiency and ensures product quality.

[0193] (5) Thousands of general macro programs and general macro subroutines and production and processing application examples have been developed and compiled, with detailed and clear views and annotations attached, which can be used as a reference for CNC processing operators and programmers, engineering and technical personnel in the CNC industry, and teachers and students of relevant majors in various vocational and technical colleges.

[0194] (6) The standardization and structured programming of general macro programs and general macro subroutines have a good reference value for the compilation and application of CNC programs such as turning, milling, drilling, reaming, boring, tapping, planing and grinding for CNC equipment processing.

[0195] (7) Conduct economic analysis, which should specifically reflect how much money is saved by reducing labor intensity, how much money is saved by reducing the number of scrapped products, how much money is saved by reducing production costs, etc. "Direct economic benefits" refers to the economic benefits directly obtained from a single innovation; "indirect economic benefits" refers to the sum of all economic benefits obtained from the innovation throughout the year;

[0196] Direct economic benefits: Each part programming saves 0.8 to 6 hours, and the average time saved for each part is (0.8+6) / 2=3.4 hours / part. Calculated at a cost saving of 360 yuan per hour, the direct economic benefit obtained for a single time is: 3.4 hours / part × 360 yuan / hour = 1,224 yuan / part.

[0197] Indirect economic benefits: Each part saves 0.8 to 6 hours, with an average saving of (0.8+6) / 2=3.4 hours / part. About 5,000 parts processing programs are compiled throughout the year. Calculated at a cost saving of 360 yuan per hour, the annual economic benefits are: 5,000 programs / year × 3.4 hours / part × 360 yuan / hour = 6,120,000 yuan / year.

[0198] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0199] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of protection of the patent of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the scope of protection of the present invention. Therefore, the scope of protection of the patent of the present invention shall be subject to the attached claims.

Claims

1. A CNC equipment processing method based on standardization and structured programming of CNC programs, characterized in that: The following steps are involved: Step 1: Obtain part drawings, analyze the material composition, three-dimensional shape, dimensional tolerance, and geometric tolerance of the parts according to the part drawings, and determine the type of CNC equipment, processing route, processing technology plan, and key point accuracy requirements; Step 2: Determine the fixture and positioning method of the part, establish the workpiece zero point coordinate system, and determine the program origin of the X-axis, Y-axis, and Z-axis; Step 3: After determining the processing route and processing technology plan, equip the CNC equipment with corresponding tools according to the content of the part processing process, and select cutting parameters, which include tool positioning parameters, machine tool parameters, program parameters, tool parameters and cutting parameters; Step 4: directly input the pre-compiled general macro program and general macro subroutine required for the part by using the numerical control input device or call it from the control medium through the numerical control equipment communication interface, complete the standardization and structured programming of the numerical control program by using the modular combination of the general macro program and general macro subroutine, assign values ​​to the parameter variables of the programmed numerical control program, and obtain the main processing program; Step 5: Verify the correctness of the main macro program through the CNC equipment's own program image simulation or dry run; Step 6: After the verification is passed, the CNC equipment executes the main processing program to process the parts; The general macro program and general macro subprogram include general macro program and general macro subprogram for convex-concave inner and outer circle processing, general macro program and general macro subprogram for convex-concave polygon processing, general macro program and general macro subprogram for convex-concave keyway processing, general macro program and general macro subprogram for convex-concave long circular hole processing, general macro program and general macro subprogram for drilling processing, general macro program and general macro subprogram for tapping processing, general macro program and general macro subprogram for convex-concave ellipse processing, general macro program and general macro subprogram for convex-concave spherical surface processing, general macro program and general macro subprogram for circular hole chamfering processing, general macro program and general macro subprogram for circular hole ... General macro programs and general macro subroutines for chamfering, general macro programs and general macro subroutines for chamfering of elliptical holes, general macro programs and general macro subroutines for chamfering of elliptical holes, general macro programs and general macro subroutines for chamfering of polygonal holes, general macro programs and general macro subroutines for chamfering of polygonal holes, general macro programs and general macro subroutines for processing convex and concave models of mathematical formulas, general macro programs and general macro subroutines for processing arithmetic operations and program jumps, general macro programs and general macro subroutines for array processing, and general macro programs and general macro subroutines for programmable processing; When the machining parts are convex and concave inner and outer circles, convex and concave polygons, convex and concave keyways, convex and concave oblong holes, drilling, tapping, convex and concave ellipses, convex and concave spheres, rounded corners of circular holes, rounded corners of circular holes, rounded corners of elliptical holes, rounded corners of elliptical holes, rounded corners of polygonal holes, rounded corners of polygonal holes, mathematical formula convex and concave model machining, arithmetic operations and program jump machining, array machining, and programmable machining, respectively call their respective general macro programs and general macro subroutines, use absolute dimension programming G90 or programmable zero offset instructions to find the starting points of general macro programs and general macro subroutines, assign parameter variables in general macro programs and general macro subroutines according to the machining requirements of the drawings, and modularize the various general macro programs and general macro subroutines to complete the compilation of the main machining program for the parts; The general macro program and general macro subprogram for convex and concave inner and outer circle processing include a general macro subprogram L20 for inner circle processing. The general macro subprogram L20 for inner circle processing is as follows: L20; general macro subroutine name for internal circle machining; N10 G90 G54 G00 Z160; absolute dimension programming, establish the workpiece zero point coordinate system G54, and the tool reaches the Z160 coordinate point at a rapid moving speed; N20 Z10; the tool reaches the Z10 coordinate point at a safe distance at a rapid moving speed; N30 X=R26 Y=R27; determine the coordinates of the center of the circle, the center X and Y are any coordinate points required by the drawing, and R26 and R27 are parameter variables; N40 G01 Z=R28 F1200; linear interpolation, according to the feed rate of 1200 mm / min, the tool reaches the workpiece processing depth Z=R28 coordinate point, and the depth R28 is a parameter variable; N50 G91 G41 X0 Y0; use incremental dimension programming, tool radius left compensation, and the tool reaches the X0 Y0 coordinate point; N60 R30=R29 / 2; the parameter variables of the arc radius for cutting in and cutting out are set to R30=R29 / 2, and the parameter variable R29 is the machining circle radius required by the drawing; N70 G03 X=R29 Y0 CR=R30; counterclockwise arc interpolation cuts in, the arc radius is parameter variable R30, and the tool reaches the coordinate point X=R29 Y0; N80 X0 Y0 I=-R29 J=0; counterclockwise full circle interpolation; N90 X=-R29 Y0 CR=R30; anti-clockwise arc interpolation cut out; N100 G40 G01 X0 Y0; cancel tool radius compensation, use incremental dimension programming, linear interpolation, and feed rate of 1200 mm / min until the tool reaches the X0Y0 coordinate point; N110 G90 G00 Z160; Absolute dimension programming, the tool reaches the Z160 coordinate point at a fast moving speed; N120 M17; Subroutine ends; The main program for internal workpiece machining is compiled in the following way: Call the general macro subroutine for inner circle machining, assign values ​​to parameter variables according to the requirements of the drawing, and complete the compilation of the main machining program for inner circle workpiece machining after changing the coordinates of the circle center, depth and radius; The main program CRRC_616 for internal workpiece machining is as follows: CRRC_616; the main program name for inner circle workpiece machining; N10 T16 D2; tool number is 16, cutting edge number is 2; N20 G90 G54 G00 Z200; absolute dimension programming, establish the workpiece zero point coordinate system G54, and the tool reaches the Z200 coordinate point at a rapid moving speed; N30 M03 S2000 M08 F1500; spindle forward, speed 2000 rpm, coolant on, feed rate 1500 mm / min; N40 R26=..R27=..R28=..R29=..; Assign values ​​to parameter variables according to the size requirements of the processing drawing; N50 L20; call the general subroutine for internal circle machining; N60 M09 M05 G90 G00 Z200; the coolant is turned off, the spindle stops, the absolute dimension is programmed, and the tool reaches the Z200 coordinate point at a rapid moving speed; N70 M30; Program ends; The equation of the ellipse Convert to parametric equation Parameter variable R setting: set the ellipse major semi-axis length parameter variable R20 = a, the minor semi-axis length parameter variable R21 = b, the processing angle parameter variable R22 = θ, and the selected processing tool radius parameter variable R23 = D / 2; The general macro program CRRC_618 for external ellipse machining compiled by parametric equations is as follows: CRRC_618; Universal macro program name for outer ellipse; N10 T12D1; tool number is 12, cutting edge number is 1; N20 R20=..R21=..R23=..; Assign the major and minor semi-axis of the ellipse according to the drawing requirements, and assign the tool radius according to the selected tool; N30 G90 G54 G00 Z200; Absolute dimension programming, establish the workpiece zero point coordinate system G54, and the tool reaches the Z200 coordinate point at a rapid moving speed; N40 M03 S2000; spindle forward, speed 2000 rpm; N50 X=R20+R23+R23 Y0; the tool leaves the tool diameter safety distance, and the tool reaches the X=R20+R23+R23 Y0 coordinate point at a rapid moving speed; N60 Z10 M08; the tool reaches the safety distance Z10 at a rapid moving speed, and the coolant is turned on; N70 G01 Z=R24 F1200; linear interpolation, at a feed rate of 1200 mm / min, reaches the ellipse processing depth Z=R24, and the parameter variable R24 is the ellipse processing depth; N80 R22=0; assign an initial value to the ellipse processing angle parameter variable R22, and the tool is at the starting processing angle 0° position; N90 ABC:; Identification symbol; N100 G64 G42 G01 X=R20*COS(R22)Y=R21*SIN(R22)F1600; continuous path processing mode, tool radius right compensation, linear interpolation, feed rate 1600 mm / min, use linear interpolation to fit the elliptical curve; N110 R22=R22+0.1; increase by 0.1 degree each time, this value determines the fitting accuracy; N120 IF R22<=360GOTOB ABC; Conditional judgment statement, if R22 is less than or equal to 360°, jump forward to ABC: identification symbol, the end angle of the ellipse processing angle parameter variable R22 is 360°, until one ellipse processing is completed; N130 G40 G00 X=R20+R23+R23 Y0; cancel tool radius compensation, the tool moves at a rapid speed to the position of the tool diameter safety distance, and reaches the coordinate point X=R20+R23+R23 Y0; N140 G90 Z160; absolute dimension programming, the tool reaches the Z160 coordinate point at a rapid moving speed; N150 M09 M05; coolant is turned off and the spindle stops rotating; N160 M30; Program ends; The general macro program and general macro subprogram for convex and concave spherical surface processing include a general macro program CRRC_619 for outer convex spherical surface processing. The general macro program CRRC_619 for outer convex spherical surface processing is as follows: CRRC_619; Universal macro program name for convex spherical surface; N10 T10 D2; tool number is 10, cutting edge number is 2; N20 G17 G54 G90 G00 Z260; select the XY plane, determine the workpiece zero coordinate system as G54, absolute dimension programming, and the tool reaches the Z260 coordinate point at a rapid moving speed; N30 M03 S2000M08; spindle forward, speed 2000 rpm, coolant on; N40 R1=89.998R2=..R3=..R26=..R27=..; According to the size requirements of the drawing, assign values ​​to the parameter variables R1, R2, R3, R26, and R27, where the parameter variable R1 is the outer convex spherical surface processing angle variable, and assign the initial value R1=89.998 to the outer convex spherical surface processing angle parameter variable R1, R2 is the radius SR of the convex spherical surface, R3 is the radius of the selected processing tool, and R26 and R27 are the X and Y coordinates of the center of the outer convex spherical surface required by the processing drawing respectively; N50 TRANS X=R26 Y=R27; Programmable zero point offset to the assigned X=R26Y=R27 coordinate point; N60 G90 G00 X0 Y0; absolute dimension programming, the tool reaches the programmable zero offset X0 Y0 coordinate point at a rapid moving speed; N70 X=R2+R3+R3 Y0; the tool leaves the tool diameter safety distance and reaches the coordinate point X=R2+R3+R3Y0; N80 Z=R2+6; the tool reaches the safe distance Z=R2+6 coordinate point at a rapid moving speed; N90 G01 Z=R2 F1500; at a feed rate of 1500 mm / min, reach the assigned coordinate point Z=R2; N100 AAAA:; Identifier symbol; N110 G41 G01 X=R2*COS(R1)Y0 F1800; Tool radius left compensation, linear interpolation, feed rate 1800 mm / min, reach X=R2*COS(R1)Y0 coordinate point; N120 Z=R2*SIN(R1); Linear interpolation, at a feed rate of 1800 mm / min, reaches the coordinate point Z=R2*SIN(R1); N130 G02 I=-R2*COS(R1)J0;Clockwise circular interpolation full circle; N140 R1=R1-0.1;Calculate the parameter variable value of spherical machining angle R1; N150 IF R1>=0 GOTOB AAAA; Conditional judgment statement: if R1 is greater than or equal to 0°, jump forward to AAAA, and the end angle of the convex spherical surface processing angle parameter variable R1 is 0° until the convex spherical surface processing is completed; N160 G40 G00 X=R2+R3+R3 Y0; cancel tool radius compensation, and the tool reaches the coordinate point X=R2+R3+R3 Y0 at rapid moving speed; N170 G90 Z160; absolute dimension programming, reaching the Z160 coordinate point; N180 M09 M05; coolant is turned off and the spindle stops rotating; N190 TRANS; Cancel the programmable zero offset command; N200 M30; program ends.

2. A CNC equipment processing method based on standardization and structured programming of CNC programs according to claim 1, characterized in that: Step 6 includes the following: After the verification is passed, the CNC equipment executes the main processing program to perform a trial cutting of the first piece to check the correctness of the main processing program and whether the processing accuracy meets the tolerance requirements of the drawing. When the main processing program is correct, the fixtures and tools are reasonable, and the processing accuracy meets the tolerance requirements of the drawing, the CNC equipment executes the main processing program to carry out batch processing and production of parts.

3. A CNC equipment processing method based on standardization and structured programming of CNC programs according to claim 1, characterized in that: A processing program sheet of general macro programs and general macro subroutines is developed and compiled according to the instruction code and program format specified by the numerical control equipment, and then the content of the processing program sheet is recorded on a control medium, and the control medium is selected from any one of a punched paper tape, a magnetic tape, a disk, a USB flash drive, a CF card, a computer, and a notebook computer.

Citation Information

Patent Citations

  • Numerical control with paramacro capability

    CA1187968A

  • Part program generating system

    CN1037597A