In order for a change to conventional CNC machining,which has long been hindered by separated systems for programming,machining and measuring processes,an integrated system namely adaptable NC programming and machining system(ANPAS) was proposed and a prototype was developed.ANPAS is a computer-aided manufacturing system with integrated functionalities of NC programming,real-time control and on-machine measurement. It consisted of a PC based planner and a motion card based controller,which were connected via data bus.With the planner and the controller and their collaboration,ANPAS is capable of automatic CAD model interpretation,process planning,code generation and validation,machine control, and on-machine inspection.Furthermore, it is also adaptable and able to perform the process planning and the machining tasks according to the CAD model,the measured size and position of the raw workpiece.The feasibility was demonstrated through the machining of a sample part on turning machine with the prototype system.