| With the broad use of parts with complex curves, the NC (Numerical Control) machining technology has taken a more and more important part in the mechanical manufacturing field. The realization of numerical controlled magnetic abrasive finishing is of great significance for taking it into a wider field. For the basic requirement is three-axis controlled in space curves machined on the magnetic abrasive machine tools, the CNC(Computer Numerical Control) system based on PC (Personal Computer) is researched and developed in this thesis.This thesis presents the situation of the researches andapplications of CNC system in the whole world at first. And the principles of real-time and open characters on the PC-based CNC system are probed. According to the situation at home and the requirements of this project, the whole scheme of CNC system on magnetic abrasive machine tool is designed. Some design principle and a concept modal of the PC-based CNC system architecture is proposed, which can be used as the guidance of detailed design of the software and hardware.The users interface of software and the pretreatment application of CNC system are designed with Visual C++.NET 2003 on the Windows platform. During the development, the idea of top to bottom in software engineering and design fashion of modularization and structure are used. According to the characters of each process of pretreatment, the data structures and data buffers are realized with standard C++ programming language. The functions of decoding and interpolation in the pretreatment application are fulfilled.The key interpolation arithmetic theory of CNC system is discussed. And the interpolation arithmetic of space line and planearc is researched. Arithmetic of space arc's interpolation used the method of coordinate transformation is designed. By the real time interruptive application of the multimedia timer of Windows designed, it output the data from pretreatment process in millisecond time. So the correctness of pretreatment and character of real time datas output are proved.Lastly, this paper aims at the difficulty that come from the complicated real-time control task, and a task-state structure model with object-oriented design in control software for mechanical systems with real-time control is built. According to the model, the dispatching of control tasks and the state transition logic of tasks are discussed. The OOAD (Object-Oriented Analysis and Design) method is used in a real-time world, and this is the base of realization of system on the level of whole design in software engineering. |