Five-axis machining technology is one of the key technologies in the aerospace industry's machining processes. To improve CNC machining capabilities, our company purchased its first five-axis gantry milling machine in 1997. The machine's CNC system uses the French NUM1060 system. Due to the complexity of aircraft parts, manual programming was clearly insufficient to meet production needs, thus necessitating a post-processing program for the five-axis machine tool. Considering the company's widespread use of UG (Unigraphics) software for programming, creating a machine information file (MDF: MACHINE DATEFILE) for the UG software's five-axis machine tool processing became a top priority. I. Introduction to UG Toolpath Source Files UG uses three steps in Computer-Aided Manufacturing (CAM). First, a toolpath source file (CUTTER LOCATION SOURCE FILE) – a CLSF file – is generated in APT format, containing tool coordinate data and post-processing statements. Then, the CLSF file is compiled by APT to generate a binary intermediate file – a CLS file. Finally, UG processes the CLF file using the machine tool data file MDF and GPM (Graphics Post Processor Module) to obtain a PTP file directly usable by the machine tool. This is the machine tool CNC code file, which can be sent to the machine tool CNC system to perform part machining (UG has already prepared the GPM file, which generally does not need to be modified; in general, users only need to configure different MDF files for different machine tools). The CLSF file includes all geometric information statements for the selected tools, coordinate transformation relationship statements between the machining coordinate system and the absolute coordinate system of the geometry, tool display statements, tool position point definition statements, and various preparatory and auxiliary function definition statements and feed rate statements for the machine tool. Below is an example of a CLSF file. Statement 10 indicates that the defined milling cutter is named T5, followed by five numbers which are the milling cutter parameters, and Pl is the operation name. Statement 20 describes the transformation matrix between the machining coordinate system (MCS) and the absolute coordinate system of the geometry. Statement 30 defines a feed rate statement. Statement 40 defines a five-axis GOTO statement. The first three numbers are the X, Y, and Z coordinates of the point, and the last three numbers define the unit vector of the tool axis at that point. Below is the general format of a five-axis GOTO statement: GOTO/X, Y, Z, I, J, K. X, Y, and Z are the three-dimensional coordinates of the tool position point, and I, J, and K are the unit vectors of the tool axis. II. Compiling UG Five-Axis MDF Files . The UG MDFG main menu is as follows. The definition method for five-axis MDF files is similar to that of three-axis machine tools; only a few key differences are described below. 1. Machine Tool Type Selection . In MACHINE TOOL TYPE, we select the MILL, 2 OR MORE AXIS option. In the linear motion parameter definition of this option, we further select the FIVE, X, Y, Z AND 2 ROTARY option, which can generate a five-axis NC program for X, Y, Z, and two rotary axes. 2. Definition of Rotary Axes in MDFG POSTPBOSESSOB COMMANDS Here we will define how to convert the I, J, K tool axis vectors in the GOTO statement into rotation angles. (1) The definition method of machine tool rotary axes is shown in Figure 1. Rotation around the x-axis is defined as A-axis, rotation around the Y-axis is defined as B-axis, and rotation around the Z-axis is defined as C-axis. VI2000M2T five-axis gantry milling machine, the milling head has two swing angles, A and B. B swing is mounted on A swing, and its swing range is A-axis: -30[sup]. [/sup] to 30[sup]. [/sup]; B-axis: -30[sup]. [/sup] to 30[sup]. [/sup]. (2) Definition of Rotary Axe Type Our gantry milling machine is of type A and B swing, and the rotational motion only causes the tool to swing. Therefore, the Contouring Swiveling Head type is selected. (3) Determination of the 4th and 5th axes: Based on the structural characteristics of the machine tool's A and B axes, we determine the 4th axis as the B axis and the 5th axis as the A axis. (4) Determination of the rotation direction of the A and B axes: The rotation direction of the A and B axes follows the right-hand rule, with counterclockwise being positive and clockwise being negative. 3. Definition of feed rate of rotary axes : When the movement of a five-axis machine tool is achieved by the linkage of three linear axes (X, Y, and Z) plus two rotary axes (A and B), the feed rate needs to be expressed as the reciprocal of time. Because the feed rate of linear axes is mm/min, while the rate of rotary axes is expressed as degrees/min, the feed rate is expressed as the reciprocal of time (l/min) in the program segment. Suitable for situations where linear motion and rotation coexist, the CNC system uses G93 code to represent the reciprocal of time. In this case, F = V/L = 1/time. V is the given feed rate, in millimeters/min. L is the tool path length (the distance the tool travels). III. MDF File Debugging and Trial Machining1. Debugging the MDF File Edit a toolpath source file, as shown in Figure 2. OP is the unit normal vector of the tool axis in the GOTO/X,Y,Z,I,J,K statement of the toolpath source file. The components of the tool axis OP in the X, Y, and Z directions are I, J, and K. The B axis of this V12000M2T five-axis gantry milling machine is mounted on the A axis. The principle description of the A and B rotation angles is shown in Figure 2. If we want to obtain the rotation angles A=30°[sup].[/sup] and B=30°[sup].[/sup], what should the I, J, and K values be? We can also calculate the I, J, and K values under other combinations of A and B angles and write a series of GOTO statements. Edit this series of GOTO statements into a CLS file, add a header and footer, and then use the UG postprocessor to perform trial calculations. If the calculated A and B rotation angle values are the values we calculated, then they are correct. Otherwise, readjust the MDF file until the A and B angles of the generated PTP file are correct. Use a similar method to readjust the signs of angles A and B, i.e., the rotation direction. If the rotation directions of A and B do not conform to our expectations, adjust the MDF file and reset the rotation direction until it conforms to the correct rotation direction. 2. Trial Cut Using the generated MDF file, we post-processed the machining program for a frustum (a trial-cut part for machine tool acceptance). The trial-cut workpiece, measured by a coordinate measuring machine, meets the machine tool acceptance standards for frustum NAS parts. IV. Trial Use and Conclusion After this five-axis MDF file was put into operation, it was tested in the machining of normal holes in the template of the radome metal strip at Nanjing Institute 14, and in the machining editing of the normal contour and normal holes of the metal strip. The machined parts, measured by a coordinate measuring machine, fully conform to the drawing requirements. Currently, the drilling conformal tooling and metal strip have been delivered to the user. This MDF file can be used for production.