| NC lathe is a kind of widely used NC machining equipment.The CNC system is the control core of NC lathe.Its performance and function directly affect the machining function and product quality of NC lathe.The structure of traditional lathe CNC system is relatively closed,and there are some problems such as inflexible development and difficult to meet the new needs of users.With the rapid development of computer technology,the open CNC system has gradually become the mainstream of CNC system development because of its flexible system development,strong scalability and good versatility.Therefore,it has great significance to develop an open CNC system.This paper adopts the open structure of PC + control board card.After analyzing the functional requirements of NC lathe,the key technologies of lathe CNC system,such as humanmachine interaction interface,NC program interpretation and thread interpolation,are deeply analyzed and studied,and a high-performance lathe CNC system based on Linux CNC is developed.The main contents of this paper are as follows:Firstly,the overall structure of the software and hardware of the lathe CNC system is designed respectively.According to the functional requirements of the human-machine interaction interface of NC lathe,the human-machine interaction interface is divided into main window and several secondary windows,the layout of each window is designed,and the specific implementation of each functional area is introduced in detail.Secondly,the NC program interpretation function of NC lathe is studied.For the problem of complex cycle instruction interpretation process,and in order to meet the needs of users better,a modular design method is proposed——the NC program interpreter is divided into program preprocessing module and program interpretation module,they use compiler method and interpretation method respectively,and work in different periods,this can interpret NC programs quickly and exactly.Then,the thread interpolation function is studied.According to the requirements of high speed and high precision of thread interpolation,data sampling method is used as thread interpolation algorithm.The acceleration and deceleration process of thread interpolation will have an impact on the accuracy of thread machining.This paper analyzes the traditional S-curve and sine S-curve acceleration and deceleration methods,and proposes an improved S-curve acceleration and deceleration method,which realizes a fast and stable acceleration and deceleration process and ensures the accuracy of thread machining effectively.Finally,the NC lathe equipped with this system is tested on site,the results show that the open CNC system has good performance and it can meet the needs of users. |