图1
加工任务图
参考程序:
(1)正六边形加工程序
○0001;
G90
G40 G21 G17 G94;
G91
G28 Z0;
G90
G54 M03 S400;
G00
X0 Y55.0;
Z5.0
M08;
G01
Z-6. F60;
G41
D01 G01 X0 Y29.0 F100;
X10.97;
G02
X19.63 Y24.0 R10.0;
G01
X30.60 Y5.0;
G02
Y-5.0 R10.0;
G01
X19.63 Y-24.0;
G02
X10.97 Y-29.0 R10.0;
G01
X-10.97;
G02
X-19.63 Y-24.0 R10.0;
G01
X-30.60 Y-5.0;
G02
Y5.0 R10.0;
G01
X-19.63 Y24.0;
G02
X-10.97 Y29.0 R10.0;
G01
X0;
G40
G01 X0 Y55.0;
G00
Z50.0 M09;
G91
G28 Z0;
M30;
(2)斜六边形加工主程序
○0002;(主程序)
G90
G40 G21 G17 G94 G69;
G91
G28 Z0;
G90
G68 X0 Y0 R10.0;
M98
P0003;
G69;
G91
G28 Z0;
M30;
○0003;(子程序)
G90
G54 M03 S400;
G00
X0 Y40.0;
Z5.0
M08;
G01
Z-4. F60;
G41
D01 G01 X0 Y25.0 F100;
X10.97;
G02
X16.17 Y22.0 R6.0;
G01
X27.14 Y3.0;
G02
Y-3.0 R6.0;
G01
X16.17 Y-22.0;
G02
X10.97 Y-25.0 R6.0;
G01
X-10.97;
G02
X-16.17 Y-22.0 R6.0;
G01
X-27.14 Y-3.0;
G02
Y3.0 R6.0;
G01
X-16.17 Y22.0;
G02
X-10.97 Y25.0 R6.0;
G01
X0;
G40
G01 X0 Y40.0;
G00
Z50.0 M09;
M99;
(3)凹槽加工程序
○0004;(主程序)
G90
G40 G21 G17 G94;
G54
M03 S680;
GO0
X60 Y-50;
Z5.0
M08;
M98
P0005;
G51.1 X0 Y0 ;
M98
P0005;
G50.1 X0 Y0 ;
G0
Z100.0 M09;
M30
○0005;(子程序)
G00
X56.0 Y-46.0;
G01
Z-8.0 F50;
G41
D04 G01 X52.34 Y-33.55 F
;
X34.88 Y-19.58;
G3
X26.76 Y-29.73 R6.5;
G1
X41.94 Y-41.87;
G40
G01 X56.0 Y-46.0;
G00
Z5.0;
M99;
(4)孔加工程序
○0006;
G91
G28 Z0;
M06
T05;
G90
G40 G21 G17 G94 G15;
G54
M03 S1500;
GO0
X0 Y0;
G43
H05 G00 Z20.0;
G16
G00 X40.0 Y40.0;
G99
G81 Z-9.0 R5.0 F60;
G00
X40.0 Y210.0;
G98
G81 Z-9.0 R5.0 F60;
G15;
G91
G28 Z0;
M06
T06;
G90
G15 G54 M3 S500;
GO0
X0 Y0;
G43
H06 G00 Z20.0;
G16
G00 X40.0 Y40.0;
G99
G81 Z-20.0 R5.0 F60;
G00
X40.0 Y210.0;
G98
G81 Z-20.0 R5.0 F60;
G15;
G91
G28 Z0;
M06
T07;
G90
G15 G54 M03 S450;
GO0
X0 Y0;
G43
H07 G00 Z20.0;
G16
G00 X40.0 Y40.0;
G99
G81 Z-20.0 R5.0 F50;
G00
X40.0 Y210.0;
G98
G81 Z-20.0 R5.0 F50;
G15;
G91
G28 Z0;
M06
T08;
G90
G15 G54 M03 S500;
GO0
X0 Y0;
G43
H08 G00 Z20;
G16
G00 X40.0 Y40.0;
G99
G82 Z-10.0 R5.0 P2000 F60;
G00
X40.0 Y210.0;
G99
G82 Z-10.0 R5.0 P2000 F60;
G15;
G91
G28 Z0;
M06
T09;
G90
G15 G54 M03 S50;
GO0
X0 Y0;
G43
H09 G00 Z20.0;
G16
G00 X40.0 Y40.0;
G99
G85 Z-18.0 R5.0 F40;
G00
X40.0 Y210.0
G98
G85 Z-18.0 R5.0 F40;
G15;
G91
G28 Z0;
M30;