Abstract:Based on the platform of Numerical Control (NC) milling machine with FANUC numerical control system, the parameter configuration rule and macroprogram coding method are analyzed. The method of define offset between the workpiece coordination system and the machine coordination system on the NC milling machine was discussed. For the basis, the photoelectric tool setting gauge was improved, and the macroprogram to measure coordination value of original point for workpiece was written. System parameters setup was applied to define self-setting tool command, and the command was used to achieve self-setting tool of numerical machining. The result of experiment shows that the self-setting tool method is very easy, the time of self-setting tool is shorter, and the offset accuracy is higher. This method has higher piratical value to improve make efficiency and machining accuracy in the numerical control machining.