2023年ABB机器人码垛程序_第1页
2023年ABB机器人码垛程序_第2页
2023年ABB机器人码垛程序_第3页
2023年ABB机器人码垛程序_第4页
2023年ABB机器人码垛程序_第5页
已阅读5页,还剩34页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

MODULEMainModule

PROCMain()

TPErase;

TPReadNumnCountl,"QingShuRuYiMaBaoShu!n;

TPReadNumnJob,"QingShuRuMoShi:50KG:=1,25KG:=2!n;

InitAll;

WHILETRUEDO

ReadType;

clock2re;

PicklF;

clock2re;

PlaceOF;

ENDWHILE

ENDPROC

PROCclock2re()

!tempint:=movstat;

IFDI10_lProduct0K=0orDI10_2TuoPanOK=0Then

IFtempint<0.25then

ClkStartCLK2;

ELSE

ClkStopCLK2;

ENDIF

Else

ClkStopCLK2;

EndlF

Endproc

PROCInitAll()

MoveHome;

ResetDO10_lJiaZhua;

ResetDO10_2YaBan;

ResetDO10_3ZhuaOK;

ResetDO10_4MaDuoOK;

Waittime0.5;

bPickPart:=FALSE;

ClkResetCLK1;

ClkStartCLK1;

ClkResetCLK2;

MoveLOffs(pPick,0,0,400),vFastzzl0ztGripper\WObj:=wobj0;

ENDPROC

PROCPickIFO

IFbPickPartFALSEANDnJob<>0ANDDI10_lProduct0K=1

THEN

!CalculatePick;

MoveJOffs(pPick,0,0,400),vFast,z200,

tGripper\WObj:=wobj0;

IMoveLDOOffs(pPick,0,0,100),vFast,z20,toolO\WObj:=wobj0z

DO10_lJiaZhua,1;

MoveLpPick,vFast,fine,tGripper\WObj:=wobj0;

Closel;

GripLoadLoadFull;

Accset50,50;

Handshake工F;

bPickPart:=TRUE;

ConfL\Off;

MoveJpAfterPick,vFastfz60,tGripper\WObj:=wobj0;

END工F

ENDPROC

PROCPlaceOF()

IFDI10_2TuoPanOK=1ANDbPickPart=TRUETHEN

CalculatePlace;

ConfL\Off;

!MoveLOffs(pOver,0r0,nOffsZ2),vFast,z200,tGripper;

IFbTag=truethen

Accset70,70;

MoveJpAbovePlace,vFastrzl0z

tGripper\WObj:=wobj0;

else

Accset90,90;

MoveJpAbovePlace,vFast,zlO,

tGripper\WObj:=wobj0;

Endif

Accset100,100;

!placefirstbox

ConfL\Off;

!MoveL

Offs(pPlacel,nOffsXl,nOffsYlznOffsZl),vTurn,zlO,tGripper\WObj:=wobj0;

MoveLpPlacel,vMiddle,fine,tGripper\WObj:=wobj0;

Openl;

ConfL\Off;

MoveL

Offs(pPlacelz0,0,nOffsZl),vMiddle,z5ztGripper\WObj:=wobj0;

GripLoadLoadEmpty;

Accset100z100;

bPickPart:=FALSE;

IncrnCountl;

HandshakeOF;

MoveJpAbovePick,vFastfz200,tGripper\WObj:=wobj0;

MoveLOffs(pPick,0z0,400)zvFast,zlO,tGripper\WObj:=wobj0;

!MoveJpHome,vFastzz200,tGripper;

END工F

ENDPROC

PROCHandshakelFO

IFnJob=lTHEN

!SetDO10_3ZhuaOK;

END工F

IFnJob=2THEN

!SetDO10_3ZhuaOK;

END工F

ENDPROC

PROCHandshakeOFO

IF(nCountl=40andnJob=1)or(nCountl=80andnJob=2)THEN

