数控加工编程实例
一、数控车床实例
1.实例一
程序:
O5554;
T0101;
S500 M03;
G00 X45 Z2;
G71 U2 R1 ;
G71 P10 Q90 U0.2 W0 F0.15;
N10 G00 G42X 14Z1;
N20 G01 X19.9 W-2 F0.08;
N30 Z-20;
N40 X20;
N50 X28 Z-30;
N60 W-10;
N70 X36;
N80 W-20;
N90 G00 G40;
G00 X150;
Z150;
S1000 M03 T0202;
G00 X45 Z2;
G70 P10 Q90;
G00 X150;
Z150;
S500 M03 T0303;
G00 X24 Z-20;
G01 X17 F0.05;
G00 X250;
Z150;
S6000 M03 T0404;
G00 X20 Z2;
G92 X19.2 Z-18 F1.5;
X18.6;
X18.2;
X18.04;
G00 X150;
S500 M03 T0303;
G00 X40 Z-59;
G01 X2 F0.05;
G00 X150;
Z150;
M05;
M30;
2.实例二
工件最大外圆直径为φ60,零件长度尺寸为100,故选择棒料毛坯,尺寸为φ65×200或φ70×200。注:零件毛坯的伸出长度应足够长,以满足加工需要。
由于被加工表面分为柱面、端面、螺纹面、退刀槽等,需选择90°外圆面刀、螺纹刀、切断刀。
1号刀  90°外圆面刀;
2号刀  切断切槽刀,刀宽为5mm;
3号刀  外螺纹刀,刀尖角为60°
程序:
%0001
N001 T0101
N002 M03 S400
N003 G01 X66 Z3 F1200
N004 G71 U1.5 R1 P005 Q011 X0.4 Z0.1
N005 G00 X0 Z0
N006 G03 X20 Z-10 R10
N007 G01 X48
N008 W-70
N009 X60
N010 W-20
N011 X66
N012 G00 Z3
N013 T0202 M06
N014 G00 X49 Z-60
N015 G01 X45 F300
N016 G04 U5
N017 G01 X49
N018 G00 X61 Z10
N019 T0303 M06
N020 G00 X50 Z-8
N021 G01 X47.1 F500
N022 G95 G32 Z-57 F2
N023 G01 X50
N024 Z-8
N025 X46.5
N026 G95 G32 Z-57 F2
N027 G01 X50
N028 Z-8
N029 X45.9
N030 G95 G32 Z-57 F2
N031 G01 X50
N032 Z-8
N033 X45.5
N034 G95 G32 Z-57 F2
N035 G01 X50
N036 Z-8
N037 X45.4
N038 G95 G32 Z-57 F2
N039 G01 X50
N040 G00 X66 Z3
N041 M30
3.实例三
程序:
N10 G92 X350.0 Z400.0*
(设定程序原点,即工件坐标系)
N12 G00 T10 M06*
(换1号刀,因为1号刀为基准刀,所以刀偏为零)
N14 G00 X82.4 Z2.0 M03*
(主轴正转启动,刀具快速逼近工件)
N16 G01 Z-35.0 F15.0*
(刀具以150mm/min的进给量粗车外圆)
N18 G00 X86.0 *
(快速退刀)
N20 G00 Z2.0*
(快速退刀)
N22 *
(快速退刀)
N24 G70 U-7.6 W-21.8 L2 D4 F150*
(固定矩形循环粗车外圆)
N26 G00 X70.4*
(快速进刀)
m98调用子程序格式N28 G01 Z-18.2 F150*
(刀具以150mm/min的进给量粗车外圆)
N30 G02 X74.4 Z-19.8 I2.0 K0.0*
(刀具以150mm/min的进给量粗车R2圆角)
N32 G00 Z0.0*
(快速退刀)
N34 G01 X48.0 F80*
(刀具以80mm/min的进给量粗车端面)
N36 G00 Z2.0 *
(快速退刀)
N38 G00 X62.0*
(快速退刀)
N40 G01 X70.0 Z-2.0 F60*
(刀具以60mm/min的进给量切削2X45º倒角)
N42 G01 Z-18.0*
(刀具以60mm/min的进给量精车外圆Ø70)
N44 G02 X74.0 Z-20.0 I2.0 K0.0*
(刀具以60mm/min的进给量精车R2圆角)
N46 G01 X80.0*
(刀具以60mm/min的进给量精车端面)
N48 G01 X82.0 W-1.0*
(刀具以60mm/min的进给量切削1X45º倒角)
N50 G01 Z-35.0*
(精车外圆Ø82)
N52 G01 X86.0*
(退刀)
N54 G00 X300.0 Z200.0*
(快速退刀至换刀点,“注1”)
N56 G00 X47.0 Z5.0 T22 M06*
(换2号刀,调用2号刀偏值,一边补偿一边快速接近工件)
N58 G00 Z-18.0*
(快速进刀)
N60 G01 X54.0 F80.0*
(刀具以80mm/min的进给量切槽)
N62 G04 X0.15*
(刀具在槽底停留0.15秒,保证Ø54尺寸)
N64 G00 X47.0*
(快速退刀)
N66 G00 Z5.0*
(快速退刀)
N68 G00 X300.0 Z200.0 T20*
(一边取消刀补,一边快速退向换刀点)
N70 G00 X58.0 Z5.0 T33 M06*
(换3号刀,调用3号刀偏值,一边补偿一边快速接近工件)
N72 G01 X50.5 Z-2.0 F60*
(刀具以60mm/min的进给量切削2X45º倒角)
N74 G01 Z-16.0*
(刀具以60mm/min的进给量切削M52X1.5齿顶)
N76 G01 X50.0 Z-17.0*
(进刀)
N78 G01 W-9.0*
(刀具以60mm/min的进给量切削Ø50内孔)
N80 G00 X47.0*
(快速退刀)
N82 G00 Z2.0*
(快速退刀)
N84 G00 X300.0 Z200.0 T30*
(一边取消刀补,一边快速退向换刀点)
N86 M05*
(主轴停止)
N88 M00*
(程序停止,手动换档,使主轴转速为500转/分钟,变速完毕后,按下系统的“启动”键)
N90 M03*
(主轴正转启动)
N92 G00 X51.3 Z2.0 T44 M06*
(换4号刀,调用4号刀偏值,一边补偿一边快速接近工件)
N94 M98 D900*
(调用螺纹切削子程序)
N96 G00 X51.7*
(快速进刀)
N98 M98 D900*
(调用螺纹切削子程序)
N100 G00 X52.0*
(快速进刀)
N102 M98 D900*
(调用螺纹切削子程序)
N104 G00 X350.0 Z400.0 T40 M05*
(一边取消刀补,一边快速退到刀具的起始点,同时主轴停止旋转,“注2”)
N106 M30*
(程序停止)
N900 G32 W-18.0 F1.5*
(子程序开始,螺纹切削)
螺纹切削子程序“注3”
N902 G00 X47.0*
(快速退刀)
N904 G00 Z2.0*
(快速退刀)
N906 M99*
(返回主程序)

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。