| At present, Five-axis CNC machine tools are the key equipments to manufacture the products with more complicated contours in the way of high speed and high precision. However, three-dimensional tool compensation is a major problem in the five-axis machining technology. Only a few well-known foreign manufacturers'High-end CNC systems have equipped with this function in today's market. While our country is still in the research stage, they are not only expensive, but the structures are closed. So it is very useful to study three-dimensional tool compensation in detail and develop the system program of the command.This paper studies on the post-processing algorithm and reverse algorithm for 5-axis CNC machine with dual rotary tables to achieve the coordinate transformation between workpiece and the machine coordinate system. Then the algorithms of three-dimensional compensation of tool radius and length are researched. This paper puts forward the idea that the translation coordinates are converted from machine coordinate system to workpiece coordinate at first, and inverse transforms to machine coordinate system after 3D tool compensation and perform the interpolation. According to the principle of Space transformation and the projection, three adjacent points in NC codes are projected to compensation plane, combined with the style and the state of compensation , compensation points are calculated by the algorithm of two-dimensional tool radius compensation and then the results inverse transforms to the three-dimensional space to complete side milling radius compensation. In this way, algorithm of side milling radius compensation is researched in detail, when the NC machining codes with moving coordinate and with only two rotating coordinate. The algorithm of face milling radius compensation depends on the style of cutters used. This paper studies on the algorithms of ball nose end mill, end mill and end bull nose end mill, specially focus on the flat cutter radius compensation and further breakdown the algorithm of ball cutter.Then, the instruction format of three-dimensional tool compensation is defined and the program is developed by using VC++6.0.Not only to achieve the function, but also can enhance the capability of processing of the CNC system. Post-processor for 5-axis CNC machine with dual rotary tables is developed by using the constructor Post Builder and can produce custom format of commands. The tool paths are generated by Using UG modeling and multi-axis machining modules, then the NC codes are produced through the post processor.Finally, the virtual simulation with the NC machining codes which are compensated is taken in the VERICUT software. The results are analyzed and compared with the results generated by standard NC machining codes. Correctness and effectiveness of tool compensation algorithm and Program is verified, the accuracy of self-developed post-processor is verified as well. |