机器人码垛调试程序

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

PROCmain()Label1:Inital;WHILETRUEDOPick;Pallet;IFpndi13_diection_selet=1THENPallet;ELSEPallet_vert;ENDIFIFnCount=TotalityTHENMoveLpHome,v800,fine,tool0;PulseDO\PLength:=1,pndo10_palletOK_part;IFpndi12_palletOK_all=1THENPulseDO\PLength:=1,pndo11_palletOK_all;Stop;ENDIFGOTOLabel1;ENDIFENDWHILEENDPROCPROCInital()MoveJpHome,v600,fine,tool0;Totality:=n_Totality;Row:=n_Row;Height:=1;Y:=1;H1:=1;H2:=1;nCount:=0;PulseDO\PLength:=0.5,do00_tuici;Resetdo00_tuici;Resetdo01_shangci;Resetpndo09_pick_ok;Resetpndo10_palletOK_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,Y_offser+15-(Y-1)*61,Z_offser+(H2-1)*26);ENDIFMoveLOffs(pPlace,0,0,50),v300,fine,tool0\WObj:=wobj_place;MoveLpPlace,v20,fine,tool0\WObj:=wobj_place;PulseDO\PLength:=1,do00_tuici;WaitTime1;WaitDIdi01_tuici_OK,1;MoveLOffs(pPlace,0,0,300),v300,z30,tool0\WObj:=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,tool0\WObj:=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,tool0\WObj:=wobj_place;MoveLpPlace,v20,fine,tool0\WObj:=wobj_place;PulseDO\PLength:=1,do00_tuici;WaitTime1;WaitDIdi01_tuici_OK,1;MoveLOffs(pPlace,0,0,300),v300,z30,tool0\WObj:=wobj_place;MoveLpPlace_safe30,v600,z50,tool0;IncrnCount;IFY=RowTHENY:=0;IncrHeight;IFHeightMOD2=1THENIncrH1;ELSEIncrH2;ENDIFENDIFIncrY;ENDPROCPROCPick()MoveJp10,v600,fine,tool0;WaitDIpndi09_can_pick,1;MoveLpPick_base,v20,fine,tool0\WObj:=wobj0;pPick:=pPick_base;pPick:=Offs(pPick,0,-L_offser/2,0);MoveLOffs(pPick,0,0,70),v200,fine,tool0\WObj:=wobj0;IFHeightMOD2=1THENMoveLpPick,v20,fine,tool0\WObj:=wobj0;ELSEMoveLOffs(pPick,0,0,15),v20,fine,tool0\WObj:=wobj0;ENDIFPulseDO\PLength:=1,do01_shangci;WaitDIdi02_shangci_OK,1;MoveLOffs(pPick,0,0,100),v150,z50,tool0\WObj:=wobj0;MoveLOffs(pPick,0,0,400),v400,z50,tool0\WObj:=wobj0;PulseDO\PLength:=1,pndo09_pick_ok;ENDPROCPROCwobj_place0()MoveLp_x1,v20,fine,tool0;MoveLp_x2,v20,fine,tool0;MoveLp_y,v20,fine,tool0;ENDPROCPROCset_home()WZSphDef\Inside,shape1,home_C1,100;WZDOSet\Temp,home_wz\Before,shape1,pndo07_home,1;ENDPROCPROCppp()IDeleteintno1;CONNECTintno1WITHkkk;ISignalDI\Single,di01_tuici_OK,1,intno1;IWatchintno1;MoveLp30,v100,fine,tool0;MoveLp40,v20,fine,tool0;ENDPROCTRAPkkkStopMove;WaitTime3;!WaitDIdi01_tuici_OK,0;StartMove;MoveJp50,v100,fine,tool0;IDeleteintno1;ENDTRAPENDMODULE

1 / 4
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功