SetDO10_4MaDuoOK;

WaitDIDI10_2TuoPanOKz0;

SetDOXSDelay:=0.5,DO10_4MaDuoOK,0;

nCountl:=0;

ClkStopCLK1;

ClkStopCLK2;

TPErase;

nCycleCount:=ClkRead(CLK1);

Waitingtime:=ClkRead(CLK2);

TPWrite"Cycletime:n\Num:=nCycleCount;

TPWrite"WaitingtimeinthisCycle:H\Num:=Waitingtime;

ClkResetCLK2;

ClkResetCLK1;

ClkStartCLK1;

END工F

ENDPROC

PROCMoveHome()

TempPl:=CRobT(\Tool:=tool0\WObj:=wobj0);

TempPl.trans.z:=500;MoveJTempPl,vlOOOzz20,

tGripper;

MoveJpHome,vl000zz20,tGripper;

ENDPROC

PROCReadType()

IFnPriority=1ANDDI10_lProduct0K=1THEN

!nJob:=1;

!IncrnPriority;

ELSEIFnPriority=2ANDDI10_lProduct0K=1THEN

!nJob:=2;

!IncrnPriority;

ELSE

!nJob:=0;

!IncrnPriority;

!IFnPriority>2nPriority:=1;

END工F

ENDPROC

PROCOpenl()

ResetDO10_2YaBan;

Waittime0.0;

ResetDO10_lJiaZhua;

waittime0.1;

!WaittimenTimeGripper;

ENDPROC

PROCClosel()

SetDO10_lJiaZhua;

Waittime0.0;

WaitDIDI10_4ZhualEndz1;

SetDO10_2YaBan;

Waittime0.0;

!WaittimenTimeGripper;

WaitDIDI10_4ZhualEndz1;

IWaitDIDI10_6Zhua2End,1;

ENDPROC

PROCCalculatePick()

IFnJob=1THEN

pPick:=pPickl;

ELSEIFnJob=2THEN

pPick:=pPickl;

ENDIF

!pAbovePick:=pPick;

!pAfterPick:=pPick;

!Pattern80;

!pAbovePick.trans.z:=pAfterPick.trans.z;

!pAbovePick.trans.y:=pAfterPick.trans.y-500;

!pAfterPick.trans.y:=pAfterPick.trans.y-500;

ENDPROC

PROCCalculatePlace()

IFnJob=1THEN

nBagL:=nBag50L;

nBagW:=nBag50W;

nBagH:=nBag50H;

Pattern80;

ELSEIFnJob=2THEN

nBagL:=nBag25L;

nBagW:=nBag25W;

nBagH:=nBag25H;

PatternlOO;

ENDIF

!pAbovePlace:=pPlacel;

pAfterPlace:=pAbovePlace;

ENDPROC

PROCPattern80()

bTag:=FALSE;

TESTnCountl+1

CASE1:

pPlacel:=pBasel80;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=500;

nOffsZ2:=-500;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

bTag:=True;

CASE2:

pPlacel:=pBase0;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=-500;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

CASE3:

pPlacel:=pBase90;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y+25;

pPlacel.trans.z:=pPlacel.trans.z;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=-500;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

CASE4:

pPlacel:=pBase90;

pPlacel.trans.x:=pPlacel.trans.x+2*nBagW;

pPlacel.trans.y:=pPlacel.trans.y+25;

pPlacel.trans.z:=pPlacel.trans.z;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=-500;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

CASE5:

pPlacel:=pBase90;

pPlacel.trans.x:=pPlacel.trans.x+nBagW;

pPlacel.trans.y:=pPlacel.trans.y+25;

pPlacel.trans.z:=pPlacel.trans.z+20;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=-500;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

!Layer2

CASE6:

pPlacel:=pBasel80;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y+nBagL-5;

pPlacel.trans.z:=pPlacel.trans.z+nBagH;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=-500;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

CASE7:

