采用边切削边下刀的走刀方式,用于腰形槽开粗,如下图:坐标系建立:四面分中,顶面为零
完整程序内容:
%
O8050
#1=30
#12=16
#2=10
#3=10
#20=8
#19=6500
#9=2000
#27=0.05
#17=0.2
#26=0
#108=0.1
#109=0.1
#119=#2-#109
T#20 M6
G0 X0. Y0. S#19 M3
G43 Z10. H#20
/M8
G1 Z0.3 F2500.
#25=[#12-#3]/2-#108
Y#25 F#9
X-[#1/2] Z0.
#26=#26+#27
WHILE[#26LT#119]DO1
G3 Y-#25 Z-#26 I0. J-#25
#26=#26+#27
IF[#26GE#119]GOTO100
G1 X[#1/2] Z-#26
#26=#26+#27
IF[#26GE#119]GOTO200
G3 Y#25 Z-#26 I0. J#25
#26=#26+#27
IF[#26GE#119]GOTO300
G1 X-[#1/2] Z-#26
#26=#26+#27
IF[#26GE#119]GOTO400
END1
N100
G1 X[#1/2] Z-#119
G3 Y#25 I0. J#25
G1 X-[#1/2]
G3 Y-#25 I0. J-#25
G1 X[#1/2]
GOTO500
N200
G3 X[#1/2] Y#25 Z-#119 I0. J#25
G1 X-[#1/2]
G3 Y-#25 I0. J-#25
G1 X[#1/2]
G3 Y#25 I0. J#25
GOTO500
N300
G1 X-[#1/2] Z-#119
G3 Y-#25 I0. J-#25
G1 X[#1/2]
G3 Y#25 I0. J#25
G1 X-[#1/2]
GOTO500
N400
G3 X-[#1/2] Y-#25 Z-#119 I0. J-#25
G1 X[#1/2]
G3 Y#25 Z-#26 I0. J#25
G1 X-[#1/2] Z-#26
G3 Y-#25 Z-#119 I0. J-#25
GOTO500
N500
G0 Z10.
G91 G28 Z0.
G28 Y0.
M30
%
标签: 数控宏程序