cnc自動尋邊分中@ 我工作心得的部落格 - 隨意窩

文章推薦指數: 80 %
投票人數:10人

利用巨集指令及合適的尋邊器,實現CNC自動尋邊分中的功能。

% O154 #140=54 (設定變數#140為欲輸入的工件座標) ... M98P301 (呼叫副程式O301). M30 (程式結速). 我工作心得的部落格這裡記錄了我工作的點點滴滴!資料僅供參考,沒有經驗的人不要輕易嘗試。

有任何問題請發e-mail:[email protected]日誌相簿影音好友名片 200910081458cnc自動尋邊分中?CNC相關資料 利用巨集指令及合適的尋邊器,實現CNC自動尋邊分中的功能。

  % O154 #140=54                       (設定變數#140為欲輸入的工件座標) #101=#5221                 (設定變數#101=工件座標X值=輸入的工件X方向長度) #102=#5222                 (設定變數#102=工件座標Y值=輸入的工件Y方向長度) M98P301                     (呼叫副程式O301) M30                             (程式結速) %     O155 #140=55 #101=#5241 #102=#5242 M98P301 M30 %     O156 #140=56 #101=#5261 #102=#5262 M98P301 M30 %     O157 #140=57 #101=#5281 #102=#5282 M98P301 M30 %     O158 #140=58 #101=#5301 #102=#5302 M98P301 M30 %     O159 #140=59 #101=#5321 #102=#5322 M98P301 M30 %     O0301()                                (程式O301) IF[#101LT0.]GOTO99                     (假設#101小於0,則跳到N99)IF[#102LT0.]GOTO99                     (假設#102小於0,則跳到N99)#111=#101+20.                          (設定變數#111=工件X長度加20mm)#112=#102+20.                          (設定變數#112=工件Y長度加20mm)#109=#5023                             (變數#109=#5023機械座標Z值)#9=100.                                (設定F值變數為100)N1                                     (-Y第一點程序)#126=#5022                             (變數#126=#5022機械座標Y值)G91G31Y10.F[5*#9]                      (增量值跳越G31指令Y值為15.,F值為500)G04P300                                (暫停0.3秒)#127=#5062                             (變數#127=#50262跳躍座標Y值)IF[ABS[#127-#126]GE10.]GOTO99          (假設絕對值#127-#126誤差大於等於10.則跳到N99單節)G04P300                                (暫停0.3秒)G91G01Y-2.F[#9]                        (增量座標-Y2mm方向移動)G91G31Y2.2F[#9/4]                      (增量值跳越G31指令第二次接觸工件)G04P300                                (暫停0.3秒)#121=#5062                             (變數#121=#5062跳躍座標Y值)G91G01Y-1.F[#9]                        (增量座標-Y1mm方向移動)G91G31Y1.2F[#9/4]                      (增量值跳越G31指令第三次接觸工件)G04P300                                (暫停0.3秒)#122=#5062                             (變數#122=#5062跳躍座標Y值)IF[ABS[#121-#122]GE0.03]GOTO99         (假設絕對值#121-#122誤差大於0.03則跳到N99單節)G91G01Y-1.F[#9]                        (增量值-Y1mm,F100)G91G01Z50.F[30*#9]                     (增量值移動+Z50mm,F3000)#126=#5022                             (變數#126=#5022機械座標Y值)G91G31Y#112F[10*#9]                    (絕對值移動+Y#112,F1000)#127=#5062                             (變數#127=#5062跳躍座標Y值)IF[ABS[#127-#126]LT#112]GOTO99         (假設絕對值#127-#126誤差小於#112則跳到N99單節)N2                                     (Y第二點程序)G91G31Z-45.F[5*#9]                     (增量值跳越Z-45mm,F500)G31Z-5.F[#9]                           (增量值跳越Z-5mm,F100)G04P300                                (暫停0.3秒)#103=#5063                             (變數#103=#5063跳躍座標Z值)#114=#109-#103                         (變數#114=#109-#103)IF[ABS[#114]GT0.]GOTO99                (假設絕對值#114不等於0,則跳到N99單節)#126=#5022                             (變數#126=#5022機械座標Y值)G91G31Y-20.F[5*#9]                     (增量值跳越G31指令Y值為-30.,F值為500)G04P300                                (暫停0.3秒)#127=#5062                             (變數#127=#5062跳躍座標Y值)IF[ABS[#127-#126]GE20.]GOTO99          (假設絕對值#127-#126誤差大等於30則跳到N99單節)G04P300                                (暫停0.3秒)G91G01Y2.F[#9]                         (增量座標Y2mm方向移動)G91G31Y-2.2F[#9/4]                     (增量值跳越G31指令第二次接觸工件)G04P300                                (暫停0.3秒)#123=#5062                             (變數#123=#5062跳躍座標Y值)G91G01Y1.F[#9]                         (增量座標Y1mm方向移動)G91G31Y-1.2F[#9/4]                     (增量值跳越G31指令第三次接觸工件)G04P300                                (暫停0.3秒)#124=#5062                             (變數#122=#5062跳躍座標Y值)IF[ABS[#124-#123]GE0.03]GOTO99         (假設絕對值#121-#122誤差大於0.03則跳到N99單節)G91G01Y1.F[#9]                         (增量值Y1mm,F100)G91G01Z50.F[30*#9]                     (增量值移動+Z50mm,F3000)#125=[#124+#122]/2                     (求出工件座標Y值#125)#129=[ABS[#124-#122]/2]+1              (求出工件座標Y值與目前座標Y的差)G91G01Y-#129F[30*#9]                   (增量方式位移到工件座標Y0.)N3#130=[#101/2]+20.                      (變數#130=[#100/2]+20)#136=#5021                             (變數#136=#5021機械座標X值)G91G31X-#130F[10*#9]                    (增量值跳越G31指令X值為-#130,F值為1000)G04P300                                (暫停0.3秒)#137=#5061                             (變數#137=#5061跳躍座標X值)IF[ABS[#137-#136]LT#130]GOTO99         (假設絕對值#137-#136誤差小等於#130則跳到N99單節)G91G31Z-45.F[5*#9]                     (增量值跳越Z-45mm,F500)G31Z-5.F[#9]                           (增量值跳越Z-5mm,F100)G04P300                                (暫停0.3秒)#103=#5063                             (變數#103=#5063跳躍座標Z值)#114=#109-#103                         (變數#114=#109-#103)IF[ABS[#114]GT0.]GOTO99                (假設絕對值#114不等於0,則跳到N99單節)#136=#5021                             (變數#136=#5021機械座標X值)G91G31X30.F[5*#9]                      (增量值跳越G31指令X值為30.,F值為500)G04P300                                (暫停0.3秒)#137=#5061                             (變數#137=#5061跳躍座標X值)IF[ABS[#137-#136]GE30.]GOTO99          (假設絕對值#137-#136誤差大於等於30.則跳到N99單節)G04P300                                (暫停0.3秒)G91G01X-2.F[#9]                        (增量座標-X2mm方向移動)G91G31X2.2F[#9/4]                      (增量值跳越G31指令第二次接觸工件)G04P300                                (暫停0.3秒)#131=#5061                             (變數#131=#5061跳躍座標X值)G91G01X-1.F[#9]                        (增量座標-X1mm方向移動)G91G31X1.2F[#9/4]                      (增量值跳越G31指令第三次接觸工件)G04P300                                (暫停0.3秒)#132=#5061                             (變數#132=#5061跳躍座標X值)IF[ABS[#131-#132]GE0.03]GOTO99         (假設絕對值#131-#132誤差大於等於0.03則跳到N99單節)G91G01X-1.F[#9]                        (增量值-X1mm,F100)G91G01Z50.F[30*#9]                     (增量值移動+Z50mm,F3000)#136=#5021                             (變數#136=#5021機械座標X值)G91G31X[#111]F[10*#9]                  (絕對值移動+Y#112,F1000)#137=#5061                             (變數#137=#5061跳躍座標X值)IF[ABS[#137-#136]LT#111]GOTO99         (假設絕對值#137-#136誤差大於#111則跳到N99單節)N4G91G31Z-45.F[5*#9]                     (增量值跳越Z-45mm,F500)G31Z-5.F[#9]                           (增量值跳越Z-5mm,F100)G04P300                                (暫停0.3秒)#103=#5063                             (變數#103=#5063跳躍座標Z值)#114=#109-#103                         (變數#114=#109-#103)IF[ABS[#114]GT0.]GOTO99                (假設絕對值#114不等於0,則跳到N99單節)#136=#5021                             (變數#136=#5021機械座標X值)G91G31X-20.F[5*#9]                     (增量值跳越G31指令X值為-30.,F值為500)?G04P300                                (暫停0.3秒)#137=#5061                             (變數#137=#5061跳躍座標Y值)IF[ABS[#137-#136]GE20.]GOTO99          (假設絕對值#137-#136誤差大等於30則跳到N99單節)G04P300                                (暫停0.3秒)N4                                     (X第二點程序)G91G01X2.F[#9]                         (增量座標X2mm方向移動)G91G31X-2.2F[#9/4]                     (增量值跳越G31指令第二次接觸工件)G04P300                                (暫停0.3秒)#133=#5061                             (變數#133=#50261跳躍座標X值)G91G01X1.F[#9]                         (增量座標X1mm方向移動)G91G31X-1.2F[#9/4]                     (增量值跳越G31指令第三次接觸工件)G04P300                                (暫停0.3秒)#134=#5061                             (變數#134=#5061跳躍座標Y值)IF[ABS[#134-#133]GE0.03]GOTO99         (假設絕對值#134-#133誤差大於0.03則跳到N99單節)G91G01X1.F[#9]                         (增量值X1mm,F100)G91G01Z50.F[30*#9]                     (增量值移動+Z50mm,F3000)#135=[#134+#132]/2                     (求出工件座標X值#135)IF[#140EQ54]THEN#5221=#135             (設定G54工件座標X值)IF[#140EQ55]THEN#5241=#135             (設定G55工件座標X值)IF[#140EQ56]THEN#5261=#135             (設定G56工件座標X值)IF[#140EQ57]THEN#5281=#135             (設定G57工件座標X值)IF[#140EQ58]THEN#5301=#135             (設定G58工件座標X值)IF[#140EQ59]THEN#5321=#135             (設定G59工件座標X值)IF[#140EQ54]THEN#5222=#125             (設定G54工件座標Y值)IF[#140EQ55]THEN#5242=#125             (設定G55工件座標Y值)IF[#140EQ56]THEN#5262=#125             (設定G56工件座標Y值)IF[#140EQ57]THEN#5282=#125             (設定G57工件座標Y值)IF[#140EQ58]THEN#5302=#125             (設定G58工件座標Y值)IF[#140EQ59]THEN#5322=#125             (設定G59工件座標Y值)G01G90G#140X0.Y0.F[30*#9]M99                                    (副程式結束)N99#3000=70(CALL#PROGRAMMER#TEL#530)      (錯誤訊號報警)M02%ping52020/Xuite日誌/回應(0)/引用(0)沒有上一則|日誌首頁|沒有下一則回應 加我為好友日誌相簿影音 我的相簿 ping52020's新文章三次元量測儀RENISHAWTP20測頭拆解保養維修過程樹脂砂(塑膠砂)在噴砂機上的應用KG316S-II電子定時說明書時器時控開關更換砲塔銑床上的無段變速旋鈕(熊貓旋鈕,微調器)不懂PLC程式語言(階梯圖)也可以設計修改機器動作指針式HR-150A型洛氏硬度計操作步驟指針式HRC洛式硬度機操作步驟三豐Mitutoyoks光學尺控制器操作說明五音管西敏鐘聲340-020機械鐘發條鐘機芯拆解組裝過程更換Charmilles放電機的板式熱交換器過程三貴放電機ICF記憶卡複製備份方法 全部展開|全部收合 ping52020's新回應沒有新回應! 關鍵字



請為這篇文章評分?