加工如图所示螺纹孔的加工程序(设Z轴开始点距工作表面100mm处,切削深度为20mm)。
图6.17 螺纹加工循环
①先用G81钻孔
%0101
N10 G91 G00 M03
N20 C98 G81 X40.0 Y40.0 Z-22.0 R-98.0 F100
N30 G98 G81 X-120.0 Z-22.0 R-98 L3
N40 G98 G81 X-120.0 Y50.0 Z-22.0 R-98
N50 G98 G81 X40.0 Z-22.0 R-98 L3
N60 G80 X-160.0 Y-90.0 M05
N70 M02
②再用G84攻螺纹
%0102
N100 G91 G00 M03
N110 G99 G84 X40.0 Y40.0 Z-27.0 R-93.0 F280
N120 G99 G84 X40.0 Z-27.0 R93 L3
N130 G99 G98 X-120.0 Y50.0 Z-27 R-93
N140 G99 G84 X40.0 Z-27.0 R-93 L3
N150 G80 Z93.0 N81 X-160.0 Y-90.0 M05
N160 M02