pPlacel:=pBase0;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y+nBagL-5;

pPlacel.trans.z:=pPlacel.trans.z+nBagH;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=-500;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

CASE8:

pPlacel:=pBase270;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=-500;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

CASE9:

pPlacel:=pBase270;

pPlacel.trans.x:=pPlacel.trans.x+2*nBagW-25;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=-500;

nLevel:=2;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

CASE10:

pPlacel:=pBase270;

pPlacel.trans.x:=pPlacel.trans.x+nBagW;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=-500;

nLevel:=2;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

!Layer3

CASE11:

pPlacel:=pBasel80;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z+2*nBagH;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=-500;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

bTag:=True;

CASE12:

pPlacel:=pBaseO;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z+2*nBagH;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=-500;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

CASE13:

pPlacel:=pBase90;

pPlacel.trans•x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y+25;

pPlacel.trans.z:=pPlacel.trans.z+2*nBagH;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=-500;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

CASE14:

pPlacel:=pBase90;

pPlacel.trans.x:=pPlacel.trans.x+2*nBagW;

pPlacel.trans.y:=pPlacel.trans.y+25;

pPlacel.trans.z:=pPlacel.trans.z+2*nBagH;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=-500;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

CASE15:

pPlacel:=pBase90;

pPlacel.trans.x:=pPlacel.trans.x+nBagW;

pPlacel.trans.y:=pPlacel.trans.y+25;

pPlacel.trans.z:=pPlacel.trans.z+2*nBagH;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=-500;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

!Iayer4

CASE16:

pPlacel:=pBasel80;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y+nBagL-5;

pPlacel.trans.z:=pPlacel.trans.z+3*nBagH+80;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=-300;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

CASE17:

pPlacel:=pBase0;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y+nBagL-5;

pPlacel.trans.z:=pPlacel.trans.z+3*nBagH;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=-300;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

CASE18:

pPlacel:=pBase270;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z+2*nBagH;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=-300;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

CASE19:

pPlacel:=pBase270;

pPlacel.trans.x:=pPlacel.trans.x+2*nBagW-25;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z+2*nBagH;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=-300;

nLevel:=2;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

CASE20:

pPlacel:=pBase270;

pPlacel.trans•x:=pPlacel.trans.x+nBagW;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z+2*nBagH;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=-300;

nLevel:=2;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+400;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+400;

!Iayer5

CASE21:

pPlacel:=pBasel80;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z+4*nBagH;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=-300;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+500;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+500;

bTag:=True;

CASE22:

pPlacel:=pBaseO;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z+4*nBagH;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=-300;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+500;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+500;

CASE23:

pPlacel:=pBase90;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y+25;

pPlacel.trans.z:=pPlacel.trans.z+4*nBagH;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=-300;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+500;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+500;

CASE24:

pPlacel:=pBase90;

pPlacel.trans.x:=pPlacel.trans.x+2*nBagW;

pPlacel.trans.y:=pPlacel.trans.y+25;

pPlacel.trans.z:=pPlacel.trans.z+4*nBagH;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=-300;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+500;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+500;

CASE25:

pPlacel:=pBase90;

pPlacel.trans.x:=pPlacel.trans.x+nBagW;

pPlacel.trans.y:=pPlacel.trans.y+25;

pPlacel.trans.z:=pPlacel.trans.z+4*nBagH;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=-300;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+500;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+500;

!layer6

CASE26:

pPlacel:=pBasel80;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y+nBagL-5;

pPlacel.trans.z:=pPlacel.trans.z+5*nBagH-50;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=-100;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+450+nBagH;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+450+nBagH;

CASE27:

pPlacel:=pBase0;

pPlacel.trans•x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y+nBagL-5;

pPlacel.trans.z:=pPlacel.trans.z+5*nBagH-50;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=-100;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+500+nBagH;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+500+nBagH;

CASE28:

