QQ登录

只需一步,快速开始

快捷登录

登录 或者 注册 请先

UG爱好者

查看: 2478|回复: 3
打印 上一主题 下一主题

[原创] 手动编程草搞

[复制链接]

四级士官

Rank: 3Rank: 3

3

主题

88

帖子

804

积分
跳转到指定楼层
楼主
发表于 2018-5-30 22:27:26 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
切斷
#5201=0;
#5202=0;
#5203=0;
G40 G49 G69 G80 G90;
G91 G28 Z0;
M06 T02;
G54.1 P01;
G00 G90 X0 Y0;
G43 H02 Z10 M03 S3000;
M08;
Z5.;
#10=5; (高度)
#5=60; (長度)
#1=0.1; (每刀切深)
#2=#1; (梯增)
N1;
G90 G01 Z-#1 F200;
G91 G01 Y-#5 F3000;
G00 G90 Y0;
#1=#1+#2;
IF[#1 LE #10] GO 1;
G90 G00 Z15;
M09;
G91 G28 Z0;
G91 G28 Y0;
G40 G49 G69 G80 G90;
M30;

銑內圓
#5201=0;
#5202=0;
#5203=0;
G40 G49 G69 G80 G90;
G91 G28 Z0;
M06 T02;
G54.1 P01;
G00 G90 X0 Y0;
G43 H02 Z10 M03 S3000;
M08;
Z5.;
#33=1500;
#11=50; (內徑)
#9=8.5; (刀徑)
#8=[#11-#9]/2;
#7=0.5; (每刀進給量)
#1=0.1; (每刀切深)
#2=#1;
#10=10; (高度)
WH [#1 LE #10] DO 2;
G90 G00 X-#8 Y0;
G90 G01 Z-#1 F300;
WH [#8 GE 0] DO 1;
G90 X-#8 Y0;
G90 G02 I#8 F#33;
#8=#8-#7;
END 1;
#1=#1+#2;
#8=[#11-#9]/2;
END 2;
G90 G00 Z15;
M09;
G91 G28 Z0;
G91 G28 Y0;
G40 G49 G69 G80 G90;
M30;

斜線倒角23度
#5201=0;
#5202=0;
#5203=0;
G40 G49 G69 G80 G90;
G91 G28 Z0;
M06 T02;
G54.1 P01;
G00 G90 X0 Y0;
G43 H02 Z10 M03 S3000;
M08;
Z5.;
#33=5000;
#10=50.74; (X起點)
#11=28.50; (Y起點)
#12=17.69; (Y終點)
#13=22.44; (Y寬度)
#9=23; (角度)
#8=#13-#12;
#6=6/2;
#5=0;
#4=0.05; (每刀進給量)
WH [#5 LE #8] DO 1;
#1=TAN[[#9]*#5;
G90 G00 X-#10 Y[#11+#6+#5]
G90 G01 Z-#1 F300;
G90 G01 X0 Y[#12+#6+#5] F#33;
X#10 Y[#11+#6+#5];
G90 G00 X-#10 Y[#11+#6+#5];
#5=#5+#4;
END 1
G90 G00 Z15;
M09;
G91 G28 Z0;
G91 G28 Y0;
G40 G49 G69 G80 G90;
M30;

直線倒角45度
#5201=0;
#5202=0;
#5203=0;
G40 G49 G69 G80 G90;
G91 G28 Z0;
M06 T02;
G54.1 P01;
G00 G90 X0 Y0;
G43 H02 Z10 M03 S3000;
M08;
Z5.;
#33=5000;
#10=220/2; (長度)
#11=48.5/2; (寬度)
#8=8.5/2; (刀徑)
#7=0;
#3=3.5; (倒角寬)
#5=#3; (倒角高度)
#6=0.05; (每刀進給梯增)
G90 G00 X-#10 Y[#11+#8-#7];
WH [#7 LE #3] DO 1;
G90 G01 Z-#5 F300;
G90 X-#10 Y[#11+#8-#7];
G91 X[#10*2] F#33;
G90 G00 X-#10 Y[#11+#8-#7];
#7=#7+#6;
#5=#5-#6;
END 1;
G90 G00 Z15;
M09;
G91 G28 Z0;
G91 G28 Y0;
G40 G49 G69 G80 G90;
M30;

內圓倒角45度
#5201=0;
#5202=0;
#5203=0;
G40 G49 G69 G80 G90;
G91 G28 Z0;
M06 T02;
G54.1 P01;
G00 G90 X0 Y0;
G43 H02 Z10 M03 S3000;
M08;
Z5.;
#10=300/2; (半徑)
#8=6/2; (刀半徑)
#7=#10-#8;
#1=13; (高度)
G90 G00 Z-#1 F300;
G90 X-#7;
G02 I#7 F2000;
#7=#7+0.01; (把加號改為減為外倒角)
#1=#1-0.01;
IF[#1 GE 0] GO 1;
G90 G00 Z15;
M09;
G91 G28 Z0;
G91 G28 Y0;
G40 G49 G69 G80 G90;
M30;

銑平面(從內向外)
#5201=0;
#5202=0;
#5203=0;
G40 G49 G69 G80 G90;
G91 G28 Z0;
M06 T02;
G54.1 P01;
G00 G90 X0 Y0;
G43 H02 Z10 M03 S3000;
M08;
Z5.;
#30=166; (長度)
#31=88; (寬度)
#6=5;
#5=#30-#31; (下刀位置)
G90 G00 X-[#5/2] Y0;
#1=0.5;
#20=#1;
#10=4; (進給刀寬)
N2;
G91 G00 X-[#5/2] Y0;
#2=#5;
#3=#6;
G90 G01 Z-#1 F300;
N1;
G91 X#2 F800;
Y-#3;
#2=#2+#6;
#3=#3+#6;
X-#2;
Y#3;
#2=#2+#6;
#3=#3+#6;
IF [#2 LE #30] GO 1; (長度循壞)
G90 G00 Z0;
IF [#1 EQ [#10-0.5]] THEN #20=0.1;
#1=#1+#20;
IF [#1 LE #10] GO 2; (高度循壞)
G90 G00 Z15;
M09;
G91 G28 Z0;
G91 G28 Y0;
G40 G49 G69 G80 G90;
M30;

銑平面(從外向內)
#5201=0;
#5202=0;
#5203=0;
G40 G49 G69 G80 G90;
G91 G28 Z0;
M06 T02;
G54.1 P01;
G00 G90 X0 Y0;
G43 H02 Z10 M03 S3000;
M08;
#10=5; (高度)
#7=163; (長度)
#8=83; (寬度)
#5=12; (刀徑)
#4=#7-#5;
#6=#8-#5;
#3=6; (進給寬度)
#1=0.1;
#2=#1;
N5;
#4=#7-#5;
#6=#8-#5;
G90 G00 X-[#4/2] Y[#6/2];
G90 G01 Z-#1 F300;
G91 G01 X#4 F4000;
Y-#6;
X-#4;
Y#6;
WH [#6 GE 0] DO 1;
#4=#4-#3;
#6=#6-#3;
X#4;
Y-#6;
#4=#4-#3;
#6=#6-#3;
X-#4;
Y#6;
END 1;
IF [#1 EQ [#10-0.5]] THEN #2=0.1;
#1=#1+#2;
IF [#1 LE #10] GO 5;
G90 G00 Z15;
M09;
G91 G28 Z0;
G91 G28 Y0;
G40 G49 G69 G80 G90;
M30;


銑平面(橫銑)
#5201=0;
#5202=0;
#5203=0;
G40 G49 G69 G80 G90;
G91 G28 Z0;
M06 T02;
G54.1 P01;
G00 G90 X0 Y0;
G43 H02 Z10 M03 S3000;
M08;
#30=30; (長度)
#31=16; (寬度)
#8=8; (刀徑)
#1=9; (高度)
#2=#30-#8;
N2;
G00 G90 X-[#2/2] Y-[[#31+#8]/2];
Z5.;
#20=2000;
#3=0.5;
#4=#3;
G91 G01 X#2 F#20;
IF [#5 EQ #31] GO 3;
#5=#5+#4;
G01 Y#3;
G91 X-#2;
IF [#5 EQ #31] GO3;
#5=#5+#4;
Y#3;
#5=#5+#4;
IF [#5 LE #31] GO 1;
N3;
G90 G00 Z15;
M09;
G91 G28 Z0;
G91 G28 Y0;
G40 G49 G69 G80 G90;
M30;

螺旋銑圓
#5201=0;
#5202=0;
#5203=0;
G40 G49 G69 G80 G90;
G91 G28 Z0;
M06 T02;
G54.1 P01;
G00 G90 X0 Y0;
G43 H02 Z10 M03 S3000;
M08;
#33=2000;
#8=6; (刀徑)
#9=7.5; (內徑)
#30=#9-#8;
#20=5; (高度)
#1=1; (下刀進給量)
#2=0;
#21=#20/#1;
#3=360*#21;
#10=1; (度數遞增)
#6=#1/[360/#10]; (Z值遞增)
#7=
版权声明  
本人声明此帖为本人原创帖,未经允许,不得转载!

有奖推广贴子: 

回复

使用道具 举报

少校

Rank: 6Rank: 6

6

主题

732

帖子

9960

积分
沙发
发表于 2018-5-30 22:41:54 | 只看该作者
好东西谢谢分享
回复 支持 反对

使用道具 举报

六级士官

Rank: 4

2

主题

84

帖子

1452

积分
板凳
发表于 2018-8-14 12:42:19 | 只看该作者
不懂为何要清除EXT坐标!
回复 支持 反对

使用道具 举报

大校

Rank: 8Rank: 8

1

主题

597

帖子

1万

积分
地板
发表于 2019-2-11 00:16:21 | 只看该作者
謝謝大大分享
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

 
 
QQ:1359218528
工作时间:
9:00-17:00
 
微信公众号
手机APP
机械社区
微信小程序

手机版|UG爱好者论坛 ( 京ICP备10217105号-2 )    论坛管理员QQ:1359218528

本站信息均由会员发表,不代表本网站立场,如侵犯了您的权利请联系管理员,邮箱:1359218528@qq.com  

Powered by UG爱好者 X3.2  © 2001-2014 Comsenz Inc. GMT+8, 2024-11-30 19:00

返回顶部