1、A1A2 2022-11-142l4.1 4.1 数控铣床程序编制基础数控铣床程序编制基础 l4.2 4.2 数控铣床程序编制的基本方法数控铣床程序编制的基本方法2022-11-1432022-11-1442022-11-145702022-11-146712022-11-1472022-11-1482022-11-1492022-11-14102022-11-14112022-11-14122022-11-14132022-11-14142022-11-14152022-11-14162022-11-14172022-11-14182022-11-14192022-11-14202022-1
2、1-14212022-11-14222022-11-14232022-11-14242022-11-1425编程格式:编程格式:G04 X P 暂停暂停2 2秒几秒几种表达?种表达?例:例:G04 X2.;G04 X2000;G04 P2000;4、程序暂停、程序暂停G042022-11-1426刀具半径补偿应用举例:刀具半径补偿应用举例:2022-11-1427刀具半径补偿应用举例:刀具半径补偿应用举例:2022-11-1428长度补偿应用举例:长度补偿应用举例:例例2、控制钻孔刀具运动如图,假设刀具长度补偿控制钻孔刀具运动如图,假设刀具长度补偿H015mm,H025mm,用同一把刀具走出轨
3、迹,程序名取用同一把刀具走出轨迹,程序名取O0010,编程原点设置如图,起刀点在,编程原点设置如图,起刀点在(0,0,30)。2022-11-1429例例2、控制钻孔刀具运动如图,假设刀具长度补偿控制钻孔刀具运动如图,假设刀具长度补偿H015mm,H025mm,用同一把刀具走出轨迹,程序名取用同一把刀具走出轨迹,程序名取O0010,编程原点设置如图,起刀点在,编程原点设置如图,起刀点在(0,0,30)。长度补偿应用举例:长度补偿应用举例:解:程序如下:解:程序如下:N10 G92 X0 Y0 Z30;N20 M03 S600;N30 G90 G01 Z15 F100 M08;N40 G01 Z
4、30;N50 G01 X30;N60 G43 G01 Z15 H01;N70 G01 Z30;N80 G01 X60;N90 G43 G01 Z15 H02;N100 G49 G01 Z30;N110 M30;2022-11-1430子程序调用指令子程序调用指令M98M98子程序结束指令子程序结束指令M99M99子程序嵌套子程序嵌套2022-11-1431M98 P40012;2022-11-14322022-11-14332022-11-14342022-11-1435子程序应用举例:子程序应用举例:2022-11-1436子程序应用举例:子程序应用举例:2022-11-14372022-11-14382022-11-14392022-11-14402022-11-14412022-11-14422022-11-14432022-11-14442022-11-1445图图4.282022-11-14462022-11-14472022-11-14482022-11-14492022-11-14502022-11-14512022-11-14522022-11-14532022-11-14542022-11-14552022-11-14562022-11-1457