数控加工中心编程一直是广大加工中心作业者比较头疼的部分。信任不少加工中心从业者朋友没受过正规机电大学的教育。今日以FANUC操作系统为例介绍几种常见的编程实例。
实例一 平面加工
参考程序:
O0001;
G90 G94 G21 G17;
G91 G28 Z0;
G90 G54 M03 S350;
G00 X-52.0 Y-50.0;
Z5.0 M08;
G01 Z-8.0 F50;
Y50.0 F52;
G00 Z5.0;
X-44.0 Y-50.0;
G01 Z-4.0 F50;
Y50.0 F52;
G00 Z5.0;
X10. Y50.0;
G01 Z-6.0 F50;
G02 X10.0 Y-50.0 R50.0 F52;
G00 Z20.0 M09;
G91 G28 Z0;
M30;
实例二 外形轮廓加工
参考程序:
(1)圆柱台加工程序
O0001;
G90 G94 G40 G17 G21;
G91 G28 Z0;
G90 G54 M3 S350;
G00 X62.0 Y0;
Z5.0;
G01 Z-4.0 F52;
G41 D02 G01 X47.0 Y0 F52;
G02 I-47.0 J0;
G40 G01 X62.0 Y0;
G41 D02 G01 X31.0 YO;
G02 I-31.0 J0;
G40 G01 X62.0 Y0;
G41 D02 G01 X15.0 Y0;
G02 I-15.0 J0;
G40 G01 X62.0 Y0;
G00 Z20.0;
G91 G28 Z0;
M30;
(2)外轮廓加工程序
O0002;
G90 G94 G40 G17 G21;
G91 G28 ZO;
G90 G54 M03 S350;
G00 X-62.0 Y52.0 M08;
Z5.0;
G01 Z-9.0 F52;
G41 D02 G01 X-40.0 Y30.0 F52;
G01 X-20.0 Y30.0;
X30.0;
G02 X40.0 Y20.0 R10.0;
G01 Y-20.0;
G02 X30.0 Y-30.0 R10.0;
G01 X-30.0;
G02 X-40.0 Y-20.0 R10.0;
G01 Y10.0;
G03 X-20.0 Y30.0 R20.0;
G40 G01 X-62.0 Y52.0;
G00 Z20.0 M09;
G91 G28 Z0;
M30;
数控加工中心机床在粗加工时,选用Φ20的立铣刀,刀具号为T02,刀具半径补偿号为D02,补偿值为10.2mm(0.2mm是精加工余量),
数控加工中心精加工时,选用Φ12的立铣刀,刀具号为T03,刀具半径补偿号为D03,补偿值为6mm。
实例三 数控加工中心槽加工数控编程
参考程序:
(1)十字槽粗加工程序
O0001;
G90 G40 G21 G17 G94;
G91 G28 Z0;
G90 G54 M3 S480;
G00 X30.0 Y0;
Z5.0 M08;
G01 Z-4.0 F40;
X-30.0 F60;
Z-8.0 F40;
X30.0 F60;
G00 Z5.0;
X0 Y25.0;
G01 Z-4.0 F40;
Y-25.0;
Z-8.0 F40;
Y25.0 F60;
G00 Z5.0 M09;
G91 G28 Z0;
M30;
(2)十字槽精加工程序
O0002;(主程序)
G90 G40 G21 G94 G17;
G91 G28 Z0;
G90 G54 M3 S800;
G00 X0 Y0;
Z5.0 M08;
G01 Z0 F40;
M98 P0003 L02;
G90 G00 Z5.0 M09;
G91 G28 Z0;
M30;
O0003;(子程序)
G91 G01 Z-4.0 F40;
G90 G41 D03 G01 X12.5 Y7.5 F50;
G02 X7.5 Y12.5 R5.0;
G01 Y25.0;
G03 X-7.5 R7.5;
G01 Y12.5;
G02 X-12.5 Y7.5 R5.0;
G01 X-30.0;
G03 Y-7.5 R7.5;
G01 X-12.5;
G02 X-7.5 Y-12.5 R5.0;
G01 Y-25.0 ;
G03 X7.5 R7.5;
G01 Y-12.5;
G02 X12.5 Y-7.5 R5.0;
G01 X30.0;
G03 Y7.5 R7.5;
G01 X12.5;
G02 X7.5 Y12.5 R5.0;
G40 G01 X0 Y0;
M99;