例:已知待加工工件轮廓如图所示,加工路径为A→B→C→D→E→F→G→H→A,要求铣削深度为10mm。分别采用绝对、相对坐标编程,其程序为:
绝对坐标编程:
O1;
G90G17G54G00Z100.0S1000M03;
X0.Y0.;
X40.0Y40.0;
Z5.0;
G01Z-10.0F100;
Y60.0F120;
X30.0;
X40.0Y90.0;
X80.0;
X90.0Y60.0;
X80.0;
Y40.0;
X40.0;
G00Z100.;
X0.Y0.;
M05;
M30;
相对坐标编程:
O2;
G90G17G54G00Z100.0S1000M03;
X0Y0;
G91X40.Y40.;
Z-95.0;
G01Z-15.0F100;
Y20.0;
X-10.0;
X10.0Y30.0;
X40.0;
X10.0Y-30.0;
X-10.0;
Y-20.0;
X-40.0;
G00Z110.0;
X-40.0Y-40.0;
M05;
M30;