Application of Macro in CNC Machining of Railway Axles

The direction of high-speed and heavy-load development of China's railway transportation has increasingly high requirements on the quality of railway axles. Therefore, the production process and equipment requirements for railway axles are continuously increasing. Our factory is one of the main bases for the production of axles of the CSR Group. After several technical transformations, the axle machining production line is gradually adopting CNC equipment. Currently, CNC machine tools account for more than 50%. With its good processing stability and high flexibility, CNC machine tools have greatly improved the overall quality of our factory's axles. However, in recent years, there have been many axle problems that have arisen through numerical control processing. Among them are RD2, RE2A, RD3A, and axles exported to Vietnam and Indonesia. Most of these problem axes are caused by excessive growth in the size of the blade or the size of the blade, causing undue economic losses. Therefore, it is of significance to analyze and discuss the method of avoiding the production of problem axes in NC machining.

1. Analysis of the Causes of Problems Axles in NC Machining

(1) The influence of programming and operating habits CNC machine operators generally have some manual programming capabilities. The programming of the axle NC program is not complicated regardless of its technology or numerical calculation, so programming is easier to use. However, there are often some differences between the bad programming habits or the operation of the machine that cause misoperation. If the actual programming, the use of G50 command to set the coordinate system, prior to execution, and then direct operation to start the program automatically create a coordinate system with the return parameters (set up the workpiece coordinate system after tool compensation), the operation will occur when the malfunction. This is because this program performs tool offset offset on the G50 setting value rather than the reference automatic reference frame in the original program. In production, it is not uncommon for examples of products to be scrapped due to differences in programming and operating habits.

(2) Impact of equipment failure Although the reliability of CNC machine tools is high, but they do not pay attention to strengthening maintenance, they will also fail, especially hidden failures. Normally, the CNC machine must start zeroing (that is, return to the reference position). The return failure is one of the common faults of the machine tool. The position error caused by the return reference point can only be found when machining. If you use the return parameter to automatically establish the sitting and target system, the tool offsets set the workpiece coordinate system to be programmed. However, if the machine tool returns to the wrong position, the workpiece tooling accident is difficult to avoid. I also happen in production. This is also the reason for the gradual adoption of absolute encoders for the axes of numerical control equipment, so that the machine does not need to return to the reference operation.

(3) Influence of trial machining and operator level The axle types produced by our factory are more varieties and the production batch size is also different. NC programming is often performed manually at the site. Therefore, there are mistakes in program entry. Due to the low level of the operator or the excessive self-confidence, it may cause malfunctions in the debugging of the program.

2. Based on the preparation of macro routines

(1) Axle (RD2, RE2, etc.) General NC program example The railway axle geometry is generally the same, so it is possible to use variables from the point of view of programming, and to use macro programs for repeatability of the same operations and macro and arithmetic and logic operations. , Prepare NC general-purpose programs to meet the procedural control approach to explore ways to avoid problematic axes. Based on the above analysis, in the actual production, the axle shaft body machining was taken as an example for programming and the RD2 truck axle shaft machining task was taken as an example (as shown in Figure 1).

Our CNC machine tools are mainly based on the FANUC-OTD system. Due to the early version of the system, the panel does not have an operator editing key; at the same time, the site does not have the means to communicate with the computer, so only use the A type macro program, that is, use G65 Hxx P#xx Q#xx R#xx or G65 Hxx P#xx Qxx Rxx input format preparation macro program. The H code in the instruction is the basic instruction to implement arithmetic and logic operations (such as H01 assignment, H02-H05 for addition, subtraction, multiplication, division, etc.); after P, Q, R address, "xx" means micron-level value; "#xx" Is the variable number. Figure 2 is a schematic diagram of the super route. The example program is as follows.

O1111; Main program (RD2)

N10 M43* (spindle gear position 3)

N20 MO3*

N30 M98 O9990*

N40 M98 O9995*

N50 T0212*

N60 M98 O9997*

N70 T0414*

N8O M98 O9998*

N90 T0111*

N100 M98 O9999*

N110 M98 O9990*

N120 M30

O9990; Initialization subroutine (cancel offset, tool compensation, loop, etc.)

N10 G18 T0000* N30 C40*

N20 C54 G80 G99* N40 M99*

O9995; Position Checking and Establishing Coordinate System Subroutines

N05 M98 O9990*

N10 G65 H01 P#120 Q#5041* (Assigning Workpiece Coordinate Values)

N20 C65 H01 P#121 Q#5042*

N30 G65 H01 P#122 Q#5021* (Machine Coordinates)

