程序参考:
O0010;
N10G54M03S450.0T0101;(T01为20mm钻头)
N20G00X025.0M08;(循环起点)
N30G74R5.0;(钻孔循环)
N40G74Z-60.0Q20000F0.3;
N50G00100.0z60.00100M09;
N60T0202S800;(T02为镗刀)
N70G00X20.0Z2.0;(循环起点)
N80G71U1.5R0.25;(粗镗循环)
N90G71P100Q110U-0.5W0.25F0.25;
N100G00X40.0;
N110G03X20.0Z-17.3205R20.0F0.15;
N120G70P100Q110;(精镗)
N130G00X100.02100.0T0200;
N140T0303;(T03为外圆车刀)
N150G00X52.05.0;(循环起点)
N160G71U2.0R0.25;(粗车循环)
N170G71P180Q210U0.5W0.25F0.25;
N180G00X44.0;
N190G01Z-25.0F0.1;
N200X48.0;
N210Z-38.0;
N220G70P180Q210;(精车外圆)
N230G00X100.0Z100.0T0300;
N240M05;
N250M30;
O0002;
N10G54M03S450.0T0202;(T02为镗刀)
N20G00X20.0Z5.0;(循环起点)
N30G71U2.0R0.25;(粗镗循环)
N40G71P50Q60U-0.5W0.25F0.25;
N50G00X34.4;
N60G01Z-26.0F0.1;
N70G70P50Q60;
N80G00X100.0Z100.0T0200;
N90T0404S600;(切内槽刀)
N100G00X33.0Z5.0;
N110Z-20.0;(切内槽循环起点)
N120G75R1.0;
N130G75X38.0Z-26.0P1000Q1000F0.2;
N140G00Z5.0T0400;
N150X100.0Z100.0;
N160T0505;(内螺纹车刀)
N170G00X33.0Z5.0;
N180Z-22.0;(螺纹切削循环起点)
N190G76P010060Q200R-0.02;
N200G76X36.0Z5.0P810Q500F1.5;
N210G00Z100.0T0500;
N220X100.0;
N230M05;
N240M30;