ABB机器人码跺程序_ABB机器人码垛程序文件.doc

MODULE MainModule

PROC Main()

TPErase;

TPReadNum nCount1, "Qing Shu Ru Yi Ma Bao Shu!" ;

TPReadNum nJob, "Qing Shu Ru Mo Shi:50KG:=1,25KG:=2!";

InitAll;

WHILE TRUE DO

ReadType;

clock2re;

PickIF;

clock2re;

PlaceOF;

ENDWHILE

ENDPROC

PROC clock2re()

!tempint:=movstat;

IF DI10_1Product0K = 0 or DI10_2TuoPanOK = 0 Then

IF tempint<0.25 then

ClkStart CLK2;

ELSE

ClkStop CLK2;

ENDIF

Else

ClkStop CLK2;

EndIF

Endproc

PROC InitAll()

MoveHome;

Reset DO10_1JiaZhua;

Reset DO10_2YaBan;

Reset DO10_3ZhuaOK;

Reset DO10_4MaDuoOK;

Waittime 0.5;

bPickPart:=FALSE;

ClkReset CLK1;

ClkStart CLK1;

ClkReset CLK2;

MoveL Offs(pPick,0,0,400), vFast, z10, tGripper\WObj:=wobj0;

ENDPROC

PROC PickIF()

IF bPickPart = FALSE AND nJob <> 0 AND DI10_1Product0K = 1 THEN

!CalculatePick;

MoveJ Offs(pPick,0,0,400), vFast, z200, tGripper\WObj:=wobj0;

!MoveLDO Offs(pPick,0,0,100), vFast, z20, tool0\WObj:=wobj0, DO10_1JiaZhua, 1;

MoveL pPick, vFast, fine, tGripper\WObj:=wobj0;

Close1;

GripLoad LoadFull;

Accset 50,50;

HandshakeIF;

bPickPart:=TRUE;

ConfL\Off;

MoveJ pAfterPick, vFast, z60, tGripper\WObj:=wobj0;

ENDIF

ENDPROC

PROC PlaceOF()

IF DI10_2TuoPanOK = 1 AND bPickPart = TRUE THEN

CalculatePlace;

ConfL\Off;

!MoveL Offs(pOver,0,0,nOffsZ2), vFast, z200, tGripper;

IF bTag=true then

Accset 70, 70;

MoveJ pAbovePlace, vFast, z10, tGripper\WObj:=wobj0;

else

Accset 90, 90;

MoveJ pAbovePlace, vFast, z10, tGripper\WObj:=wobj0;

Endif

Accset 100,100;

! place first box

ConfL\Off;

!MoveL Offs(pPlace1,nOffsX1,nOffsY1,nOffsZ1),vTurn,z10,tGripper\WObj:=wobj0;

MoveL pPlace1, vMiddle, fine, tGripper\WObj:=wobj0;

Open1;

ConfL\Off;

MoveL Offs(pPlace1,0,0,nOffsZ1),vMiddle,z5,tGripper\WObj:=wobj0;

GripLoad LoadEmpty;

Accset 100,100;

bPickPart:=FALSE;

Incr nCount1;

HandshakeOF;

MoveJ pAbovePick, vFast, z200, tGripper\WObj:=wobj0;

MoveL Offs(pPick,0,0,400), vFast, z10, tGripper\WObj:=wobj0;

!MoveJ pHome, vFast, z200, tGripper;

ENDIF

ENDPROC

PROC HandshakeIF()

IF nJob=1 THEN

!Set DO10_3ZhuaOK;

ENDIF

IF nJob=2 THE

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值