| Compiling module is an important part of NC system, whose main function isto transform the NC code into a certain kind of data format which NC system canprocess. Developing compiling modules with open architecture and diversifiedfunctions is very improant for the development of NC system.Compiled-typed CNC system can resolve the contradiction between the real-time property with the open architecture of PC-based CNC system. By adoptingcompiling module processing in compiling mode, maximize look-ahead control canbe achieved. Compiled-typed CNC system requires its compiling module to takefull advantage of storage capacity, speed of operation and software/hardwareresources of current computer system. Traditional compiling module adopt G codefile as input information and the function is single, which can not reflect theadvantages of compiled-typed CNC system.In this thesis, a compiler is designed for compiled-typed CNC system. By thesecondary development of Solidworks, the compiler processes within Solidworks asa plug-in unit. The compiler gets geometry information from the part modles inSolidworks and gets the machining parameters and machine tool parameters byhuman-computer interaction. Functions such as tool-path planning, feedrate controland interpolation are integrated in the compiler. The output of the compiler is theobject file containing the location command of the machine tool.According to the characteristics and requirements of compiled-typed CNCsystem, the functional requirement of the compiler is analysed. By choosingSolidworks as the development platform, the over all archetecture of the compiler isdesigned. The function, component structure and information flow model aredefined. The user interface and the reading and storage of machining informationalgorithm are designed. As to the2D pocket, the contour-parallel tool pathgeneration algorithm is put forward. By analyzing the interference of tool path,algorithm is designed to remove the invalid tool path, ending with the generation oftool path without ratractions. By the look-ahead algorithm and S-shapedacceleration/deceleration algorithm, the feed-rate planning is accomplished. Theinterpolation algorithm of line/arc segments and cubic B-spline is studied. Then theinterpolation error is analyzed and compensation method is adopted. The result afterinterpolation is output in the form of object files.The object files are processed and the tool-paths of2D pocket and cubic B-spline are generated by tool-path verification. By the analysis of thevelocity/acceleration/jerk diagrams, the accuracy of the object files generated by the proposed compiler is verified. |