N40 G65 H01 P#123 O#5022*

N50 G65 H02 P#148 Q#530 R#122*

N60 G65 H02 P#149 Q#531 R#123*

N70 G50 X#148 Z#149* (Set up workpiece coordinate system)

N80 M99*

O9996; arc node operation subroutine (calculate arc node coordinates)

N10 G65 H03 P#505 Q#500 R#501*

N20 G65 H05 P#102 Q#505 R2*

N30 G65 H03 P#103 Q#502 R#102*

N40 C65 H28 P#506 Q#502 R#103*

N50 M99*

O9997; Rough Rough Subroutine

N10 M98 O9996*

N20 G65 H81 P120 Q-sample 509 R0* (decision on number of roughing conditions)

N30 G65 H02 P#111 Q#501 R15000*

N40 G65 H02 P#113 Q#501 R4000*

N50 G65 H02 P#110 Q#500 R201000*

N60 G00 X#111 Z-#506*

N70 G01 X#113 F#507*

N80 G03 U#505 W#506 R#502 F#507*

N90 G01 U3.0*

N100 GOO X#110 Z0*

N120 M99*

O9998; left rough subroutine

N10 M98 O9996*

N20 G65 H81 P120 Q#508 R0* (decision on number of roughing conditions)

N30 C65 H02 P#107 Q#501 R5000*

N40 G65 H03 P#108 O#503 R#506*

N50 G65 1102 P#109 O#501 R4000*

N60 G65 H02 P#110 Q#500 R201000*

N70 G00 X#107 Z-#108*

N80 G01 X#109 F#507*

N90 G02 U#505 W-#506 R#502 F#507*

N100 G01 U3.0*

N110 G00 X#110 Z0*

N120 M99*

O9999; fine car subroutine

N10 M98 O9996*

N60 G65 H02 P#110 Q#500 R201000*

N70 G65 H02 P#105 Q#500 R3000*

N80 G65 H03 P#106 Q#503 R#506*

N90 G00 X#105 Z0*

N100 G01 X#500 F#504*

N110 G02 U-#505 W-#506 R#502 F#504*

N120 G01 Z-#106*

N130 G02 U#505 W-#506 R#502 F#504*

N140 G01 U3.0*

N150 G00 X#110 Z0*

N160 M99*

China South Railway Group Tongling Vehicle Factory

(2) The example of a security policy instance processing program in the general axis program is that the main program (01111) is used to call the subroutine structure. In addition to selecting the tool according to the process requirements in the main program, there is no other interpolation instruction, so the program structure is simple, and the operator's on-site programming security is enhanced. In the actual programming, the craftman can release the craft card according to the basic size of the processing axle, and the operator modifies the variable value according to the craft card. Because the new program only modifies the value of the corresponding variable, it completely avoids the accidental waste caused by the processing and debugging. An initialization subroutine call (O9990) is designed in the program to avoid possible interference caused by other programs.

In the axle NC general program, we focused on designing a position detection and setting coordinate system subroutine (O9995). Its role is to ensure that the program is consistent with the tool setting methods of other programs and the operator's operating habits; the second is to make The workpiece coordinate system is established only based on the position of the machine reference point. The FANUC-OTD CNC machine tool can maintain its memory when the machine tool reference point is powered down. In this way, the main program can be started at any position of the machine in addition to other programs. At the same time, there is no need to return to the reference point (when the position of the machine reference point has not been changed), the machine adopts the absolute encoder as the coordinate axis. Therefore, it avoids the failure of the machine to return the parameter.

In roughing subroutines (O9997, O9998), it is also possible to increase the number of roughing cycles by adding the H81 function (conditional judgment statement) to meet the requirement for different axle residuals. More secure axle processing. The example program simplifies the roughing once.

3. summary

The features of the above-mentioned NC general program are that the structure is concise, clear, and easy to read, and after a successful use, there is basically no need for major modifications. By setting parameters, subroutines can also be hidden to make the program more secure.

In production, we use the general program of the axle prepared by macros to process the axis of the semi-optical axis (RD2, RE2, RB2, and the Inker axis). The actual application proves that this method effectively prevents the occurrence of various problems in the numerical control process. . Regardless of the size of the production lot, it greatly simplifies programming, reduces errors, and reduces program maintenance.

Refers to Outdoor Lighting other than road lighting. Outdoor lighting is required to meet outdoor visual work needs and achieve decorative effects.

Outdoor Lighting

Led High Bay ,Led Floodlight,Led Street Light,Outdoor Lighting

Guangzhou ZG Scaffolding.co.Ltd , https://www.zgscaffolding.com