




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、MasterCAM后處理設(shè)置教程sav_coolant : 0 #Coolant savedtoolchng : 1 #On a toolchange flagspdir2 : 1 #Copy for safe spindle direction calculation #Drill variablesdrlgsel : -1 #Drill Select Initializedrillref : 0 #Select drill referencepeckacel : 0 #Fractional percent to reduce peck2 when usecan. : no drlgcode
2、 : 0 #Save Gcode in drillsav_dgcode : 0 #Drill gcode saved # - # 格式列表 - n=nonmodal, l=leading, t=trailing, i=inc, d=delta# -#定義 英制/米制 坐標格式列表fs2 1 0.7 0.6 #小數(shù), absolute, 7 place, default for initialize (:) fs2 2 0.4 l1.3 #小數(shù), absolute, 4/3 place (x,y,z)fs2 3 0.4 l1.3d #小數(shù), delta, 4/3 place (i,j,k) #C
3、ommon format statementsfs2 4 1 0 1 0 #整數(shù), 無前綴fs2 5 2 0 2 0l #整數(shù), 強制兩位前綴fs2 6 3 0 3 0l #整數(shù), 強制三位前綴fs2 7 4 0 4 0l #整數(shù), 強制四位前綴fs2 9 0.1 0.1 #小數(shù), absolute, 1 placefs2 10 0.2 0.2 #小數(shù), absolute, 2 placefs2 11 0.3 0.3 #小數(shù), absolute, 3 placefs2 12 0.4 0.4 #小數(shù), absolute, 4 placefs2 13 0.5 0.5 #小數(shù), absolute,
4、5 placefs2 14 0.3 0.3d #小數(shù), delta, 3 placefs2 15 0.2 0.1 #小數(shù), absolute, 2/1 placefs2 16 1 0 1 0n #整數(shù), 強制輸出 # 輸出加工類型字符串定義# - # 字符串 - 字符串標簽必須由 s 開頭,它們沒有預(yù)先指派# - #Select operation notesop00 "NULL" # String definitionsop01 "CONTOUR" # " "sop02 &qu
5、ot;CONTOUR" # " "sop03 "DRILL CYCLE" # " "sop04 "POCKET." # " "sop05 "RULED." # " "sop06 "2D-SWEPT." # " "sop07 "3D-SWEP
6、T." # " "sop08 "REVOLVED." # " "sop09 "LOFT." # " "sop10 "COONS." # " "sop11 "TRIM ." # " "sop12 "FLOWLINE." #
7、" "sop13 "SURFACE_FINISH" # " "sop14 "SURFACE_ROUGH" # " "sop15 "POINT." # " "sop16 "DRILL-5AX."sop17 "CURVE-5AX."sop18 "SWARF-5A
8、X."sop19 "flat MILL"sop20 "op20?." sopnote # Target string fstrsel sop00 opcode sopnote # - # NC 輸出的字符串和字符串選擇定義# -#Address string definitions 位址串定義strm "M"strn "N"stro "O"strp "P"srad
9、 "R"srminus "R-"sblank #Cantext 字符串定義 (spaces must be padded here)sm00 "M00"sm01 "M01"strtextnostrcantext # - # 錯誤信息# - saxiswarn " WARNING-THE RAD OF ARC IS TOO LARGE" # - # 一般的 G 和 M 代碼串選擇表 General G and M Co
10、de String select tables# - # 運動 G 代碼選擇sg00 G00 #快速定位sg01 G01 #直線進給sg02 G02 #圓弧插補 CWsg03 G03 #圓弧插補 CCWsg04 G04 #暫停sgcode #Target for string fstrsel sg00 gcode sgcode# - # 選擇工作平面 G 字串sg17 G17 #XY 平面代碼sg19 G19 #YZ 平面代碼sg18 G18 #XZ 平面代碼sgplane #Target string fstrsel sg17 plane sgplane# - #選擇 英制/米制 字串sg2
11、0 G20 #英制代碼sg21 G21 #米制代碼smetric #Target string fstrsel sg20 met_tool smetric# - #選擇參考點回歸字串sg28 G28 #第一參考點回歸sg30 G30 #第二參考點回歸sg28ref #Target string fstrsel sg28 mi3 sg28ref# - # 切削補償 G 字串選擇scc0 G40 #切削補償取消scc1 G41 #切削左補償scc2 G42 #切削右補償sccomp #Target for string fstrsel scc0 cc_pos sccomp# - # 鉆孔固定循環(huán)字
12、符串選擇sg81 G81 #鉆孔 - 無暫停sg81d G82 #鉆孔 - 有暫停sg83 G83 #啄式鉆孔 - 無暫停sg83d G83 #啄式鉆孔 - 有暫停sg73 G73 #斷屑 - 無暫停sg73d G73 #斷屑 - 有暫停sg84 G84 #攻螺紋 - 右手sg84d G74 #攻螺紋 - 左手sg85 G85 #鏜孔 #1 - 無暫停sg85d G89 #鏜孔 #1 - 有暫停sg86 G86 #鏜孔 #2 - 無暫停sg86d G86 #鏜孔 #2 - 有暫停sgm1 G76 #misc #1 - 無暫停sgm1d G76 #misc #1 - 有暫停sgm2 G81 #m
13、isc #2 - 無暫停sgm2d G82 #misc #2 - 有暫停sgdrill #Target for string fstrsel sg81 drlgsel sgdrill# - # 選擇增量或絕對 G字符串sg90 G90 #絕對代碼sg91 G91 #增量代碼sgabsinc #Target string fstrsel sg90 absinc sgabsinc# - #鉆孔固定循環(huán)參考高度sg98 G98 #Z軸回到起始高度sg99 G99 #Z軸回到參考高度sgdrlref #Target for string fstrsel sg98 drillref sgdrlref #
14、 Drill cycle G string select# -# Generate string for spindlesm04 M04 #主軸反轉(zhuǎn)sm05 M05 #主軸停止sm03 M03 #主軸正轉(zhuǎn)spindle #Target for string fstrsel sm04 spdir2 spindle# - # 冷卻 M 字符串選擇sm09 M09 #冷卻液 Offsm08 M08 #冷卻液 噴射sm08_1 M08 #冷卻液 噴霧sm08_2 M08 #Coolant Toolscoolant #Target for string fstrsel sm09 coolant scoo
15、lant# - # 定義齒輪選擇代碼flktbl 1 3 #Lookup table definition - table no. - no. entries 40 0 #底速齒輪檔41 400 #中速齒輪檔42 2250 #高速齒輪檔 # - # 刀具交換 / NC輸出變量格式# - fmt T 4 t #刀具號fmt T 4 first_tool #第一把使用的刀具fmt T 4 next_tool #下一把使用的刀具fmt D 4 tloffno #直徑偏移號fmt H 4 tlngno #長度偏移號fmt G 4 g_wcs #WCS G addressfmt P 4 p_wcs #W
16、CS P addressfmt S 4 speed #主軸轉(zhuǎn)速fmt M 4 gear #Gear range# - fmt N 4 n #序號fmt X 2 xabs #X 坐標輸出fmt Y 2 yabs #Y 坐標輸出fmt Z 2 zabs #Z 坐標輸出fmt X 3 xinc #X 坐標輸出fmt Y 3 yinc #Y 坐標輸出fmt Z 3 zinc #Z 坐標輸出fmt I 3 i #x 軸方向上的圓弧中心描述fmt J 3 j #y 軸方向上的圓弧中心描述fmt K 3 k #z 軸方向上的圓弧中心描述fmt R 2 arcrad #圓弧半徑fmt F 15 feed #進
17、給率fmt P 11 dwell #暫停fmt M 5 cantext #Canned text# - #Move comment (pound) to output colon with program numbersfmt O 7 progno #Program number#fmt ":" 7 progno #Program number# - fmt Q 2 peck1 #First peck increment (positive)fmt Q 2 shftdrl #Fine bore tool shiftfmt R 2 refht_a #Refer
18、ence heightfmt R 2 refht_i #Reference height# - fmt "TOOL:" 4 tnote # 注釋格式fmt " DIA. OFF:" 4 toffnote # 注釋格式fmt " LEN.:" 4 tlngnote # 注釋格式fmt " DIA.:" 1 tldia # 注釋格式 # - # Tool Comment / Manual Entry Section 刀具注釋/手工輸入局部# - ptool
19、comment #Comment for tooltnote = ttoffnote = tloffnotlngnote = tlngno"(", *tnote, *tldia, *sopnote, ")", epstrtool #Comment for toolif strtool <> sblank,strtool = ucase(strtool)*strtool, " " pcomment #Comment from manual entry (must
20、 call pcomment2 if booleans) pcomment2 pcomment2 #Comment from manual entryscomm = ucase (scomm)if gcode = 1007, "(", scomm, ")"else, "(", scomm, ")", e # - # 文件起始和刀具交換設(shè)置# - psof0 #Start of file for tool zeropsof psof #Start of
21、file for non-zero tool numbertoolchng = oneif ntools = one,#skip single tool outputs, stagetool must be onstagetool = m_one!next_tool"%", e*progno, e"(PROGRAM NAME - ", progname, ")", e"(DATE=Day-Month-Year - ", date, "
22、 TIME=Hr:Min - ", time, ")", eptoolcommentpbld, n, *sgcode, *sgplane, "G40", "G49", "G80", "G54", *sgabsinc, *smetric, e sav_absinc = absinc pcom_moveb absinc = zeropcan1, pbld, n, *sgcode, *sgabsinc,
23、pwcs, pfxout, pfyout, *zr,*speed, *spindle, pgear, strcantext, epe_inc_calcps_inc_calcabsinc = sav_absincpbld, n, sgabsinc, e pretract #刀具路徑末尾,換刀sav_absinc = absincabsinc = onesav_coolant = coolantcoolant = zero#cc_pos is reset in the toolchange herecc_pos = zerogcode = zeropbld, n, sccomp, *sm05, e
24、 absinc = sav_absinccoolant = sav_coolant peof0 #End of file for tool zeropeof peof #End of file for non-zero toolpretractcomment#Remove pound character to output first tool with staged tools # #if stagetool = one, pbld, n, *first_tool, en, "M30", e"%", e pwcs #G5
25、4+ coordinate setting at toolchange if workofs <> prv_workofs | (force_wcs & toolchng),if workofs < 6,g_wcs = workofs + 54*g_wcselse,p_wcs = workofs - five"G54.1", *p_wcs!workofs pgear #Find spindle gear from lookup tableif use_gear = one,gear = frange
26、(one, speed)*gear #換刀設(shè)置pspindle #主軸轉(zhuǎn)速計算 for RPMspeed = abs(ss)if maxss = zero | maxss > max_speed, maxss = max_speed if speed > max_speed, speed = maxssif speed < min_speed, speed = min_speedspdir2 = fsg3(spdir) pq #Setup post based on switch settingsif stagetool = one, bldnxtoo
27、l = oneif arctype = one | arctype = four,result = newfs(two, i)result = newfs(two, j)result = newfs(two, k)else,result = newfs(three, i)result = newfs(three, j)result = newfs(three, k) pheader #文件開始前調(diào)用if met_tool = one, #米制常量和變量調(diào)整ltol = ltol_mvtol = vtol_mmaxfeedpm = maxfeedpm_m ptoolend #刀具路徑末尾,讀取新
28、刀具資料之前!speed, !spdir2 ptlchg1002 #Call at actual toolchange, end last path here pspindleif gcode = 1000,#Null toolchangeelse,#Toolchange and Start of fileif gcode = 1002,#Actual toolchangepretractif stagetool = one, prv_next_tool = m_oneprv_xia = vequ(xh)prv_feed = c9k # -# Motion NC output 運動 NC 輸出
29、# -#絕對方式輸出的變量為 xabs, yabs, zabs.#增量方式輸出的變量為 xinc, yinc, zinc.# -prapidout #輸出直線運動的NC指令 - 快速pcan1, pbld, n, sgplane, sgcode, sgabsinc, pccdia,pxout, pyout, pzout, strcantext, scoolant, e plinout #輸出直線運動的NC指令 - 進給pcan1, pbld, n, sgplane, sgcode, sgabsinc, pccdia,pxout, pyout, pzout, feed, strcantext,
30、scoolant, e pcirout #輸出圓弧插補的NC指令if arcrad >= max_arc, result = mprint(saxiswarn) pcan1, pbld, n, sgplane, sgcode, sgabsinc, pccdia,pxout, pyout, pzout, parc, feed, strcantext, scoolant, e pcom_moveb #Common motion preparation routines, beforepxyzcoutps_inc_calc pncoutput #Movement outputpcom_
31、movebcommentpcanif gcode = zero, prapidoutif gcode = one, plinoutif gcode > one & gcode < four, pciroutpcom_movea pcom_movea #Common motion preparation routines, afterpcan2pe_inc_calc pdwl_spd #Call from NCI gcode 4pspindlecommentif prv_spdir2 <> spdir2, pbld, n,
32、*sm05, eif prv_speed <> speed | prv_spdir2 <> spdir2,pbld, n, *speed, *spindle, pgear, epcanif fmtrnd(dwell), pcan1, pbld, n, *sgcode, *dwell, strcantext, eelse, pcan1, pbld, n, strcantext, epcan2 prapid #輸出直線運動的NC指令 - 快速pncoutput pzrapid #輸出直線運動的NC指令 - 快速 Z onlypncoutput
33、 plin #輸出直線運動的NC指令 - 進給pncoutput pz #輸出直線運動的NC指令 - 進給 Z onlypncoutput pmx #輸出NCI向量的NC指令pncoutput pcir #輸出圓弧插補的NC指令 pncoutput # - # Motion output components 運動輸出組成# - pbld #Canned text - 單節(jié)刪除if bld, / pfbld #強制 - 單節(jié)刪除"/" pccdia #切削補償#Force Dxx#if prv_cc_pos <> cc_pos &
34、amp;amp; cc_pos, prv_tloffno = c9ksccompif cc_pos, tloffno pfxout #Force X axis outputif absinc = zero, *xabs, !xincelse, *xinc, !xabs pxout #X outputif absinc = zero, xabs, !xincelse, xinc, !xabs pfyout #Force Y axis outputif absinc = zero, *yabs, !yincelse, *yinc, !yabs pyout #Y outputif absinc =
35、zero, yabs, !yincelse, yinc, !yabs pfzout #Force Z axis outputif absinc = zero, *zabs, !zincelse, *zinc, !zabs pzout #Z outputif absinc = zero, zabs, !zincelse, zinc, !zabs parc #選擇圓弧輸出格式if arcoutput = zero,#圓弧輸出為 IJKi, j, kelse,#圓弧輸出為 Rif abs(sweep)<=180 | arcoutput=one, result = nwadrs(srad
36、, arcrad) else, result = nwadrs(srminus, arcrad)*arcrad # - # Drilling 鉆孔# - pdrlcommonb #Canned Drill Cycle common call, beforeif gcode = 81,result = newfs (two, zinc)if drillcyc = three, drlgsel = fsg1(-ss) + drillcyc * twoelse, drlgsel = fsg2(dwell) + drillcyc * twoif initht <> refh
37、t, drillref = zeroelse, drillref = oneprv_refht_a = c9kprv_refht_i = c9kz = depthprv_zia = inithtfeed = fr_posprv_dwell = zerodwellpcom_movebcommentpcan prdrlout #R drill positionrefht_a = refhtrefht_i = refht - inithtif absinc = zero, refht_a, !refht_ielse, refht_i, !refht_a pdrill #鉆孔固定循環(huán)pdrlcommo
38、nbpcan1, pbld, n, *sgdrlref, *sgdrill, pxout, pyout, pfzout, prdrlout, dwell, *feed, strcantext, epcom_movea ppeck #啄式鉆孔固定循環(huán)pdrlcommonbpcan1, pbld, n, *sgdrlref, *sgdrill, pxout, pyout, pfzout, prdrlout, *peck1, *feed, strcantext, epcom_movea pchpbrk #斷屑固定循環(huán)pdrlcommonbpcan1, pbld, n, *sgdrlref, *sgd
39、rill, pxout, pyout, pfzout, prdrlout, *peck1, *feed, strcantext, epcom_movea ptap #攻螺紋固定循環(huán)pdrlcommonbpcan1, pbld, n, *sgdrlref, *sgdrill, pxout, pyout, pfzout, prdrlout, *feed, strcantext, epcom_movea pbore1 #鏜孔固定循環(huán) #1pdrlcommonbpcan1, pbld, n, *sgdrlref, *sgdrill, pxout, pyout, pfzout, prdrlout, dw
40、ell, *feed, strcantext, epcom_movea pbore2 #鏜孔固定循環(huán) #2pdrlcommonbpcan1, pbld, n, *sgdrlref, *sgdrill, pxout, pyout, pfzout, prdrlout, *feed, strcantext, epcom_movea pmisc1 #Canned Misc #1 Cyclepdrlcommonbpcan1, pbld, n, *sgdrlref, *sgdrill, pxout, pyout, pfzout, prdrlout, shftdrl, dwell, *feed, strca
41、ntext, epcom_movea pmisc2 #Canned Misc #2 Cycle (User Option)pdrill pdrill_2 #Canned Drill Cycle, additional pointspdrlcommonbpcan1, pbld, n, pxout, pyout, pzout, prdrlout, dwell,feed, strcantext, epcom_movea ppeck_2 #Canned Peck Drill Cyclepdrill_2 pchpbrk_2 #Canned Chip Break Cyclepdrill_2 ptap_2
42、#Canned Tap Cyclepdrill_2 pbore1_2 #Canned Bore #1 Cyclepdrill_2 pbore2_2 #Canned Bore #2 Cyclepdrill_2 pmisc1_2 #Canned Misc #1 Cyclepdrill_2 pmisc2_2 #Canned Misc #2 Cyclepdrill_2 pdrlcst #自定義鉆孔循環(huán) 8 - 19 (user option)#Use this postblock to customize drilling cycles 8 - 19pdrlcommonb"CUSTO
43、MIZABLE DRILL CYCLE ", pfxout, pfyout, pfzout, epcom_movea pdrlcst_2 #自定義鉆孔循環(huán) 8 - 19, additional points (user option) #Use this postblock to customize drilling cycles 8 - 19pdrlcommonb"CUSTOMIZABLE DRILL CYCLE ", pfxout, pfyout, pfzout, epcom_movea pcanceldc #Cancel canned drill cycleresult = newfs (three, zinc)z =
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 三年級數(shù)學(xué)下冊教案-5.3 長方形的面積(2)-北師大版
- 五年級下冊數(shù)學(xué)教案-2.1 分數(shù)的意義 ︳西師大版
- 2025年合同占股模板
- 一年級下數(shù)學(xué)教案-綜合練習(xí)-北師大版
- 2025年河北省石家莊市單招職業(yè)傾向性測試題庫附答案
- 2024年浸酸劑項目資金籌措計劃書代可行性研究報告
- 2025年湖南省郴州市單招職業(yè)適應(yīng)性測試題庫審定版
- 2025年度心理咨詢師培訓(xùn)朋輩督導(dǎo)小組保密合作協(xié)議
- 2025年度家禽養(yǎng)殖與食品安全監(jiān)管合作協(xié)議
- 2025年度導(dǎo)演與票務(wù)銷售公司聘用合同
- 中小學(xué)教師教育法律法規(guī)培訓(xùn)PPT頁
- 醫(yī)療器械可用性工程文檔
- 非遺文化介紹推廣課件
- 統(tǒng)編教材四年級下冊語文第二單元教學(xué)解讀及建議1
- 火電機組整套啟動前安全技術(shù)交底卡
- 菲斯特轉(zhuǎn)子秤的
- 藥學(xué)專業(yè)教學(xué)資源庫建設(shè)申報書
- 解讀《泰州市市區(qū)城市排水管理辦法》
- 人教版五年級下冊口算題大全(全冊齊全)
- 林則徐課件完整版
- 旅行社運營實務(wù)電子課件 6.1 初涉旅行社管理
評論
0/150
提交評論