您好,欢迎访问三七文档
顺序号程序注释O0001程序名N10G54G90G17建立工件坐标系N20MO3S1000N30G00X-40Y-40A点定位N40Z5N50G01Z-3F100N60Y40B点定位N70X30C点定位N80G02X40Y30R10D点定位N90G01Y-30E点定位N100G02X30Y-40R10F点定位N110G01X-40A点定位N120G00Z100N130M05N140M30试用子程序编制“奥运五环”(切深5mm)顺序号程序注释O0002主程序名N10G54G90G17建立工件坐标系N20M03S1000N30G90G00X-50Y0Z10N40M98P0022调用圆子程序N50G90G00X50Y0N60M98P0022调用圆子程序N70G90G00X0Y0N80M98P0022调用圆子程序N90G90G00X-25Y-15N100M98P0022调用圆子程序N110G90G00X25Y-15N120M98P0022调用圆子程序N130M05N140M30O0022子程序名N10G91G00X-20N20G01Z-15F200N30G02X0Y0I20J0N40G90G00Z10N50M99子程序结束“三菱”的数控铣削加工程序顺序号程序注释N10O0001主程序名N20G17G40G49G80安全指令N30M03S1000N40G54G90G00X0Y0Z10建立G54坐标系N50M98P0011调子程序N60G68X0Y0R-120顺时针旋转120°N70M98P0011调子程序N80G68X0Y0R120逆时针旋转120°N90M98P0011调子程序N100G69M05M30N10O0011子程序名N20G01Z-5F150N30G01X14Y25F200N40X0Y50N50X-14Y25N60X0Y0N70G00Z10N80M99子程序结束已知毛坯规格为80mm×80mm×20mm,材料为45钢,毛坯六面已加工,要求编制八角凸模板零件加工程序并完成零件的加工。零件加工工艺及工装分析(1)零件用平口虎钳装夹,伸出钳口12mm左右;(2)加工方法及刀具选择:1)粗铣采用φ20mm粗立铣刀粗铣正方形外轮廓,留0.50mm单边余量;粗铣八角形凸台,留0.50mm单边余量;粗铣圆柱体,留0.50mm单边余量。2)半精铣采用φ20mm精立铣刀半精铣八角形凸台、圆柱体、正方形外轮廓,留0.10mm单边余量.3)精铣采用φ20mm精立铣刀实测工件尺寸,调整刀具参数,精铣八角形凸台、圆柱体、正方形外轮廓N140G40G00X33Y42取消刀具半径补偿N150G01Z-10.5F200N160G41G01X22.5Y22.5D01F80调用刀具半径补偿铣削正方形外轮廓至10.5mmN170Y-22.5N180X-22.5N190Y22.5N200X22.5N210G40G00X33Y42取消刀具半径补偿N220G00Z10N230G00X33Y35顺序号程序注释O3333程序名N10G17G40G49G80安全指令N20G54G90G00X0Y0建立G54工件坐标系N30G43H01Z100调用刀具长度补偿N40M03S1200N50G00Z30N60G00X33Y42N70Z1M08N80G01Z-5.25F200N90G41G01X22.5Y22.5D01F80调用刀具半径补偿铣削正方形外轮廓至5.25mmN100Y-22.5N110X-22.5N120Y22.5N130X22.5N240Z1N250G01Z-3.5F200N260G41G01X0Y22.5D1F50调用刀具半径补偿铣削八角形凸台至3.5mmN270G01X15.908Y15.908N280X22.5Y0N290X15.908Y-15.908N300X0Y-22.5N310X-15.908Y-15.908N320X-22.5Y0N330X-15.908Y15.908N340X0Y22.5N350G40G00X33Y35取消刀具半径补偿N360G00Z10N370X33Y35N380Z1N390G01Z-7F200N400G41G01X22.5Y25D01F80调用刀具半径补偿铣削圆柱体至7mmN410Y0N420G02I-22.5J0N430G40G00X33Y35取消刀具半径补偿N440G49Z100M09取消刀具长度补偿N450M05N460M30备注粗铣、半精铣和精铣时使用通一个加工程序,只需调整刀具参数分3次调用相同的程序进行加工即可。主加工程序%程序传输起始符O1234;主程序名G91G28Z0;主轴回换刀点T02M06;换02号刀,ϕ16mm键槽铣刀G40G49G80;程序初始化M03S850;主轴正转转速850r/minG90G00G54X0Y0;第一个方槽,工件坐标系G54G43H02Z100.0;Z轴快速定位至100mmZ5.0;Z轴快速定位至5mmM98P4321L2D02;加工第一个方槽G90G00G55X0Y0;第二个方槽,工件坐标系G55M98P4321L2D02;加工第二个方槽G90G00G56X0Y0;第三个方槽,工件坐标系G56M98P4321L2D02;加工第三个方槽G90G00G57X0Y0;第四个方槽,工件坐标系G57M98P4321L2D02;加工第四个方槽G90G00Z150.0;刀具快速抬到150mm高M05;主轴停转G91G28Z0;主轴回换刀点M30;程序结束并返回程序开头%程序传输结束符子加工程序加工程序程序说明%程序传输起始符O4321;子程序名G90Z0刀具进刀至0平面G91G01Z-5.0F100;刀具进刀至-5mm,进给速度100mm/minG41G01X-5.0Y10.0F100;直线切削左刀补G03X-15.0Y0R10.0;逆时针圆弧切削G01Y-5.0;直线切削G03X-5.0Y-15.0R10.0;逆时针圆弧切削G01X5.0;直线切削G03X15.0Y-5.0R10.0;逆时针圆弧切削G01Y5.0;直线切削G03X5.0Y15.0R10.0;逆时针圆弧切削G01X-5.0;直线切削G03X-15.0Y5.0R10.0;逆时针圆弧切削G01Y0;直线切削G03X-5.0Y-10.0R10.0;逆时针圆弧切削G40G01X0Y0;直线切削取消刀具半径补偿G00G90Z5.0;快速抬到5mm高M99;子程调用结束并返回主程序%程序传输结束符精加工的主程序%程序传输起始符O1234;主程序名G91G28Z0;主轴回换刀点T02M06;换02号刀,ϕ16mm键槽铣刀G40G49G80;程序初始化M03S850;主轴正转转速850r/minG90G00G54X0Y0;第一个方槽,工件坐标系G54G43H02Z100.0;Z轴快速定位至100mmZ5.0;Z轴快速定位至5mmM98P4321D03;加工第一个方槽G90G00G55X0Y0;第二个方槽,工件坐标系G55M98P4321D03;加工第二个方槽G90G00G56X0Y0;第三个方槽,工件坐标系G56M98P4321D03;加工第三个方槽G90G00G57X0Y0;第四个方槽,工件坐标系G57M98P4321D03;加工第四个方槽G90G00Z150.0;刀具快速抬到150mm高M05;主轴停转G91G28Z0;主轴回换刀点M30;程序结束并返回程序开头%程序传输结束符配合件的加工图2-44外形加工图2-45槽加工1—退刀路线2—工件3—刀具路径1—退刀路线2—进刀路线3—工件4—G54坐标5—进刀路线4—G54坐标5—刀具路径6—刀具“L”形凸件主加工程序%程序传输起始符O10;主程序名N1010T01;换01号刀,中心钻N1020M98P1;调用1号子程序N1040T02;换02号刀,ϕ7.8mm麻花钻N1050M98P2;调用2号子程序N1070T03;换03号刀,ϕ8.0mm铰刀N1080M98P3;调用3号子程序N1100T04;换04号刀,ϕ12.0mm铣刀N1100M98P4;调用4号子程序N1120T05;换05号刀,ϕ8.0mm铣刀N1130M98P5;调用5号子程序N1150M30;程序结束并返回程序开头%程序传输结束符“L”形凸件子加工程序加工程序程序说明%程序传输起始符O01;(ϕ3中心钻钻凹坑子程序)子程序名N010G90G54G0X0Y0S1000M03;快速定位0点,主轴正转,转速1000r/minN0011G43H1Z100.0;刀具进刀至100mmN0012M08;切削液开N0013G98G81X0Y0R5.0Z-3.0F100;钻孔固定循环N0014X25.0Y25.0;定孔位置N0015G80;取消钻孔固定循环N0016M99;子程调用结束并返回主程序%程序传输起始符O02;(ϕ7.8mm麻花钻钻孔子程序)子程序名N0100G90G54G00X0Y0S850M03;快速定位0点,主轴正转,转速850r/minN0105G43H2Z100.0;刀具进刀至100mmN0110M08;切削液开N0115G98G81X0Y0R5.0Z-15.0F100;钻孔固定循环N0120X25.0Y-25.0;定孔位置N0125G80;取消钻孔固定循环N0130M99;子程调用结束并返回主程序%程序传输结束符%程序传输起始符O03;(ϕ8.0mm铰刀铰孔子程序)子程序名N0200G90G54G00X0Y0S200M03;快速定位0点,主轴正转,转速200r/minN0205G43H3Z100.0;刀具进刀至100mmN0210M08;切削液开N0215G98G81X0Y0R5.0Z-10.0F50;钻孔固定循环N0220X25.0Y25.0;定孔位置N0225G80;取消钻孔固定循环N0230M99;子程调用结束并返回主程序%程序传输结束符%程序传输起始符O04;(ϕ12mm粗铣外框轮廓)子程序名N1000G90G54G00X0Y0S800M03;快速定位0点,主轴正转,转速200r/minN1005G43H4Z100.0;刀具进刀至100mmN1010M08;切削液开N1020X-45.0;移动到进刀点N1025Z5.0;刀具进刀至5mmN1030G01Z-5.0F50;进刀至-5mmN1035G41Y-20.0D01F100;直线切削左刀补N1040G03X-25.0Y0R20.0;逆时针圆弧切削入N1045G01Y20.0;直线切削N1050G02X-20.0Y25.0R5.0;顺时针圆弧切削N1055G01X-5.0;直线切削N1060G02X0Y20.0R5.0;顺时针圆弧切削N1065G01Y0;直线切削N1070X20.0;直线切削N1075G02X25.0Y-5.0R5.0;顺时针圆弧切削N1080G01Y-20.0;直线切削N1085G02X20.0Y-25.0R5.0;顺时针圆弧切削N1090G01X-15.0;直线切削N1095G02X-25.0Y-15.0R10.0;顺时针圆弧切削N1100G01Y0;直线切削N1105G03X-45.0Y20.0R20.0;逆时针圆弧切削出N1110G40G01Y0;直线切削取消刀具半径补偿N1115G01Z-9.8F50;进刀至-5mmN1120G41Y-20.0D01F100;直线切削左刀补N1125G03X-25.0Y0R20.0;逆时针圆弧切削入N1130G01Y20.0;直线切削N1135G02X-20.0Y25.0R5.0;顺时针圆弧切削N1140G01X-5.0;直线切削N1145G02X0Y20.0R5.0;顺时针圆弧切削N1150G01Y0;直线切削N1155X20.0;直线切削N1160G02X25.0Y-5.0R5.0;顺时针圆弧切削N1165G01Y-20.0;直线切削N1170G02X20.0Y-25.0R5.0;顺时针圆弧切削N1175G01X-15.0;直线切削N1180G02X-25.0Y-15.0R10.0;
本文标题:数控铣床编程例题
链接地址:https://www.777doc.com/doc-2754908 .html