ABB机器人做单个或双传送链的教程和实例程序

 

ABB工业机器人官方认证课程3-RobotStudio虚拟仿真基础

https://ke.qq.com/course/218912?_bid=167&_wv=1

说起来真是惭愧,我们老师的课程,上课什么都没教,直接丢给我们这个连接,大作业是两条传送链仿真。

这里我将会告诉大家这个视频的使用方法,并且会将视频中的文件,放在文章的末尾。

算了,还是在开头吧,这样比较开心,我觉得真正需要的人会继续看的,微笑。

两条传送链实例:

链接:https://pan.baidu.com/s/1rwCZx-X5mefW8llUrhgNlw 
提取码:zxl9 
复制这段内容后打开百度网盘手机App,操作更方便哦

抱走资源记得给我评论哦~

下面是做完的总体效果图,机器人将会拾取两条传送链上的工件并码垛。图与例子不同,未完待续,我会回来修改的。

ABB机器人做单个或双传送链的教程和实例程序_第1张图片

MODULE

!模块

MainModule

!主模块

    TASK PERS tooldata tool:=[TRUE,[[99.70, 170.37 ,1216.55],[1,0,0,0]],[1,[0,1,1],[1,0,0,0],0,0,0]];

!工具数据是可变量,true表示是否安装在机器人上,下面三个参数表示xyz的方向,在后面的数据表示位置,质量,重心负载等等

    PERS loaddata LoadEmpty:=[0.01,[0,0,1],[1,0,0,0],0,0,0];

负载数据

    PERS loaddata LoadFull:=[40,[0,0,50],[1,0,0,0],0,0,0];

    PERS robtarget pPick1:=[[733.54,336.34,-302.61],[1.77512E-06,-7.45058E-09,-1,3.53584E-07],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

机器人第一个拾取点的位置,须使用线性移动将机器人移动到想要的位置,然后选择示教器定点

    PERS robtarget pPlace:=[[248.31,-641.89,-734.02],[3.03194E-07,5.96046E-08,-1,-1.78442E06],[-1,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

    CONST robtarget pBase1_0:=[[38.31,-641.89,-824.02],[3.03194E-07,5.96046E-08,-1,-1.78442E-06],[-1,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

    PERS robtarget pBase1_90:=[[38.31,-641.89,-824.02],[3.03194E-07,5.96046E-08,-1,-1.78442E-06],[-1,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

    PERS speeddata MinSpeed:=[1000,3000,5000,1000];

    PERS speeddata MidSpeed:=[2500,500,5000,1000];

    PERS speeddata MaxSpeed:=[5000,5000,5000,1000];

PERS bool bPalletFull1:=FALSE;

PERS num nCount1:=6;

CONST robtarget phome:=[[738.42,340.74,-142.25],[1.77372E-06,8.41591E-18,-1,3.60555E-07],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

    PERS robtarget pPick2:=[[758.60,993.00,-302.61],[1.30672E-06,2.63893E-18,-1,1.25242E-06],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

 

 

!主程序

PROC Main()

rInitAll;

Set doStartCNV ;

Set doStartCNV2 ;

WHILE TRUE DO

IF diboxinpox=1 AND bPalletFull1=FALSE THEN

rPick1;

rPlace1;

rPick2;

rPlace1;

ENDIF

WaitTime 0.1;

ENDWHILE

ENDPROC

!初始化程序

PROC rInitAll()

Reset doStartCNV ;

Reset doStartCNV2 ;

MoveJ pHome,MaxSpeed,fine,tool;

bPalletFull1:=FALSE;

nCount1:=1;

ENDPROC

!拾取位置1:将机器人移动到拾取位置的上方

 

PROC rPick1()

MoveJ Offs(pPick1,0,0,50),MaxSpeed,z50,tool;

MoveL pPick1,MaxSpeed,fine,tool;

Set doGrip;

WaitTime 0.3;

GripLoad LoadFull;

MoveL Offs(pPick1,0,0,50),MinSpeed,z50,tool;

ENDPROC

!拾取位置2:将机器人移动到拾取位置的上方

PROC rPick2()

MoveJ Offs(pPick2,0,0,50),MaxSpeed,z50,tool;

MoveL pPick2,MaxSpeed,fine,tool;

Set doGrip;

WaitTime 0.3;

GripLoad LoadFull;

MoveL Offs(pPick2,0,0,50),MinSpeed,z50,tool;

ENDPROC

 

 

!放置函数

PROC rPlace1()

rPosition1;

MoveJ Offs(pPlace,0,0,50),MaxSpeed,z50,tool\WObj:=wobj0;

MoveL pPlace,MaxSpeed,fine,tool\WObj:=wobj0;

Reset doGrip;

WaitTime 0.3;

GripLoad LoadEmpty;

MoveL Offs(pPlace,0,0,50),MidSpeed,z50,tool\WObj:=wobj0;

MoveJ Offs(pPick1,0,0,50),MaxSpeed,z50,tool\WObj:=wobj0;

nCount1:=nCount1+1;

IF nCount1>15 THEN

bPalletFull1:=TRUE;

ENDIF

ENDPROC

 

 

!放置的位置,根据基准放置点的偏移量,进行放置

PROC rPosition1()

TEST nCount1

CASE 1:

pPlace:=Offs(pBase1_0,0,0,0);

CASE 2:

pPlace:=Offs(pBase1_0,200+10,0,0);

CASE 3:

pPlace:=Offs(pBase1_0,400+10,0,0);

CASE 4:

pPlace:=Offs(pBase1_0,0,0,90);

CASE 5:

pPlace:=Offs(pBase1_0,200+10,0,90);

CASE 6:

pPlace:=Offs(pBase1_0,400+10,0,90);

CASE 7:

pPlace:=Offs(pBase1_0,0,0,170);

CASE 8:

pPlace:=Offs(pBase1_0,200+10,0,170);

CASE 9:

pPlace:=Offs(pBase1_0,400+10,0,170);

CASE 10:

pPlace:=Offs(pBase1_0,0,0,250);

CASE 11:

pPlace:=Offs(pBase1_0,200+10,0,250);

CASE 12:

pPlace:=Offs(pBase1_0,400+10,0,250);

CASE 13:

pPlace:=Offs(pBase1_0,0,0,340);

CASE 14:

pPlace:=Offs(pBase1_0,200+10,0,340);

CASE 15:

pPlace:=Offs(pBase1_0,400+10,0,340);

DEFAULT:

TPErase;

TPWrite "the Counter of line 1 is error,please check it!";

Stop;

ENDTEST

ENDPROC

!修正模块

PROC rModify()

MoveJ pHome,MinSpeed,fine,tool\WObj:=wobj0;

MoveJ pPick1,MinSpeed,fine,tool\WObj:=wobj0;

MoveJ pBase1_0,MinSpeed,fine,tool\WObj:=wobj0;

MoveJ pBase1_90,MinSpeed,fine,tool\WObj:=wobj0;

ENDPROC

 

ENDMODULE

 

注:务必使用虚拟示教器来确定需要定义的点,否则的话很容易出现错误。

本程序中位姿90可删去,因为没有用到。

 

你可能感兴趣的:(ABB机器人做单个或双传送链的教程和实例程序)