




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、-. z.Mastercam后處理文件及設(shè)定方法-1Mastercam后處理文件及設(shè)定方法Mastercam系統(tǒng)配置的是適應(yīng)單一類型控制系統(tǒng)的通用后置處理,該后置處理提供了一種功能數(shù)據(jù)庫模型,用戶根據(jù)數(shù)控機(jī)床和數(shù)控系統(tǒng)的具體情況,可以對其數(shù)據(jù)庫進(jìn)展修改和編譯,定制出適應(yīng)*一數(shù)控機(jī)床的專用后置處理程序。Mastercam系統(tǒng)后置處理文件的擴(kuò)展名為PST,稱為PST文件,它定義了切削加工參數(shù)、NC程序格式、輔助工藝指令,設(shè)置了接口功能參數(shù)等,其構(gòu)造由八個局部組成:1 注解程序每一列前有#符號表示該列為不影響程序執(zhí)行的文字注解。如:# mi2-Absolute, or Incremental pos
2、itioning0=absolute1=incremental表示mi2定義編程時數(shù)值給定方式,假設(shè)mi=0為絕對值編程,mi=1為增量值編程。在這一局部里,定義了數(shù)控系統(tǒng)編程的所有準(zhǔn)備功能G代碼格式和輔助功能M代碼格式。2 程序糾錯程序中可以插入文字提示來幫助糾錯,并顯示在屏幕上。如:# Error messages 錯誤信息psuberror # Arc output not allowedERROR-WRONG A*IS USED IN A*IS SUBSTITUTION, e如果展開圖形卷成旋轉(zhuǎn)軸時,軸替換出錯,則在程序中會出現(xiàn)上面引號中的錯誤提示。3 定義變量的數(shù)據(jù)類型、使用格式和常
3、量賦值如規(guī)定G代碼和M代碼是不帶小數(shù)點的兩位整數(shù),多軸加工中心的旋轉(zhuǎn)軸的地址代碼是A、B和C,圓弧長度允許誤差為0.002,系統(tǒng)允許誤差為0.00005,進(jìn)給速度最大值為10m/min等。4 定義問題可以根據(jù)機(jī)床加工需要,插入一個問題給后置處理程序執(zhí)行。如定義NC程序的目錄,定義啟動和退出后置處理程序時的C-Hook程序名。5 字符串列表字符串起始字母為s,可以依照數(shù)值選取字符串,字符串可以由兩個或更多的字符來組成。字符串sg17,表示指定*Y加工平面,NC程序中出現(xiàn)的是G17,scc1表示刀具半徑左補償,NC程序中出現(xiàn)的是G41,字符串scp代表刀具半徑補償建立或取消。6 自定義單節(jié)可以讓使
4、用者將一個或多個NC碼作有組織的排列。自定義單可以是公式、變量、特殊字符串等:pwcs # G54+ coordinate setting at toolchangeif mil 1, pwcs_g54表示用pwcs單節(jié)指代#G54+在換刀時坐標(biāo)設(shè)定值,mil定義為工件坐標(biāo)系G54G597 預(yù)先定義的單節(jié)使用者可按照數(shù)控程序規(guī)定的格式將一個或多個NC代碼作有組織的排列,編排成一條程序段。8 系統(tǒng)問答后置處理軟件提出了五組問題,供使用者答復(fù),可按照注解文字、賦值變量、字符串等內(nèi)容,根據(jù)使用的機(jī)床、數(shù)控系統(tǒng)進(jìn)展答復(fù)。設(shè)計后置處理文件,一般是按照NC程序的構(gòu)造模塊來進(jìn)展。根據(jù)NC程序的功能,后置處理
5、文件分成六個模塊如下:1 文件頭文件頭局部設(shè)定程序名稱和編號,此外,SINUMERIK 810D系統(tǒng)還必須指定NC程序存放路徑,并按照以下格式輸出:%_N_程序名及編號_路徑。NC程序可存放在主程序、子程序和工作程序目錄下,擴(kuò)展名分別為:MPF、SPF、WPD,一般放在工作程序目錄下。因此經(jīng)修改的Pst文件格式為:Pheader # Start of file %_N_, progname, _WPD 程序名、存放目錄2 程序起始在程序開場,要完成平安設(shè)定、刀具交換、工件坐標(biāo)系的設(shè)定、刀具長度補償、主軸轉(zhuǎn)速控制、冷卻液控制等,并可顯示編程者、編程日期、時間等注解。修改后的有刀具號Pst文件開頭
6、格式如下:# Start of file for non-zero tool number.pspindle 主軸轉(zhuǎn)速計算p_movbtl 移動設(shè)備ptoolment 刀具參數(shù)注解.pbld, n, *sgcode, *sgplane, G40, G80, *sgabsinc快進(jìn)、*Y加工平面、取消刀補、取消固定循環(huán)、絕對方式編程if mil =one, pg92_rtrnz, pg92_rtrn, pg92_g92 返回參考點.pbld, n, *sgcode, *sgabsinc, pwcs, pf*out, pfyout, pfcout, *speed, *spindle, pgear,
7、 pcan1快進(jìn)至*位置、坐標(biāo)系編置、主軸轉(zhuǎn)速等pbld, n, pfzout, *tlngno, scoolant, if stagetool=one, *ne*t_tool平安高度、刀長補償、開冷卻液p_movea 加工過程3 刀具交換刀具交換執(zhí)行前,須完成返回參考點、主軸停頓動作,然后換刀,接著完成刀具長度補償、平安設(shè)定、主軸轉(zhuǎn)速控制。Pst文件中用自定義單節(jié)ptlchg指代換刀過程,編輯修改后的程序如下:Ptlchg # Tool change.ptoolment 新刀參數(shù)注解ment 插入注解if stagetool two, pbld, n, *t, e 判斷、選刀n, M6 換刀
8、pinde* 輸出地址pbld, n, *sgcode, *sgabsinc, pwcs, pf*out, pfyout, pfcout, *speed, *spindle, pgear, pcan1快進(jìn)至*位置、坐標(biāo)系偏置、主軸轉(zhuǎn)速等pbld, n, pfzout, *tlngno, M7, if stagetool=one, *ne*t_tool(平安高度、刀長補償號、開冷卻液)p_movea 加工過程4 加工過程這一過程是快速移動、直線插補、圓弧插補、刀具半徑補償?shù)雀炯庸幼?。對于幾乎所有系統(tǒng),這些加工動作的程序指令根本一樣。只是注意SINUMERIK 810D系統(tǒng)的刀具長度補償值由字
9、母D后加兩位數(shù)字調(diào)用,不需要G43/G44指令;而半徑補償值則由G41/G42調(diào)用,不需要再接地址代碼。用G40取消刀具長度和刀具半徑補償。5 切削循環(huán)Mastercam軟件提供了6種內(nèi)定的孔加工固定循環(huán)方式:一般鉆削Drill/Cbore、深孔啄鉆Peck Drill、斷屑鉆Chip Break、右攻絲Tap、精鏜孔Bore#1、粗鏜孔Bore #2,通過雜項選項Misc #1/Misc #2可設(shè)定左攻絲、背鏜孔、盲孔鏜孔、盲孔鉸孔等循環(huán),并采用G73G89代碼來表示。如對于深孔鉆削固定循環(huán),Mastercam采用的格式為:G83 *_Y_Z_R_Q_F;而SINUMERIK 810D系統(tǒng)用
10、CYCLE83指代深孔鉆削循環(huán),其NC程序要求給出循環(huán)加工所有參數(shù),輸出格式為:CYCLE83RTP,RFP,SDIS,DP,DPR,F(xiàn)DEP,F(xiàn)DPR,DAM,DTB,DTS,F(xiàn)RF,VARI在pst文件中需按SINUMERIK 810D系統(tǒng)格式進(jìn)展定義、修改和編寫。6 程序結(jié)尾程序結(jié)尾一般情況下是取消刀補、關(guān)冷卻液、主軸停頓、執(zhí)行回參考點,程序停頓等動作。下面是修改后的pst程序結(jié)尾:Ptoolend_t #End of tool path, toolchange.pbld, n, scp, M5, *scoolant, e 取消刀補、主軸停頓、關(guān)冷卻液pbld, n, *sg74, Z1
11、=0. *1=0. Y1=0., e 返回參考點if mi2=one, pbld, n, *sg74, *1=0., Y1=0., protretinc, eelse, protretabs 程序完畢接下篇Mastercam后處理文件及設(shè)定方法-22010年03月09日 星期二 23:41例子中文說明:轉(zhuǎn)貼# POST 名稱 : wgkG54# 類型 : MILL# 機(jī)床名稱 : GENERIC FANUC# 控制器名稱 : GENERIC FANUC# 描述 : GENERIC FANUC 3 A*IS MILL POST# Associated Post : NONE# 車/銑復(fù)合 : N
12、O# 4-a*is/A*is subs. : NO# 五軸 : NO# 子程序支持 : NO# 自動換刀 : NO# 工作坐標(biāo)系 : G54# E*ecutable : MP 8.00# 這個POST支持FANUC控制器普通三軸銑床的的G 代碼輸出,# 不支持自動換刀,有最大圓弧報警# 它來源于MP-EZ.PST# 是針對Mastercam Mill V8的特征而設(shè)計的# -# 修改日志:# -# Programmers Note:# C 05/01/00 - Initial post setup, jce# 2002-10-11 - 去掉自動換刀,*# 2002-10-12 - 增加中文注釋
13、,*# 2002-10-21 - 增加最大圓弧警告,*# 2002-11-05 - 修改坐標(biāo)系為G54,*# -# 特征: # -# 以下 Misc.(雜項) 必須使用整數(shù):# mi2 - 絕對或增量坐標(biāo) at top level# 0 = 絕對# 1 = 增量# mi3 - 選擇G28或G30來執(zhí)行參考點回歸.# 0 = G28, 1 = G30# Canned te*t:# 在輪廓點里插入cante*t.以允許/制止 以下Mastercam里許可的功能,# Entering cante*t on a contour point from within Mastercam allows th
14、e# following functions to enable/disable.# Cante*t 值:# 1 = Stop = 輸出 M00 停頓碼# 2 = Ostop = 輸出 M01 選擇停頓碼# 3 = Bld on = 在 NC 單節(jié)翻開 單節(jié)刪除碼()# 4 = bLd off = 在 NC 單節(jié)關(guān)閉 單節(jié)刪除碼()# 鉆孔:# 在這個 POST 里支持所有的鉆孔方法.# 附加考前須知:# 1) G54 calls are generated where the work offset entry of 0 = G54,# 1 = G55, etc.# 2) 由NCI變量met
15、_tool決定是否使用米制# 3) 以增量方式從換刀起始位置計算運動量.# 起始位置通常定義為所有換刀時刀具所處的最后位置# Incremental mode calculates motion from home position at toolchanges.# The home position is used to define the last position of the tool# for all toolchanges.# 4) 變量 absinc 現(xiàn)已被預(yù)先定義, 設(shè)定 mi2 (雜項整數(shù))以定義# 絕對/增量程序輸出.# -# Debugging and Factory
16、Set Program Switches 調(diào)試和加工設(shè)置程序切換# -m_one : -1 #定義常數(shù)zero : 0 #定義常數(shù)one : 1 #定義常數(shù)two : 2 #定義常數(shù)three : 3 #定義常數(shù)four : 4 #定義常數(shù)five : 5 #定義常數(shù)c9k : 9999 #定義常數(shù)fastmode : 1 #Posting 速度最正確化bug1 : 2 #0=不顯示, 1=普通列表框, 2=編輯器bug2 : -30 #Append postline labels, non-zero is column positionbug3 : 0 #Append whatline no
17、. to each NC linebug4 : 1 #Append NCI line no. to each NC linewhatno : yes #不執(zhí)行 whatline branches(分枝 (leave as yes)get_1004 : 1 #Find gcode 1004 with getne*toprpd_typ_v7 : 0 #Use Version 7 style contour flags/processingstrtool_v7 : 2 #Use Version 7+ toolnametlchng_aft : 2 #Delay call to toolchange u
18、ntil move linecant_tlchng : 1 #無視 cante*t 入口 on move with tlchng_aftnewglobal : 1 #全局變量錯誤檢測getne*top : 0 #建立下一個變量表# -# 一般輸出設(shè)置# -sub_level : 1 #允許自動子程序支持breakarcs : no #在各象限分割圓弧arcoutput : 0 #0= IJK,1= R不帶符號,2= R (超過180度時帶負(fù)號arctype : 2 #圓弧中心 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc.arccheck : 1 #檢測小
19、圓弧,轉(zhuǎn)化為直線atol : .01 #arccheck=2時的角度公差ltol : .002 #arccheck=1時的長度公差vtol : .0001 #系統(tǒng)公差ma*feedpm : 500 #進(jìn)給速度極限 (英寸/分鐘)ltol_m : .05 #arccheck=1時的長度公差,米制vtol_m : .0025 #系統(tǒng)公差,米制ma*feedpm_m : 10000 #進(jìn)給速度極限 毫米/分鐘force_wcs : yes #每次換刀時強(qiáng)制輸出WCSspaces : 1 #各指令之間插入的空格數(shù)omitseq : no #省略序號seqma* : 9999 #最大序號stagetoo
20、l : 0 #0 = 無預(yù)先備刀, 1 = 預(yù)備刀具use_gear : 0 #輸出齒輪交換代碼,0=no,1=yesma*_speed : 6000 #最大主軸轉(zhuǎn)速min_speed : 1 #最小主軸轉(zhuǎn)速nobrk : no #Omit breakup of *, y & z rapid movesprogname : 1 #使用大寫字母表示程序名ma*_arc : 50000 #機(jī)床允許的最大圓弧半徑# -# 旋轉(zhuǎn)軸設(shè)定# -vmc : 1 # 0 = 臥式 , 1 = 立式# -# 允許鉆孔固定循環(huán)功能# -usecandrill : yes #使用普通鉆孔固定循環(huán)usecanpeck
21、 : yes #使用啄式鉆孔固定循環(huán)usecanchip : yes #使用斷屑鉆孔固定循環(huán)usecantap : yes #使用攻螺紋固定循環(huán) usecanbore1 : yes #使用鏜孔固定循環(huán)1usecanbore2 : yes #使用鏜孔固定循環(huán)2usecanmisc1 : yes #使用雜項固定循環(huán)1usecanmisc2 : yes #使用雜項固定循環(huán)2# -# 通用自定義變量初始化不能改變!# -*ia : 0 #Formated absolute value for * incremental calculationsyia : 0 #Formated absolute va
22、lue for Y incremental calculationszia : 0 #Formated absolute value for Z incremental calculationsbld : 0 #單節(jié)刪除激活result : 0 #Return value for functionssav_spc : 0 #Save spacessav_gcode : 0 #Gcode savedsav_absinc : 0 #Absolute/Incremental Saved Valuesav_coolant : 0 #Coolant savedtoolchng : 1 #On a too
23、lchange 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. : nodrlgcode : 0 #Save Gcode in drill sav_dgcode : 0 #Drill gcode saved# -# 格式列表 -
24、 n=nonmodal, l=leading, t=trailing, i=inc, d=delta# -#定義 英制/米制 坐標(biāo)格式列表fs2 1 0.7 0.6 #小數(shù), absolute, 7 place, default for initialize (fs2 2 0.4 l1.3 #小數(shù), absolute, 4/3 place (*,y,z)fs2 3 0.4 l1.3d #小數(shù), delta, 4/3 place (i,j,k)#mon format statementsfs2 4 1 0 1 0 #整數(shù), 無前綴fs2 5 2 0 2 0l #整數(shù), 強(qiáng)制兩位前綴fs2 6 3
25、 0 3 0l #整數(shù), 強(qiáng)制三位前綴fs2 7 4 0 4 0l #整數(shù), 強(qiáng)制四位前綴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, 5 placefs2 14 0.3 0.3d #小數(shù), delta, 3 placefs2 15 0.2 0.1 #小數(shù), absolute, 2/1 pl
26、acefs2 16 1 0 1 0n #整數(shù), 強(qiáng)制輸出# 輸出加工類型字符串定義# -# 字符串 - 字符串標(biāo)簽必須由 s 開頭,它們沒有預(yù)先指派# -#Select operation notesop00 NULL # String definitionsop01 CONTOUR # sop02 CONTOUR # sop03 DRILL CYCLE # sop04 OCKET. # sop05 RULED. # sop06 2D-SWEPT. # sop07 3D-SWEPT. # sop08 REVOLVED. # sop09 LOFT. # sop10 COONS. # sop11
27、TRIM . # sop12 FLOWLINE. # sop13 SURFACE_FINISH # sop14 SURFACE_ROUGH # sop15 OINT. # sop16 DRILL-5A*.sop17 CURVE-5A*.sop18 SWARF-5A*.sop19 flat MILLsop20 op20.sopnote # Target stringfstrsel sop00 opcode sopnote接上篇接下篇Mastercam后處理文件及設(shè)定方法-32010年03月09日 星期二 23:42# -# NC 輸出的字符串和字符串選擇定義# -#Address string
28、definitions 位址串定義strm Mstrn Nstro Ostrp srad Rsrminus R-sblank#Cante*t 字符串定義 (spaces must be padded here)sm00 M00sm01 M01strte*tnostrcante*t# -# 錯誤信息# -sa*iswarn WARNING-THE RAD OF ARC IS TOO LARGE# -# 一般的 G 和 M 代碼串選擇表 General G and M Code String select tables# -# 運動 G 代碼選擇sg00 G00 #快速定位sg01 G01 #直線
29、進(jìn)給sg02 G02 #圓弧插補 CWsg03 G03 #圓弧插補 CCWsg04 G04 #暫停sgcode #Target for stringfstrsel sg00 gcode sgcode # -# 選擇工作平面 G 字串sg17 G17 #*Y 平面代碼sg19 G19 #YZ 平面代碼sg18 G18 #*Z 平面代碼sgplane #Target stringfstrsel sg17 plane sgplane # -#選擇 英制/米制 字串sg20 G20 #英制代碼sg21 G21 #米制代碼smetric #Target string fstrsel sg20 met_t
30、ool smetric # -#選擇參考點回歸字串sg28 G28 #第一參考點回歸sg30 G30 #第二參考點回歸sg28ref #Target stringfstrsel sg28 mi3 sg28ref# -# 切削補償 G 字串選擇scc0 G40 #切削補償取消scc1 G41 #切削左補償scc2 G42 #切削右補償scp #Target for stringfstrsel scc0 cc_pos scp# -# 鉆孔固定循環(huán)字符串選擇sg81 G81 #鉆孔 - 無暫停sg81d G82 #鉆孔 - 有暫停sg83 G83 #啄式鉆孔 - 無暫停sg83d G83 #啄式鉆孔
31、 - 有暫停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 #misc #2 - 無暫停sgm2d G82 #misc #2 - 有暫停sgdrill #Target for string fstrsel sg81
32、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 # Drill cycle G string select# -# Generate string for spindlesm04 M04 #主軸反轉(zhuǎn)sm
33、05 M05 #主軸停頓 sm03 M03 #主軸正轉(zhuǎn)spindle #Target for stringfstrsel sm04 spdir2 spindle# -# 冷卻 M 字符串選擇sm09 M09 #冷卻液 Offsm08 M08 #冷卻液 噴射sm08_1 M08 #冷卻液 噴霧sm08_2 M08 #Coolant Toolscoolant #Target for stringfstrsel sm09 coolant scoolant # -# 定義齒輪選擇代碼flktbl 1 3 #Lookup table definition - table no. - no. entrie
34、s 40 0 #底速齒輪檔 41 400 #中速齒輪檔 42 2250 #高速齒輪檔# -# 刀具交換 / NC輸出變量格式# -fmt T 4 t #刀具號fmt T 4 first_tool #第一把使用的刀具fmt T 4 ne*t_tool #下一把使用的刀具fmt D 4 tloffno #直徑偏移號fmt H 4 tlngno #長度偏移號fmt G 4 g_wcs #WCS G addressfmt P 4 p_wcs #WCS P addressfmt S 4 speed #主軸轉(zhuǎn)速fmt M 4 gear #Gear range# -fmt N 4 n #序號fmt * 2
35、*abs #* 坐標(biāo)輸出fmt Y 2 yabs #Y 坐標(biāo)輸出fmt Z 2 zabs #Z 坐標(biāo)輸出fmt * 3 *inc #* 坐標(biāo)輸出fmt Y 3 yinc #Y 坐標(biāo)輸出fmt Z 3 zinc #Z 坐標(biāo)輸出fmt I 3 i #* 軸方向上的圓弧中心描述fmt J 3 j #y 軸方向上的圓弧中心描述fmt K 3 k #z 軸方向上的圓弧中心描述fmt R 2 arcrad #圓弧半徑fmt F 15 feed #進(jìn)給率fmt P 11 dwell #暫停fmt M 5 cante*t #Canned te*t# -#Move ment (pound) to output
36、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 #Reference heightfmt R 2 refht_i #Reference height# -fmt TOOL: 4 tnote # 注釋格式fmt DIA. OFF: 4 toffnote # 注釋格式fmt
37、 LEN.: 4 tlngnote # 注釋格式fmt DIA.: 1 tldia # 注釋格式# -# Tool ment / Manual Entry Section 刀具注釋/手工輸入局部# -ptoolment #ment for tool tnote = t toffnote = tloffno tlngnote = tlngno (, *tnote, *tldia, *sopnote, ), e pstrtool #ment for tool if strtool sblank, strtool = ucase(strtool) *strtool, pment #ment from
38、 manual entry (must call pment2 if booleans) pment2pment2 #ment from manual entry sm = ucase (sm) if gcode = 1007, (, sm, ) else, (, sm, ), e# -# 文件起始和刀具交換設(shè)置# -psof0 #Start of file for tool zero psofpsof #Start of file for non-zero tool number toolchng = one if ntools = one, #skip single tool output
39、s, stagetool must be on stagetool = m_one !ne*t_tool %, e *progno, e (PROGRAM NAME - , progname, ), e (DATE=Day-Month-Year - , date, TIME=Hr:Min - , time, ), e ptoolment pbld, n, *sgcode, *sgplane, G40, G49, G80, G54, *sgabsinc, *smetric, e sav_absinc = absinc p_moveb absinc = zero pcan1, pbld, n, *
40、sgcode, *sgabsinc, pwcs, pf*out, pfyout, *zr, *speed, *spindle, pgear, strcante*t, e pe_inc_calc ps_inc_calc absinc = sav_absinc pbld, n, sgabsinc, e pretract #刀具路徑末尾,換刀 sav_absinc = absinc absinc = one sav_coolant = coolant coolant = zero #cc_pos is reset in the toolchange here cc_pos = zero gcode
41、= zero pbld, n, scp, *sm05, e absinc = sav_absinc coolant = sav_coolant peof0 #End of file for tool zero peofpeof #End of file for non-zero tool pretract ment #Remove pound character to output first tool with staged tools# #if stagetool = one, pbld, n, *first_tool, e n, M30, e %, epwcs #G54+ coordin
42、ate setting at toolchange if workofs prv_workofs | (force_wcs & toolchng), if workofs ma*_speed, ma*ss = ma*_speed if speed ma*_speed, speed = ma*ss if speed = ma*_arc, result = mprint(sa*iswarn) pcan1, pbld, n, sgplane, sgcode, sgabsinc, pccdia, p*out, pyout, pzout, parc, feed, strcante*t, scoolant
43、, ep_moveb #mon motion preparation routines, before p*yzcout ps_inc_calc pncoutput #Movement output p_moveb ment pcan if gcode = zero, prapidout if gcode = one, plinout if gcode one & gcode four, pcirout p_movea p_movea #mon motion preparation routines, after pcan2 pe_inc_calcpdwl_spd #Call from NCI
44、 gcode 4 pspindle ment if prv_spdir2 spdir2, pbld, n, *sm05, e if prv_speed speed | prv_spdir2 spdir2, pbld, n, *speed, *spindle, pgear, e pcan if fmtrnd(dwell), pcan1, pbld, n, *sgcode, *dwell, strcante*t, e else, pcan1, pbld, n, strcante*t, e pcan2prapid #輸出直線運動的NC指令 - 快速 pncoutput pzrapid #輸出直線運動
45、的NC指令 - 快速 Z only pncoutput plin #輸出直線運動的NC指令 - 進(jìn)給 pncoutputpz #輸出直線運動的NC指令 - 進(jìn)給 Z only pncoutputpm* #輸出NCI向量的NC指令 pncoutput pcir #輸出圓弧插補的NC指令 pncoutput # -# Motion output ponents 運動輸出組成# -pbld #Canned te*t - 單節(jié)刪除 if bld, / pfbld #強(qiáng)制 - 單節(jié)刪除 / pccdia #切削補償 #Force D*# if prv_cc_pos cc_pos & cc_pos, pr
46、v_tloffno = c9k scp if cc_pos, tloffno pf*out #Force * a*is output if absinc = zero, *abs, !*inc else, *inc, !*abs p*out #* output if absinc = zero, *abs, !*inc else, *inc, !*abspfyout #Force Y a*is output if absinc = zero, *yabs, !yinc else, *yinc, !yabs pyout #Y output if absinc = zero, yabs, !yin
47、c else, yinc, !yabspfzout #Force Z a*is output if absinc = zero, *zabs, !zinc else, *zinc, !zabs pzout #Z output if absinc = zero, zabs, !zinc else, zinc, !zabsparc #選擇圓弧輸出格式 if arcoutput = zero, #圓弧輸出為 IJK i, j, k else, #圓弧輸出為 R if abs(sweep)=180 | arcoutput=one, result = nwadrs(srad, arcrad) else,
48、 result = nwadrs(srminus, arcrad) *arcrad # -# Drilling 鉆孔# -pdrlmonb #Canned Drill Cycle mon call, before if gcode = 81, result = newfs (two, zinc) if drillcyc = three, drlgsel = fsg1(-ss) + drillcyc * two else, drlgsel = fsg2(dwell) + drillcyc * two if initht refht, drillref = zero else, drillref
49、= one prv_refht_a = c9k prv_refht_i = c9k z = depth prv_zia = initht feed = fr_pos prv_dwell = zero dwell p_moveb ment pcanprdrlout #R drill position refht_a = refht refht_i = refht - initht if absinc = zero, refht_a, !refht_i else, refht_i, !refht_apdrill #鉆孔固定循環(huán) pdrlmonb pcan1, pbld, n, *sgdrlref,
50、 *sgdrill, p*out, pyout, pfzout, prdrlout, dwell, *feed, strcante*t, e p_moveappeck #啄式鉆孔固定循環(huán) pdrlmonb pcan1, pbld, n, *sgdrlref, *sgdrill, p*out, pyout, pfzout, prdrlout, *peck1, *feed, strcante*t, e p_moveapchpbrk #斷屑固定循環(huán) pdrlmonb pcan1, pbld, n, *sgdrlref, *sgdrill, p*out, pyout, pfzout, prdrlout
51、, *peck1, *feed, strcante*t, e p_moveaptap #攻螺紋固定循環(huán) pdrlmonb pcan1, pbld, n, *sgdrlref, *sgdrill, p*out, pyout, pfzout, prdrlout, *feed, strcante*t, e p_moveapbore1 #鏜孔固定循環(huán) #1 pdrlmonb pcan1, pbld, n, *sgdrlref, *sgdrill, p*out, pyout, pfzout, prdrlout, dwell, *feed, strcante*t, e p_moveapbore2 #鏜孔固
52、定循環(huán) #2 pdrlmonb pcan1, pbld, n, *sgdrlref, *sgdrill, p*out, pyout, pfzout, prdrlout, *feed, strcante*t, e p_moveapmisc1 #Canned Misc #1 Cycle pdrlmonb pcan1, pbld, n, *sgdrlref, *sgdrill, p*out, pyout, pfzout, prdrlout, shftdrl, dwell, *feed, strcante*t, e p_moveapmisc2 #Canned Misc #2 Cycle (User O
53、ption) pdrillpdrill_2 #Canned Drill Cycle, additional points pdrlmonb pcan1, pbld, n, p*out, pyout, pzout, prdrlout, dwell, feed, strcante*t, e p_moveappeck_2 #Canned Peck Drill Cycle pdrill_2pchpbrk_2 #Canned Chip Break Cycle pdrill_2ptap_2 #Canned Tap Cycle pdrill_2pbore1_2 #Canned Bore #1 Cycle p
54、drill_2 pbore2_2 #Canned Bore #2 Cycle pdrill_2pmisc1_2 #Canned Misc #1 Cycle pdrill_2pmisc2_2 #Canned Misc #2 Cycle pdrill_2pdrlcst #自定義鉆孔循環(huán) 8 - 19 (user option) #Use this postblock to customize drilling cycles 8 - 19 pdrlmonb CUSTOMIZABLE DRILL CYCLE , pf*out, pfyout, pfzout, e p_moveapdrlcst_2 #自
55、定義鉆孔循環(huán) 8 - 19, additional points (user option) #Use this postblock to customize drilling cycles 8 - 19 pdrlmonb CUSTOMIZABLE DRILL CYCLE , pf*out, pfyout, pfzout, e p_moveapcanceldc #Cancel canned drill cycle result = newfs (three, zinc) z = initht prv_zia = initht p*yzcout !zabs, !zinc prv_gcode =
56、zero pbld, n, G80, e# -# Canned Te*t# -pcan #Canned te*t - before output call strcante*t = sblank if cant_no zero, if cant_pos1 = zero, pcant_1 if cant_pos2 = zero, pcant_2 if cant_pos3 = zero, pcant_3 if cant_pos4 = zero, pcant_4 if cant_pos5 = zero, pcant_5 if cant_pos6 = zero, pcant_6 if cant_pos
57、7 = zero, pcant_7 if cant_pos8 = zero, pcant_8 if cant_pos9 = zero, pcant_9 if cant_pos10 = zero, pcant_10 pbld, n, strcante*t, e strcante*t = sblank pcan1 #Canned te*t - with move strcante*t = sblank if cant_no zero, if cant_pos1 = one, pcant_1 if cant_pos2 = one, pcant_2 if cant_pos3 = one, pcant_
58、3 if cant_pos4 = one, pcant_4 if cant_pos5 = one, pcant_5 if cant_pos6 = one, pcant_6 if cant_pos7 = one, pcant_7 if cant_pos8 = one, pcant_8 if cant_pos9 = one, pcant_9 if cant_pos10 = one, pcant_10 if cstop, strcante*t = strcante*t + sm00 if cgstop, strcante*t = strcante*t + sm01 #Output of strcan
59、te*t occurs at the end of the output linepcan2 #Canned te*t - after output call strcante*t = sblank if cant_no zero, if cant_pos1 = two, pcant_1 if cant_pos2 = two, pcant_2 if cant_pos3 = two, pcant_3 if cant_pos4 = two, pcant_4 if cant_pos5 = two, pcant_5 if cant_pos6 = two, pcant_6 if cant_pos7 =
60、two, pcant_7 if cant_pos8 = two, pcant_8 if cant_pos9 = two, pcant_9 if cant_pos10 = two, pcant_10 pbld, n, strcante*t, e strcante*t = sblank pcant_1 #Canned te*t - output call cante*t = cant_val1 pcant_outpcant_2 #Canned te*t - output call cante*t = cant_val2 pcant_outpcant_3 #Canned te*t - output
溫馨提示
- 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)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025企業(yè)與個人間的借款合同范本
- 管培生培訓(xùn)匯報總結(jié)
- 2025年北海貨運考試題目
- 北京理工大學(xué)2024本招生計劃表
- 2025年興安道路運輸貨運從業(yè)資格證模擬考試題庫
- 2025年蘇州貨運從業(yè)資格證考試題及答案
- 外傷性食管穿孔的健康宣教
- 病區(qū)護(hù)理質(zhì)量管理展示
- 小兒皰疹性角膜結(jié)膜炎的健康宣教
- 髂靜脈壓迫綜合征的健康宣教
- 【初中歷史】遼宋夏金元時期經(jīng)濟(jì)的繁榮 課件 2024-2025學(xué)年統(tǒng)編版七年級歷史下冊
- 2025-2030中國橄欖球行業(yè)市場全景調(diào)研及投資價值評估咨詢報告
- 砌體結(jié)構(gòu)檢測試題及答案
- DB32T 5061.1-2025 中小學(xué)生健康管理技術(shù)規(guī)范 第1部分:心理健康
- 2025年寧波職業(yè)技術(shù)學(xué)院單招職業(yè)傾向性測試題庫審定版
- 2025年洛陽科技職業(yè)學(xué)院單招職業(yè)技能測試題庫及答案(考點梳理)
- 二零二五年度商業(yè)地產(chǎn)租賃合同模板:詳細(xì)條款與風(fēng)險防范指南3篇
- 《伯努利方程》課件
- 2025年浙江廣播電視集團(tuán)招聘筆試參考題庫含答案解析
- 初中生心理健康教育講座課件
- 品管圈PDCA案例-提高成人術(shù)后疼痛評估與護(hù)理規(guī)范率醫(yī)院品質(zhì)管理成果匯報
評論
0/150
提交評論