版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領
文檔簡介
1、MODULE MainModuleCONST robtargetpHome:=1525.42,272.18,1873.69,4.42963E-05,0.699969,-0.714173,-2.80277E-05,0,-1,-1,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONST robtargetpPrePickMould:=1653.99,272.19,1779.41,5.83312E-05,0.69997,-0.714172,-3.47922E-05,0,-1,-1,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONST
2、robtargetpPrePickClapboard:=2036.17,-741.24,1235.05,0.678651,0.73435 ,-0.0119011,0.00467586,-1,-2,2,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONST robtargetpPickMould:=1943.13,173.08,630.89,4.66987E-05,0.699977,-0.714166,-3.24109E-05,0,-1,-1,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONST robtargetpPickCla
3、pboard:=1943.19,173.08,620.72,1.61422E-05,0.699977,-0.714165,-7.62858E-06,0,-1,-1,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;robtargetCONSTpPrePlace:=785.90,-957.40,1722.38,0.00231652,0.0492402,-0.998779,-0.00310842,-1,-1,-1,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONST robtargetpPrePlace10:=-277.40,-1202.
4、57,1621.17,0.00183571,-0.0139794,-0.999895,-0.00341408,-2,-1,-2,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONST robtargetpPrePlace20:=-491.18,-1082.85,1505.90,0.000663644,0.69408,0.719887,0.00386364,-2,0,-1,0,9E+09,9E+09,9E+09,9E+09,9E+09 ,9E+09;CONST robtargetpPlaceMould:=-92.13,-2580.19,1171.45,0.0007
5、71646,0.713144,0 .701007,0.00383692,-2,0,-1,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONST robtargetpPlaceClapboard:=1585.08,1761.04,787.33,0.00645323,-0.00552996,-0.726358,-0.687263,0,1,-1,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONST robtargetpPrePlaceClapboard:=1017.30,955.85,1443.17,1.0621E-05,-0.008
6、49593,-0.999964,4.01139E-05,0,-1,0,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONST robtargetpPrePickClapboard10:=2257.17,-841.03,1579.56,0.667517,0.74457,-0.00360206,0.00487631,-1,-1,2,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONST robtargetpPrePickMould10:=530.24,-1703.27,1762.63,5.07659E-05,0.96161,0.274
7、421,2.37287E-05,-1,0,0,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONST num nOffs:=100;PERS num nCurOffs:=100;CONST num nLayer:=0;PERS num nCurLayer:=0;CONST num nThickness:=40;VAR bool bTimeOut:=FALSE;PERS bool bDryCycle:=FALSE;VAR intnum iDryCycle;VAR intnum iResDryCycle;VAR intnum iVacuum;PERS tooldat
8、atGripper:=TRUE,0,0,100,1,0,0,0,88.5,-3.7,-1.4,132.1,1,0,0,0,5.5,17.831,25.067;PROC main()rInitAll;WHILE TRUE DOIF siDryCycle=1 or nCurLayer1 then rPickClapboard;ELSErPickMould;ENDIFWaittime 0.2;ENDWHILEENDPROCPROC rPickMould()DIWait diMouldready,1,3,entrance Conveyer,ready forpick;DIWait diPlaceRea
9、dy,1,3,exit Conveyer,ready forremove;MoveJ pPrePickMould, v1500, z50, tGripper;IF BitCheck(nCurlayer,1) THENnCurOffs:=nOffs;ELSEnCurOffs:=-nOffs;ENDIFMoveLoffs(pPickMould,0,nCurOffs,100+nCurLayer*nThickness), v1000, z50,tGripper;MoveLoffs(pPickMould,0,nCurOffs,(nCurLayer-1)*nThickness), v200, fine,t
10、Gripper;GripClose;Decr nCurLayer;MoveLoffs(pPickMould,0,nCurOffs,100+nCurLayer*nThickness), v200, z50,tGripper;MoveJ pPrePickMould, v1000, z50, tGripper;DIWait diPlaceReady,1,3,exit Conveyer,ready forremove;MoveJ pPrePlace10, v1500, z10, tGripper;MoveL offs(pPlaceMould,0,0,100), v1500, z10, tGripper
11、;MoveL pPlaceMould, v200, fine, tGripper; GripOpen;MoveL offs(pPlaceMould,0,0,100), v200, z10, tGripper;MoveL pPrePlace10, v1500, z10, tGripper;MoveJ pPrePickMould, v1500, z10, tGripper;PulseDOPLength:=2, doMouldPlaceOK;ENDPROCPROC rPickClapboard()DIWait diMouldready,1,3,entrance Conveyer,ready forp
12、ick;MoveL offs(pPickClapboard,0,0,100), v1000, z50, tGripper;MoveL pPickClapboard, v200, fine, tGripper;GripClose;MoveL offs(pPickClapboard,0,0,100) ,v200, z50, tGripper;MoveL offs(pPickClapboard,0,0,500) ,v1000, z50, tGripper;MoveL pPrePlaceClapboard, v1000, z10, tGripper;DIWait diClapboardReady, 1
13、, 3, exit Conveyer, ready forremove;MoveL offs(pPlaceClapboard,-700,-200,250), v1000, z10,tGripper;MoveL offs(pPlaceClapboard,00,-10,100), v1000, z10,tGripper;MoveL pPlaceClapboard, v100, fine, tGripper;GripOpen;MoveL offs(pPlaceClapboard,0,-50,100), v1000, z10,tGripper;MoveL offs(pPlaceClapboard,-7
14、00,-200,250), v1000, z10,tGripper;MoveL pPrePlaceClapboard, v1000, z10, tGripper;PulseDOPLength:=1.0, doClapboardPickOK;MoveJ pHome, v1500, fine, tGripper;PulseDOPLength:=1.0, doUnStackOk;WaitTime 2;DIWait diMouldready,0,3,exit Conveyer,ready forremove;nCurLayer:=nLayer;ENDPROCPROC rInitAll()IF diVa
15、cuum1=0 THENWaitTime 1;ELSEErrWrite The Rob1 gripper error! ,The gripper is notopened!RL2:=Check the gripper signal postion .RL3:= open thegripper manually and take away the part from gripper.;Stop;Exit;ENDIF rMoveHome;nCurLayer:=nLayer;IDelete iVacuum;CONNECT iVacuum WITH tLostPart;ISignalDI diVacu
16、um1, 1, iVacuum;ISleep iVacuum;ENDPROCROC GripClose()SetDO doVacuum,1;SetDO doBlow,0;WaitUntil diVacuum1=1MaxTime:=10TimeFlag:=bTimeOut;IF bTimeOut THENErrWrite Rob Gripper Signal error ! ,Fatal error inGripperRL2:=Check the gripper signal postion .RL3:= change anew sensor .;Stop;ENDIFWaittime 0.5;I
17、Watch iVacuum;ENDPROCPROC GripOpen()ISleep iVacuum;SetDO doVacuum,0;PulseDO PLength:=2.0, doBlow;WaitUntil diVacuum1=0 MaxTime:=5TimeFlag:=bTimeOut;IF bTimeOut THENErrWrite Rob Gripper Signal error ! ,Fatal error inGripperRL2:=Check the gripper signal postion .RL3:= change anew sensor .;Stop;ENDIFWa
18、ittime 0.5;ENDPROCPROC rMoveHome()VAR string HomeOffset;CONST num MinX:=-500;CONST num MaxX:=500;CONST num MinY:=-500;CONST num MaxY:=500;CONST num MinZ:=500;CONST num MaxZ:=1200;VAR robtarget ActualPos;VelSet 100,500;AccSet 70, 70;IF bCurrentPos(pHome,tGripper,50)=TRUE THENMoveJ pHome,v500,fine,tGr
19、ipperWObj:=wobj0;ENDIFIF bCurrentPos(pPrePickMould,tGripper,50wobj:=Wobj0)=TRUE THENMoveJ pHome,v500,fine,tGripperWObj:=wobj0;ENDIFIFbCurrentPos(pPrePickClapboard,tGripper,100wobj:=Wobj0)= TRUETHENMoveJ pHome,v500,fine,tGripperWObj:=wobj0;ENDIFIF bCurrentPos(pPreplace,tGripper,100wobj:=Wobj0)= TRUET
20、HENMoveJ pHome,v500,fine,tGripperWObj:=wobj0;ENDIFIF bCurrentPos(pHome,tGripper,100)=FALSE THEN! If no known position is found, check if the robot is in aspecified! window and move him to the first position in the programActualPos:=CRobT(Tool:=tGripperWObj:=wobj0);IF ActualPos.trans.xMaxX ORActualPos.trans.yMaxY ORActualPos.trans.zMaxZ THENHomeOffset:=;IF ActualPos.trans.xMaxX THENHomeOffset:=HomeOffset+X :+NumToStr(MaxX-ActualPos.trans .x,0)+ ;ELSEHomeOffset:=HomeOffset+X : OK ;ENDIFIF ActualPos.trans.yMaxY THENHomeOffset:=HomeOffset+Y :+NumToStr(MaxY-Actua
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 九年級體育 韻律體操與舞蹈 任選教材教案3
- 安徽省滁州二中高中信息技術(shù)《3.1文本信息的加工與表達(2)》教案 新人教版必修
- 2024-2025學年七年級生物上冊 3.1.1 藻類、苔蘚、蕨類植物教案 (新版)新人教版
- 2024年學校前臺工作人員雇傭合同
- 2024年工程合作方共同承包協(xié)議
- 2024年企業(yè)采購戰(zhàn)略合作項目的價格談判合同
- 2024年城市軌道交通信號系統(tǒng)升級協(xié)議
- 2024年城市公共交通運營合同標的與服務區(qū)域
- 2024雙方關于共同研發(fā)新能源車輛充電設施合同
- 2024年定制毛坯商鋪租賃合同模板
- 天津市和平區(qū)2024-2025學年七年級上期中考試數(shù)學試題
- 乳腺結(jié)節(jié)課件
- 班前安全技術(shù)交底記錄表
- 2023年大學生《思想道德與法治》考試題庫附答案(712題)
- 國家開放大學《監(jiān)督學》形考任務1-4參考答案
- 2022年學校禁毒工作計劃
- GB-T-30512-2014-汽車禁用物質(zhì)要求
- 生物相容性試驗檢測報告
- 七年級上冊數(shù)學期中考試試題(含答案)
- 小學四年級上冊美術(shù)課件-第3課車-蘇少版(17張)ppt課件
- 紙品配送服務方案紙品采購項目方案
評論
0/150
提交評論