子程序编程方法举例
对等距槽采用循环比较简单,而不等距槽则调用子程序较为简单。
已知毛坯直径Φ32mm,长度为77mm,一号刀为外圆车刀双色球,三号刀为切断刀,其宽度为2mm。加工程序如下:
%0010
N001 G92 X150.0 Z100.0
N002 M03 S800 M08
N003 G00 X3d5.0 Z0
G95 F0.30 (转进给)
N004 G01 X0
N005 G00 X30.0 Z2.0
N006 G01 Z-55.0 F0.3
N007 G00 X150.0 Z100.0
N008 X32.0 Z0
T03
N009 M98 P15 L2
N010 G00 W-12.0
N011 G01 X0 F0.12
N012 G04P2.0
N013 G00 X150.0 Z100.0 M09
N014 M30
%0015
N101 G00 W-12.0
N102 G01 U-12.0 F0.15
N103 G04 X1.0
N104 G00 U12
N105 W-8
N106 G01 U-12 F0.15
N107 G04 X1.0
N108 G00 U12
N109 M99