abb机器人码垛编程详解_ABB机器人码垛程序

ABB

机器人码垛程序

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;

本文链接:https://my.lmcjl.com/post/14505.html

展开阅读全文

4 评论

留下您的评论.