矩形型腔光侧宏程序
坐标系建立:四面分中,顶面为零
当#17=0时,一刀光侧,如下图:
当#17=2(每刀切削深度)时,分层光侧,如下图:
完整程序内容:
O8093
G90 G17 G40 G49 G80 G69
G91 G28 Z0.
#1=100
#12=80
#2=12
#13=10
#3=10
#20=1
#19=6500
#9=3500
#26=0
#17=2
#108=0
#109=0
#117=#1-#3-[#108*2]
#118=#12-#3-[#108*2]
#119=#2-#109
T#20 M6
G90 G54
#124=[#117/2]-3
G0 X#124 Y0.
G43 Z10. H#20
/M8
IF[#17EQ#2]GOTO100
#26=#26+#17
WHILE[#26LT#119]DO1
G1 Z-#26 F2500.
#24=[#117/2]
G3 X#24 I[[#24-#124]/2] F#9
#18=#13-[#3/2]-#108
#25=[#118/2]-#18
G1 Y#25
G3 X[#24-#18] Y[#25+#18] I-#18
G1 X-[#24-#18]
G3 X-#24Y#25 J-#18
G1 Y-#25
G3 X-[#24-#18] Y-[#25+#18] I#18
G1 X[#24-#18]
G3 X#24 Y-#25 J#18
G1 Y0.
G3 X#124 I-[[#24-#124]/2]
#26=#26+#17
END1
N100
G1 Z-#119 F2500.
#24=[#117/2]
G3 X#24 I[[#24-#124]/2] F#9
#18=#13-[#3/2]-#108
#25=[#118/2]-#18
G1 Y#25
G3 X[#24-#18] Y[#25+#18] I-#18
G1 X-[#24-#18]
G3 X-#24 Y#25 J-#18
G1 Y-#25
G3 X-[#24-#18] Y-[#25+#18] I#18
G1 X[#24-#18]
G3 X#24 Y-#25 J#18
G1 Y0.
G3 X#124 I-[[#24-#124]/2]
M9
M5
G91 G28 Z0.
G28 Y0.
M30
%
问答社区 发起问答 报警查询 技术文章 维修服务 资料下载 加交流群 申请 VIP
本文转载来自【公众号:CNC345CAM】,仅供大家学习交流,如侵权请联系站长删文。