Sg#1=100;
#2=200;
#3=8;
#4=#3*0.8;
#5=0
#6=1000;
#7=200;
#8=30;
#9=#1-#3;
#10=#2-#3;
WHILE[#5GE#8]DO1
S=#6 M3
G0 G54 X0 Y0 Z[#5+1]
IF [#1GE#2] GOTO1
IF [#1LT#2] GOTO2
N1;
#11=FIX[#10/#4]
IF [#1GE#2] GOTO3
N2;
#11=FIX[#9/#4]
IF [#1LT#2] GOTO3
N3;
#12=FIX[#11/2]
WHILE [#12GE 0] DO2
#13=#9/2-#12*#4;
#14=#10/2-#12*#4;
G1 Z-#5 F#7;
X#13;
Y#14;
X-#13
Y-#14
X#13
Y0
#12=#12-1;
END2;
#5=#5=1
END1;
G0 Z50.
M30;
N0010 G59 X0 Z105
N0020 G90
N0030 G92 X35 Z30
N0040 M03 S700
N0050 M06 T01
N0060 G00 X20 Z1
N0070 G01 X20 Z-34.8 F80
N0080 G00 X20 Z1
N0090 G00 X17 Z1
N0100 G01 X17 Z-34.8 F80
N0110 G00 X23 Z-34.8
N0120 G01 X23 Z-80 F80
N0130 G28
N0140 G29
N0150 M06 T03
N0160 M03 S1100
N0170 G00 X14 Z1
N0171 G01 X14 Z0
N0180 G01 X16 Z-1 F60
N0190 G01 X16 Z-35 F60
N0200 G01 X20 Z-35 F60
N0210 G01 X22 Z-36 F60
N0220 G01 X22 Z-80 F60
N0230 G28
N0240 G29
N0250 M06 T05
N0260 M03 S600
N0270 G00 X23 Z-72.5
N0280 G01 X21 Z-72.5 F40
N0290 G04 P2
N0300 G00 X23 Z-46.5
N0310 G01 X16.5 Z-46.5 F40
N0320 G28
N0330 G29
N0340 M06 T07
N0350 G00 X23 Z-47
N0360 G01 X16 Z-47 F40
N0370 G04 P2
N0380 G00 X23 Z-35
N0390 GO1 X15 Z-35 F40
N0400 G00 X23 Z-79
N0410 G01 X20 Z-79 F40
N0420 G00 X22 Z-78
N0430 G01 X20 Z-79 F40
N0440 G01 X0 Z-79 F40
N0450 G28
N0460 G29
N0470 M05
N0480 M02
我这是发那科的G100X0Y0T1:M03S500:G0Z0.1:G1Z-0.1F300:Y100:G0Z0.1,:X100Y100:G1Z-0.1F300:G2X100Y100I50:G90:M29:M30:
下面是一个凸轮的普通数控铣床的程序:
g90g54g00x0y0z50
m3s800m8
x-60z2
g1z-10f50
g41x-45y0f100
g2x45cr=45
x39y12cr=15
g1x19.8y-26.4
g2x-28.97y-15.8cr=33
g3x-37.05y-9.788cr=12
g2x-45y0cr=10
g00z50m9
m05
m30
这个只是一个参考,很简单的。
建议主要是研究具体数控车床的说明书,这样针对性强,实践和操作更方便。
如果是学习基础理专论,属那市面销售的书籍可以参考。
数控加工程序编制 王洪 机械工业出版社
数控手来自工编程100例 陈额金外点钟良艳红 机械工业出版社
数控机床与编程 刘东华 机械工业出版视评体另头江信终星由培社
数控铣床.加工中心编程与操作实例(第2版) 翟瑞波 机械工业出版社