资源描述:
《RobotStudio码垛工作站程序.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、MODULEMainMoudlePERStooldatatGripper:=[TRUE,[[0,0,160],[1,0,0,0]],[1,[1,0,1],[1,0,0,0],0,0,0]];PERSrobtargetpHome:=[[1518.35057503,0,877.822906024],[0,0,1,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];PERSrobtargetpPick:=[[1518.360445356,-11.456071507,523.88812517
2、5],[0,0.000000009,1,0],[-1,0,-1,0],[9E9,9E9,9E9,9E9,9E9,9E9]];PERSrobtargetpPlaceBase:=[[-285.531972806,1859.243453208,99.429150272],[0,0.000000358,1,0],[1,0,1,0],[9E9,9E9,9E9,9E9,9E9,9E9]];PERSrobtargetpPlace:=[[314.468,1259.24,349.429],[0,3.58E-07,1,0],[1,
3、0,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];PERSrobtargetpActualPos:=[[1505,0,877.823],[1.81232E-06,0,-1,0],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];PERSboolbPalletFull:=TRUE;PERSnumnCount:=1;PROCMain()rInitAll;WHILETRUEDOIFbPalletFull=FALSETHENrPi
4、ck;rPlace;ELSEWaitTime0.3;ENDIFENDWHILEENDPROCPROCrInitAll()pActualPos:=CRobT(tool:=tGripper);pActualPos.trans.z:=pHome.trans.z;MoveLpActualPos,v500,fine,tGripperWObj:=wobj0;MoveJpHome,v500,fine,tGripperWObj:=wobj0;bPalletFull:=FALSE;nCount:=1;ResetdoGrip
5、per;ENDPROCPROCrPick()MoveJOffs(pPick,0,0,300),v2000,z50,tGripperWObj:=wobj0;WaitDIdiBoxInPos,1;MoveLpPick,v500,fine,tGripperWObj:=wobj0;SetdoGripper;WaitDIdiVacuumOK,1;MoveLOffs(pPick,0,0,300),v500,z50,tGripperWObj:=wobj0;ENDPROCPROCrPlace()rPosition;Mov
6、eJOffs(pPlace,0,0,300),v2000,z50,tGripperWObj:=wobj0;MoveLpPlace,v500,fine,tGripperWObj:=wobj0;ResetdoGripper;WaitDIdiVacuumOK,0;MoveLOffs(pPlace,0,0,300),v500,z50,tGripperWObj:=wobj0;rPlaceRD;ENDPROCPROCrPlaceRD()IncrnCount;IFnCount>=11THENnCount:=1;bPal
7、letFull:=TRUE;MoveJpHome,v1000,fine,tGripperWObj:=wobj0;ENDIFENDPROCPROCrPosition()TESTnCountCASE1:pPlace:=RelTool(pPlaceBase,0,0,0Rz:=0);CASE2:pPlace:=RelTool(pPlaceBase,-600,0,0Rz:=0);CASE3:pPlace:=RelTool(pPlaceBase,100,-500,0Rz:=90);CASE4:pPlace:=Rel
8、Tool(pPlaceBase,-300,-500,0Rz:=90);CASE5:pPlace:=RelTool(pPlaceBase,-700,-500,0Rz:=90);CASE6:pPlace:=RelTool(pPlaceBase,100,-100,-250Rz:=90);CASE7:pPlace:=RelTool(pPlaceBase,-300,-100,-250Rz