最新ABB机器人编程程序解析.docx
《最新ABB机器人编程程序解析.docx》由会员分享,可在线阅读,更多相关《最新ABB机器人编程程序解析.docx(13页珍藏版)》请在冰豆网上搜索。
最新ABB机器人编程程序解析
ABB机器人编程1
程序解析:
1、此程序是典型的ABB机器人官方编程思路与方法,分为主程序,初始化例行程序和轨迹程序。
2、思路清晰,结构编排明确,方便使用者阅读。
%%%
VERSION:
1
LANGUAGE:
ENGLISH
%%%
MODULEMainModule
PERStooldatatGripper:
=[TRUE,[[0,0,100],[1,0,0,0]],[25,[0,0,10],[1,0,0,0],0,0,0]];
PERSwobjdataWobBox:
=[FALSE,TRUE,"",[[1,1,1],[0,0,0,0]],[[0,0,0],[1,0,0,0]]];
CONSTrobtargetpPointA:
=[[1,1,1],[1,1,1,1],[-1,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONSTrobtargetpPointB:
=[[1,1,1],[1,1,1,1],[-1,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONSTrobtargetPHome:
=[[1,1,1],[1,1,1,1],[-1,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
PERSloaddataload_Empty:
=[1,[0,0,0],[1,0,0,0],0,0,0];
PERSloaddataload_Box:
=[20,[0,0,0],[1,0,0,0],0,0,0]; 以上是固定的数据存放位置。
PROCmain() 主程序,是一个程序的开始
rInitial;
Accset60,60; 此部分其实可放入到rInitial中去,这样管理起来更方便
velset100,100; 此部分其实可放入到rInitial中去,这样管理起来更方便
WHILETRUEDO
rBox; 在此指令后插入0.3秒的等待指令,防止CPU过负荷的情况出现。
ENDWHILE
ENDPROC
PROCrInitial()
SetDoDOGrip,0;
WaitDIDIGripReleased,1;
MoveJpHome,v300,z50,tGripper;
ENDPROC
PROCrBox()
MoveJoffs(pPointA,0,200,500),v1500,z100,tGripper;
MoveJoffs(pPointA,0,200,0),v1500,z50,tGripper;
A:
TPErase;
IFDIAllowPick=1 THEN
WaitTime0;
ELSEIFDIAllowPick=0THEN
TPWrite"SignalofAllowPicknoready,PleaseCheck!
";
GOTOA;
ENDIF
MoveLpPointA,v800,fine,tGripper;
SetDoDOGrip,1;
WaitDIDIGripPicked,1;
Griploadload_Box; 这一句很重要的,设定机器人的实际负荷情况,有利于机器人伺服控制的优化
MoveJoffs(pPointA,0,0,500),v1000,z100,tGripper;
MoveJoffs(pPointB,0,0,200),v1000,z50,tGripper\WObj:
=WobBox;
MoveLpPointB,v1000,fine,tGripper\WObj:
=WobBox;
SetDoDOGrip,0;
WaitDIDIGripReleased,1;
Griploadload_Empty;
MoveLoffs(pPointB,0,200,0),v800,z50,tGripper\WObj:
=WobBox;
MoveJoffs(pPointB,0,200,500),v1500,z100,tGripper\WObj:
=WobBox;
ENDPROC
ENDMODULE
ABB机器人编程02
程序解析:
1、此程序编写的思路是完全按照比赛题目中的要求的进行,就是按步就班式的
2、思路清晰,结构编排明确,方便使用者阅读。
3、有相应的写屏信息提示,方便操作员对机器人运行状态的了解。
4、有一点小问题,就是缺少初始化的部分。
MODULEMainModule
CONSTrobtargetPHOME:
=[[1149.87,13.55,451.35],[0.729477,0.0748599,0.679603,0.0199765],[0,0,0,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONSTrobtargetPA:
=[[250.14,-652.34,650.90],[0.429093,0.468557,-0.496153,0.591749],[-1,0,-2,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONSTrobtargetP20:
=[[250.14,-652.35,828.56],[0.429091,0.468538,-0.496163,0.591756],[-1,0,-3,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONSTrobtargetP30:
=[[695.24,18.14,826.55],[0.0377066,-0.677588,0.0913591,-0.728771],[0,0,-2,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONSTrobtargetP40:
=[[1227.51,18.14,826.55],[0.0377092,-0.677583,0.0913642,-0.728774],[0,0,-3,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONSTrobtargetPB:
=[[1227.52,18.15,424.02],[0.0377092,-0.677591,0.0913577,-0.728767],[0,0,-2,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
PROCmain() 在主程序里,过于臃肿,将具体功能尽量细分到例行程序
TPErase;
MoveJPHOME,v1000,z50,tool0;
OpenGripper;
WaitTime5;
WHILEtrueDO
IFPLC=1THEN
TPErase;
TPWrite"Warning!
Begintomovethenewstaff...";
WaitTime1;
ClkResetclock1;
ClkStartclock1;
MovFromAtoB;
ClkStopclock1;
reg1:
=ClkRead(clock1);
TPErase;
TPWrite"Goodshandlinginplace,ittake(timeinsecond):
"\Num:
=reg1; 运行时间的显示
WaitTime5;
ELSETPErase;
TPWrite"Waitingfornewgoods..."; 运行状态的提醒
WaitDIPLC,1;
ENDIF
ENDWHILE
ENDPROC
PROCOpenGripper() 将对夹具的控制做在一个例行程序里,方便管理
SetG0;
ResetG1;
ENDPROC
PROCCloseGripper() 将对夹具的控制做在一个例行程序里,方便管理
SetG1;
ResetG0;
ENDPROC
PROCMovFromAtoB()
MoveJP30,v1000,z50,tool0;
MoveJP20,v1000,z50,tool0;
MoveLPA,v50,fine,tool0;
WaitTime1;
CloseGripper;
WaitTime1;
MoveJP20,v50,z50,tool0;
MoveJP30,v1000,z50,tool0;
MoveJP40,v1000,z50,tool0;
MoveLPB,v50,fine,tool0;
WaitTime1;
OpenGripper;
WaitTime1;
MoveLP40,v50,z50,tool0;
MoveJP30,v1000,z50,tool0;
MoveJPHOME,v1000,z50,tool0;
ENDPROC
ENDMODULE
ABB机器人编程03
程序解析:
1、此程序是典型的ABB机器人官方编程思路与方法,分为主程序,初始化例行程序和轨迹程序。
2、思路清晰,结构编排明确,方便使用者阅读。
3、但有点要注意的初始化例行程序只在开始时,执行一次,正常运行时,不再执行。
但此程序是每个循环都会进行一次初始化,是有点问题的。
PROCmain()
InitAll; 此初始化程序应与循环执行的程序隔离开,使用WHILE指令
Circle;
WaitTime0.5;
ENDPROC
PROCInitAll()
ResetDo_fixOn;
WaitDI\On
ConfJ\On;
ConfL\On;
VelSet80,1000;
AccSet70,70;
MoveJPHome,v150,fine,Tool0\WObj:
=Wobj2;
RETURN;
ENDPROC
PROCCircle()
MoveJHome,v60,z0,Tool0\WObj:
=Wobj2;
waitDI;
work;
resetwaitDI
MoveJHome,v150,fine,Tool0\WObj:
=Wobj2;
ENDPROC
PROCfixopen()
SetDo_fixopen;
ENDPROC
PROCfixclose()
ResetDo_fixclose;
ENDPROC
PROCWork()
MOVEJA0 v150,z10,Tool0\WObj:
=Wobj2;
fixopen;
waittime2;
MOVELA1 v30,fine,Tool0\WObj:
=Wobj2;
fixclose;
waittime2;
MOVEJB0 v150,z10,Tool0\WObj:
=Wobj2;
MOVEjB1 v30,fine,Tool0\WObj:
=Wobj2;
fixopen;
waittime2;
MoveJPHome,v150,fine,Tool0\WObj:
=Wobj2;
ENDPROC
ABB机器人编程04
程序解析:
1、此程序是典型的ABB机器人官方编程思路与方法。
2、思路清晰,结构编排明确,方便使用者阅读。
3、此程序有一个亮点,就是有一个回等待点的例行程序rMoveHome,这个好处在于可以在手动状态下,就能方便的回到机器人的等待位置。
4、有足够的写屏信息,很好地提示运行状态。
PROCMain()
rInitial;
rMoveHome;
WhileTrueDo
Velset100,3000;
AccSet70,70;
rpickworkpiece;
rplaceworkpiece;
endwhile
procrpickworkpiece;
ifworkpiece=false
MoveJpickup,v2000,z5,too10;
A:
TPErase;
IFDI10_pickup=1 THEN (pickup为PLC发来拾取信号)
WaitTime0;
ELSEIFDI10_pickup=0THEN
TPWrite"PLC-pickupsignalnoready.";
GOTOA;
ENDIF
MoveJOffs(pickup,0,0,300),v500,z200,too10;
SetDoDO10_pickup1,1;
waittime 1;
workpiece=ture
endif
endproc
procrplaceworkpiece;
ifworkpiece=ture
MoveJplacemiddle,v2000,z5,too10;
MoveJplaceworkpiece,v2000,z5,too10;
MoveJOffs(placeworkpiece,0,0,300),v500,z200,too10;
SetDoDO10_pickup1,0;
A:
TPErase;
IFDI10_pickon=1 THEN (pickon为PLC检测已放好信号)
WaitTime0;
ELSEIFDI10_pickup=0THEN
TPWrite"PLC-pickONsignalnoready.";
GOTOA;
workpiece=false
ENDIF
endproc
PROCrInitial()
TpReadFknInput,"Isthepack_machineready","","","","No","Yes";(机器是否准备好)
IfnInput=4Then
bReady:
=False;
stop;
ElseIFnInput=5then
bReady:
=True;
ENDIF
bFirstPickBoard:
=True;
TpReadFknInput,"Doyouwanttoplaceworkpiece","","","","No","Yes";(机器人抓头是否工件)
IfnInput=4Then
workpiece:
=False;
ElseIFnInput=5then
workpiece:
=True;
ENDPROC
PROCrMoveHome() (定义原点) 此例行程序可以方便地回到等待位置
MoveJpHome,v500,z50,tGripper;
ENDPROC
1、荣晓华、孙喜林《消费者行为学》东北财经大学出版社2003年2月
(二)DIY手工艺品的“热卖化”
ABB机器人编程05
程序解析:
10元以下□10~50元□50~100元□100元以上□1、此程序是典型的ABB机器人官方编程思路与方法。
2、思路清晰,结构编排明确,方便使用者阅读。
3、此程序共分了3个程序模块,清楚地将不同用途的语句分开,方便阅读,这种编程在进行一些复杂系统的编程是非常有用的。
4、里面编程中运用了很多编程技巧,节省了机器人示教的时间,如使用OFFS功能。
附件
(一):
5、在写屏信息提示方面也非常丰富。
2、Google网站www。
people。
com。
cn6、此程序非常适合大家的参考与提高。
(2)物品的独一无二7、有一个小问题,缺少搬运重要的负荷重量设定数据。
7、你喜欢哪一类型的DIY手工艺制品?
(一)对“漂亮女生”饰品店的分析MODULEData 此模块专门用于存放程序数据的
!
target
CONSTjointtargethome_pos:
=[[0,0,0,0,90,0],[9E9,9E9,9E9,9E9,9E9,9E9]];
CONSTjointtargetdelta_pos:
=[[2,2,2,2,2,2],[9E9,9E9,9E9,9E9,9E9,9E9]];
CONSTjointtargetjhome:
=[[0,0,0,0,90,0],[9E9,9E9,9E9,9E9,9E9,9E9]];
PERSrobtargetroFetch:
=[[2000,0,233.483269239532],[0,0,1,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];
PERSrobtargetroDeFetch:
=[[2000,1000,233.483269239532],[0,0,1,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];
VARwzstationaryhome;
VARshapedatajoint_space;
VARnumnu_inhome;
VARboolflag1:
=FALSE;
ENDMODULE
此次调查以女生为主,男生只占很少比例,调查发现58%的学生月生活费基本在400元左右,其具体分布如(图1-1)
他们的成功秘诀在于“连锁”二字。
凭借“连锁”,他们在女孩们所喜欢的小玩意上玩出了大名堂。
小店连锁,优势明显,主要有:
%%%
VERSION:
1
LANGUAGE:
ENGLISH
%%%
MODULECalibData 此模块用于存放需要设定的程序数据
TASKPERStooldataTooldata_1:
=[TRUE,[[0,0,1000],[1,0,0,0]],[1,[0,0,1],[1,0,0,0],0,0,0]];
TASKPERSwobjdataWorkobject_1:
=[FALSE,TRUE,"",[[0,0,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]];
ENDMODULE
MODULEMainModule
PROCmain()
CheckHome;
CheckGriper;
Production;
ENDPROC
PROCCheckHome()
IFDOutput(do_inhome)=1THEN
nu_inhome:
=1;
ELSE
nu_inhome:
=0;
ENDIF
TESTnu_inhome
CASE0:
GoHome;
CASE1:
RETURN;
DEFAULT:
TPWrite"error";
Stop;
ENDTEST
ENDPROC
PROCCheckGriper()
IFdi_griperclosed=1THEN
ControlGriper;
ELSE
RETURN;
ENDIF
ENDPROC
PROCProduction()
WHILETRUEDO
WaitUntildi_plc=1;
MoveLOffs(roFetch,0,0,500),v1000,z100,Tooldata_1\WObj:
=Workobject_1; 利用OFFS此功能,减少示教
MoveLroFetch,v1000,fine,Tooldata_1\WObj:
=Workobject_1;
CloseGriper;
MoveLOffs(roFetch,0,0,500),v1000,z100,Tooldata_1\WObj:
=Workobject_1;
MoveLOffs(roDeFetch,0,0,500),v1000,z100,Tooldata_1\WObj:
=Workobject_1;
MoveLroDeFetch,v1000,fine,Tooldata_1\WObj:
=Workobject_1;
OpenGriper;
MoveLOffs(roDeFetch,0,0,500),v1000,z100,Tooldata_1\WObj:
=Workobject_1;
ENDWHILE
ENDPROC