一、數(shù)控銑削加工程序編制
例:銑削槽形凸輪,曲線槽的中心線由R95(O3)R90(O2) R150(O1) R72(O5) R92(O4) R69(O1)圓弧,以及兩直線AB、GH組成,各相鄰線段相切。
工藝:走刀路線----各線段依次走刀加工,E-F-G-H-A-B-C-D-E。
切入:沿曲線的加工起點的切線方向切入;對銑削槽,不能沿槽深方向象鉆孔那樣直接銑到槽深尺寸,而是要邊軸向進給邊來回銑削到槽深。
切出:當(dāng)一條輪廓加工完后,不能在終點直接退刀,而要沿終點的切線方向切出一段距離。
當(dāng)槽寬有精度要求時,分別加工槽的外壁和內(nèi)壁用刀具半徑補償指令,通過選取補償量來保證槽寬的尺寸精度。
編程尺寸計算:需要計算相鄰線段的交點或切點的坐標(biāo),也稱基點坐標(biāo)計算。計算精度一般按四舍五入,精確到最小位移增量。對非圓曲線和列表曲線,還要進行曲線擬合和逼近的數(shù)學(xué)處理,計算相鄰逼近線段的交點或切點坐標(biāo),稱節(jié)點計算。
例中各交點的坐標(biāo)計算結(jié)果如下:
A(37.601,57.855) B(79.550,87.463) C(102.740,89.511) D(148.525,20.984)
E(149.997,0.974) F(122.565,-56.043) G(54.839,-75.443) H(-7.539,-68.589)
采用FANUC 3MC 數(shù)控系統(tǒng)指令編程:
Nvalue="1" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">001 G92 X0 Y0 Zvalue="1000000" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">1000000 M03 坐標(biāo)系設(shè)定
Nvalue="2" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">002 Gvalue="17" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">17 Gvalue="90" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">90 G00 X150000 Y-15000 S600
Nvalue="3" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">003 Gvalue="19" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">19 G01 Zvalue="30000" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">30000 Fvalue="2000" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">2000 M08
N004 Zvalue="0" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">0 F200
N005 Y15000 Z-3000 軸向進刀
N006 Y-15000 Z-8000
N007 Y15000 Z-15000 至槽的深度
Nvalue="8" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">008 Gvalue="17" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">17 Gvalue="1" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">01 G42 X149.997 Y947 H21 切向切入至E點,建立刀補。加工內(nèi)壁。
Nvalue="9" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">009 G02 X1225656 Y–56043 R72 E--F
N010 X54839 Y-75443 Rvalue="93" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">93 F--G
Nvalue="11" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">011 Gvalue="1" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">01 G42 X-75939 Y-68589 Hvalue="22" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">22 G--H
Nvalue="12" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">012 G02 X- 37601 Y57855 R69 H--A
Nvalue="13" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">013 Gvalue="1" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">01 G42 X79550 Y87463 Hvalue="23" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">23 A--B
Nvalue="14" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">014 G02 X102740 Y89511 B--C
N015 X148525 Yvalue="20984" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">20984 C--D
N016 X149997 Y947 D--E
Nvalue="17" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">017 Gvalue="1" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">01 G40 Y-15000 切向切出,撤消刀補。
N018 Y20000
Nvalue="19" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">019 G41 Y974 H21 切向切入至E點,建立刀補。加工外壁。
.
.
Nvalue="30" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">030 G17 X0 Yvalue="0" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">0 M02
二、數(shù)控鉆鏜攻絲程序的編制
鉆鏜攻絲屬點位控制的加工,每個加工位置有兩個動作。XY平面的快速定位(G00)和Z軸的進給加工動作。而每個Z軸的加工動作多由幾個固定分動作組成,稱為工作循環(huán)。如
鉆孔:進給 快速退離 N--- GO1 Z— F-- N--- GOO Z---
攻絲:進給 暫停-主軸反轉(zhuǎn) 反向進給 N—G01 Z—F—M03 N—Gvalue="4" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">04 M05 N—G01 Z—M04
若按常規(guī)編程,Z軸的動作需要幾個程序段完成。對于Z軸的固定循環(huán)動作,數(shù)控系統(tǒng)具有相應(yīng)的規(guī)定循環(huán)功能指令來實現(xiàn)。這是只需一個程序段。
以FANUC OMC系統(tǒng)為例:
鉆孔: Gvalue="98" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">98 G81 Z— R— F—
攻絲: Gvalue="98" hasspace="True" negative="False" numbertype="1" tcsc="0" w:st="on">98 G84 Z— R— F—
固定循環(huán)指令具有續(xù)效性(摸態(tài)指令)。即一經(jīng)使用,只要執(zhí)行一個G00,就自動執(zhí)行一個固定循環(huán)加工。直到被G80注銷,或被其他固定循環(huán)取代。
固定循環(huán)指令極大的方便了編程,作為編程人員必須很好的掌握和運用。值得注意的是,固定循環(huán)指令是數(shù)控系統(tǒng)所特有的,不同的數(shù)控系統(tǒng),固定循環(huán)的G指令、實現(xiàn)的功能以及書寫格式是不同的,所以,使用固定循環(huán)指令必須認(rèn)真閱讀數(shù)控系統(tǒng)的編程說明書。按說明書中的規(guī)定和要求正確使用。
三、數(shù)控車削加工程序編制
數(shù)控車削的坐標(biāo)系為:縱向為Z,徑向為X。
用絕對值編程:X的尺寸值以直徑表示;用增量值編程:X的尺寸值以位移值的二倍表示。
絕對坐標(biāo)系設(shè)定用G50。
或以X、Z表示絕對坐標(biāo)編程,U、W表示增量坐標(biāo)編程。
由于車削毛坯常用棒料和鍛件,加工余量大,所以,數(shù)控車床常有不同形式的固定循環(huán)指令,用于切除余量的精加工。FANUC OTC 系統(tǒng)的固定循環(huán)指令及功能。
例:成型車削固定循環(huán) G73
用于鍛件的粗加工。通常,鍛件的外形是與零件輪廓相似的,故粗車時,刀具的軌跡是平行于零件輪廓的軌跡。所以,G73分兩個程序段書寫,其表示方式為:
G73 U(Δi) W(Δk) R(d)
G73 P(ns) Q(nf) U(ΔU) W(ΔW) F(f) S(s) t(t)
Δi—X方向粗加工預(yù)留量(半徑值),Δk—Z方向粗加工預(yù)留量,d—粗加工分幾次完成,故第一個程序段說明粗加工的余量以及切削次數(shù)。
ns— 開始循環(huán)的程序段的序號,nf—結(jié)束循環(huán)的程序段的序號,ns---nf 是成型車削固定循環(huán)所對應(yīng)零件輪廓的精加工的程序塊。ΔU---X方向精加工的余量,ΔW—Z方向精加工余量。F—進給速度,s—主軸轉(zhuǎn)速,t—刀具號。