资源描述:
《机器人码垛调试程序.doc》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、PROCmain()Label1:Inital;WHILETRUEDOPick;Pallet;IFpndi13_diection_selet=1THENPallet;ELSEPallet_vert;ENDIFIFnCount=TotalityTHENMoveLpHome,v800,fine,tool0;PulseDOPLength:=1,pndo10_palletOK_part;IFpndi12_palletOK_all=1THENPulseDOPLength:=1,pndo11_palletOK_all
2、;Stop;ENDIFGOTOLabel1;ENDIFENDWHILEENDPROCPROCInital()MoveJpHome,v600,fine,tool0;Totality:=n_Totality;Row:=n_Row;Height:=1;Y:=1;H1:=1;H2:=1;nCount:=0;PulseDOPLength:=0.5,do00_tuici;Resetdo00_tuici;Resetdo01_shangci;Resetpndo09_pick_ok;Resetpndo10_palletOK_
3、part;Resetpndo11_palletOK_all;ENDPROCPROCPallet()MoveLpPlace_safe10,v600,z100,tool0;MoveJpPlace_safe30,v600,z100,tool0;pPlace:=pPlace_base;IFHeightMOD2=1THENpPlace:=Offs(pPlace,X_offser,Y_offser-(Y-1)*61,Z_offser+(H1-1)*28);ELSEpPlace:=Offs(pPlace,X_offser,
4、Y_offser+15-(Y-1)*61,Z_offser+(H2-1)*26);ENDIFMoveLOffs(pPlace,0,0,50),v300,fine,tool0WObj:=wobj_place;MoveLpPlace,v20,fine,tool0WObj:=wobj_place;PulseDOPLength:=1,do00_tuici;WaitTime1;WaitDIdi01_tuici_OK,1;MoveLOffs(pPlace,0,0,300),v300,z30,tool0WObj:=
5、wobj_place;MoveLpPlace_safe30,v600,z50,tool0;IncrnCount;IFY=RowTHENY:=0;IncrHeight;IFHeightMOD2=1THENIncrH1;ELSEIncrH2;ENDIFENDIFIncrY;ENDPROCPROCPallet_vert()MoveLpPlace_safe100,v600,z100,tool0;MoveJpPlace_safe110,v600,z100,tool0;MoveJpPlace_base2,v50,fine
6、,tool0WObj:=wobj_place;pPlace:=place_base2;IFHeightMOD2=1THENpPlace:=Offs(pPlace,X_offser,Y_offser-(Y-1)*61,Z_offser+(H1-1)*28);ELSEpPlace:=Offs(pPlace,X_offser,Y_offser+15-(Y-1)*61,Z_offser+(H2-1)*26);ENDIFMoveLOffs(pPlace,0,0,50),v300,fine,tool0WObj:=wo
7、bj_place;MoveLpPlace,v20,fine,tool0WObj:=wobj_place;PulseDOPLength:=1,do00_tuici;WaitTime1;WaitDIdi01_tuici_OK,1;MoveLOffs(pPlace,0,0,300),v300,z30,tool0WObj:=wobj_place;MoveLpPlace_safe30,v600,z50,tool0;IncrnCount;IFY=RowTHENY:=0;IncrHeight;IFHeightMOD2
8、=1THENIncrH1;ELSEIncrH2;ENDIFENDIFIncrY;ENDPROCPROCPick()MoveJp10,v600,fine,tool0;WaitDIpndi09_can_pick,1;MoveLpPick_base,v20,fine,tool0WObj:=wobj0;pPick:=pPick_base;pPick:=Offs(pPick,0,-L_offser/2,0)