pPlacel:=pBase270;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z+4*nBagH-45;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=-100;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+500+nBagH;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+450+nBagH;

CASE29:

pPlacel:=pBase270;

pPlacel.trans.x:=pPlacel.trans.x+2*nBagW-25;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z+4*nBagH-45;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=-100;

nLevel:=2;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+500+nBagH;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+500+nBagH;

CASE30:

pPlacel:=pBase270;

pPlacel.trans.x:=pPlacel.trans.x+nBagW;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel•trans.z:=pPlacel.trans.z+4*nBagH-45;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=-100;

nLevel:=2;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+500+nBagH;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+500+nBagH;

!layer?

CASE31:

pPlacel:=pBasel80;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z+6*nBagH;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=-100;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+450+2*nBagH;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+450+2*nBagH;

bTag:=True;

CASE32:

pPlacel:=pBaseO;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z+6*nBagH-40;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=-100;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+450+2*nBagH;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+450+2*nBagH;

CASE33:

pPlacel:=pBase90;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y+25;

pPlacel.trans.z:=pPlacel.trans.z+6*nBagH-40;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=-100;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+450+2*nBagH;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+450+2*nBagH;

CASE34:

pPlacel:=pBase90;

pPlacel.trans.x:=pPlacel.trans.x+2*nBagW;

pPlacel.trans.y:=pPlacel.trans.y+25;

pPlacel.trans.z:=pPlacel.trans.z+6*nBagH-40;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=-100;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+450+2*nBagH;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+450+2*nBagH;

CASE35:

pPlacel:=pBase90;

pPlacel.trans.x:=pPlacel.trans.x+nBagW;

pPlacel.trans.y:=pPlacel.trans.y+25;

pPlacel.trans.z:=pPlacel.trans.z+6*nBagH-40;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=-100;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+450+2*nBagH;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+450+2*nBagH;

!Iayer8

CASE36:

pPlacel:=pBasel80;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y+nBagL-5;

pPlacel.trans.z:=pPlacel.trans.z+7*nBagH-40;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=100;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+450+3*nBagH;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+450+3*nBagH;

CASE37:

pPlacel:=pBase0;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y+nBagL-5;

pPlacel.trans.z:=pPlacel.trans.z+7*nBagH-60;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=100;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+450+3*nBagH;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+450+3*nBagH;

CASE38:

pPlacel:=pBase270;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z+6*nBagH-60;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=100;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+450+3*nBagH;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+450+3*nBagH;

CASE39:

pPlacel:=pBase270;

pPlacel.trans.x:=pPlacel.trans.x+2*nBagW-30;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z+6*nBagH-60;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*l.2;

nOffsZ2:=100;

nLevel:=2;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+450+3*nBagH;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+450+3*nBagH;

CASE40:

pPlacel:=pBase270;

pPlacel.trans.x:=pPlacel.trans.x+nBagW;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z+6*nBagH-60;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=nBagH*1.2;

nOffsZ2:=100;

nLevel:=2;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+450+3*nBagH;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+450+3*nBagH;

DEFAULT:

ErrWrite"WrongboxCount...n,HSingleboxmustbethe

lastoneofaPallet";

Stop;

EXIT;

ENDTEST

ENDPROC

PROCPatternlOO()

bTag:=FALSE;

TESTnCountl+1

CASE1:

pPlacel:=p25Base270;

pPlacel.trans.x:=pPlacel.trans.x;

pPlacel.trans.y:=pPlacel.trans.y;

pPlacel.trans.z:=pPlacel.trans.z;

nOffsXl:=0;

nOffsYl:=0;

nOffsZl:=600;

nOffsZ2:=-500;

nLevel:=1;

bTwice:=FALSE;

pAfterPick.trans.z:=pPick.trans.z+500;

pAbovePlace:=pPlacel;

pAbovePlace.trans.z:=pPick.trans.z+700;

bTag:=True;

CASE2:

pPlacel:=p25BaseO;

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论