RAPID基本入门

所需积分/C币:48 2015-07-29 17:02:12 367KB PDF

关于RAPID语言的基本入门介绍资料,包括RAPID语言的介绍,相关的示例,如何与RobotStudio完全结合编程等,适合用RobotStudio进行机器人编程的入门型资料。
A ABB Engineering(Shanghai)Ltd 3BCN700000 Flexible Automation 09/01/30 CN 3(13) 在蠃线编程时的定义格式 PERS num nbr:=1: PERS stringstring 1: ="Hello 在程序中赋值的示例 PERS num nbr: =1. PROC maino br:=2 ENDPROC 程序执行后 PERS num nbr: =2 PROC main( nbr:=2 ENDPROC 常量 常量的特点是在定义时己赋予了数值,并不能在程序中进行修改,除非手动修改。 在离线编程时的定义格式: CONST num gravity: =9.81 CONST string greating: ="Hello A ABB Engineering(Shanghai)Ltd 3BCN700000 Flexible Automation 09/01/30 CN 4(13) 筒单编程示例1 机器人走出图中的轨迹。 10 P20 40 在离线编程时的格式: MODULE TEST pers tooldata -Pen:=:TU,[[200,0,30];[1,0,0,0]],[0.E,[62,0,17],[1,0,0,0],0 0]] CONST rOo=arge-p10:=[[600,-100,8001,[0.77170,0,0.707170,0],[0,0,0,0,[99,9E9, F9,9F9,9F9,9F9]]; CONST ronzarge-p20:-[[600,100,3001,[0.707170,0,0.707170,0,[0,0,0,0],[9F9,9R9 9E9,9E9,9E9,99]] CONST roo=arge-p30:-[[800,100,3001,[0.707170,0,0.707170,0,[0,0,0,01,[9F9,99 9F9,9F9,9F9,9F9]] CONST roo 40 [[800,-100,800],[0.737170,0,0.707170,0],[0,0, 0],[9F9,9F9 9E9,9E9, 9E9]]; PROC main( Move- p20, v200, fire, tPer Move- p30, v200, fire, LPen ove Move- p10, v200, fire, tPen ENDE ROC ENDMODULE 4A A ABB Engineering(Shanghai)Ltd 3BCN700000 Flexible Automation 09/01/30 CN 5(13) 筒单编程示例2 p10 在高线编程时的格式 DL二 E TEST pers tooldata = P ,[[200,0,3];[1,0,0,01],0.8,[62,0;17],[1,0,0,0],0;0, CONST ro-arge-p10:=[[600,-100,800],[0.737170,0,0.707170;0],[0,0,0,0];[9E9,9E9 9E9,9E9,9E9,9E9]] ONST roo=arge-p20:=[[600,100,300],[0.707170,0,0.707170,0,[0;0,0,0],[9E9,99 9E9,99,99,99]]; CONST roo=arge- p30 [[800,100,800],[0.707170,0;0.707170,0,[0;0,0;0],[9E9,9E9 9E9,9E9,9E9,9911 CONST roo=arge-p40:=「「800,-100,8001,「0.六7170,0,0.707170,01,「0,0,0,0l;「99,99 9E9,99,99,9911; PROC main() Move- pl0, v200, irc, tpen Move- p20, v200, 22c, tPen Move- p3c, v200, fire, tPen Move- p40, v200, 25C, tPen p10, v200, fire, tPen ENDP ROC ENDMODULE 5A A ABB Engineering(Shanghai)Ltd 3BCN700000 Flexible Automation 09/01/30 CN 6(13) 筒单编程示例3 Movel p10, v500, fine, tPen; MoveC p20, p30, v500, fine, tpen; Movel p40, v500, fine, tPen P20 30 40 p10 运动指令在在拐弯处的1O精确控制方法 Start spaying seto do1, 1 I! SLop spraying 对策:将两条指合变更为 Movel-O p2,v30,z10, spray,do1,0, I Seldo dol, 0; 在涂胶应用中,如果希望在p20点进行关枪的话,可能不能如愿。如果按照上面的指合,在图中,红色代表已出的胶,则未到p20点 就提前关枪了。 p10 p20 p30 6A A ABB Engineering(Shanghai)Ltd 3BCN700000 Flexible Automation 09/01/30 CN 7(13) 1O信号使用的筒单示例 数字输入信号示例 如果di为1,执行运动指合。 工FCi1=1HEN 10, v1000, fine, t=en ENDIF 数字输出信号示例 在pO点将 do grip设为1。 Movej po, vmax, fine, tGripperi etro do, Move- pl0, v1000, fine, t=en; 人机矿话写屏指令的使用 在屏幕上显示信息 RAPTD #R 6 TPWrite "Now prcducirg exhaust. pipes" BBo systemI(sEYSI-W-00032949 op吧ed 典tk 下 ww PErdue ing exhaust pIR看 Clear Dont show show task ame MerMaid 7A A ABB Engineering(Shanghai)Ltd 3BCN700000 Flexible Automation 09/01/30 CN 8(13) 根据屏幕的提示进行操作 指合 √2 R num answer TPReadFK answer, "Select which figure to draw", "squsrew tRiangle", stEmpty/ stempty, stEmpty i 工 e answer=1THEN ccde to draw square ElSEIF answer 2 TEEN code to draw triangle ELSE dc nothing ENDIF ABASI Moors nn System1(SFViT-W-nnn31744 Running〔5ped1mnoh All tas RoBI FRead Select which figure to draw Square Trlangle module 根据屏幕的提示输入数字 指合 VAR num answer TPReadNum answer ow many times shall i draw the figure? FOR 1 FROM I Tc answer Do code to draw -igure ENDE OR 8A A ABB Engineering(Shanghai)Ltd 3BCN700000 Flexible Automation 09/01/30 CN 9(13) ABBO 2b-ystrmI(SFVST-W-nnn 794) RinnIng(spped Inmpa) All tasks TPR≡dum lIow many times shall I draw the figure? 了 0+/ OK MainMdule e门 带参数的RAPD子程序 带参数的 RAPID子程序相当于是根据自己的需要而自制的指令。在子程序里,使用的程序数据都是变量,由外部赋值。 指合 Pere tooldata -Pen CONST rob=arge- p10: PROC main( all the aquare drax⊥ square100;画边长为00mm的正方形 drax⊥ square200;画边长为200mm的正方形 drax_ square300;画边长为300mm的正方形 d square400;画边长为400mm的正方形 END- ROC proc draw_ square( mum sde_size)带参数的子程序,被主程序调用 VAR nontarget p20 AR robtarget p30 VAR robtarget p40; p20 is set tc pl0 with an offset on the y value Offs(pl0,0, side__aize, 0)i 30 offs(pl0, side_size, side_size, 0) Offs (pl0, side_size, 0, 0) Move- pl0, v200, fire, tPen Move- p20, v200, fire, tPeni t per 0O, fire, tPe Move, pl0, v200, fire, tPen ENDP ROC A A ABB Engineering(Shanghai)Ltd 3BCN700000 Flexible Automation 09/01/30 CN 10(13) RAPID编程时的程序结构考虑基本示例 MAIN count>=10 di= User selection Change paper Pencil sharpener Square Triangle Quit en070000351 MoDU二 E MainModule PErs t。o1 data -Pen:=:TU,[[200,0,3-];[1,0,0,0]],[0.8,[62,0;17],[1,0,0,01,0;0, 0]] CONST rop=arge- p10 [600,-100,800],[0.7~7170,0,0.707170,0],[0,0,0,0];[9E9,99, 99,99,999999] CoNST rop=arge- sharp [200,500,8501,[1,0 0],[0 9E9,9E9 9,9E9 9E9,99,9E9]]; PERS num count :=0 PROC main g us≈rse1 ection; IE count >=10 THEN change_ _paperi Reset count count := 0i ENDIF ENDIF ENDP ROC PROC user selection( VAR num answeri TPReadEK answer,"Select which figure to draw,Square TRiangle",Quit", stEmpty, st.; TF answer -1 THFN drawsquare IL:= counL +1- ElSEIF answer 2 TEEN draw__Triang_ count ount li ELSE ENDIE ENDP ROC PRoc draw_ square() VAR robtarget p20 i VAR robtarget p30 VAR robtarget p40 Define points that give a square with tre side 200 mm p20:=0ffs(p10;0,200,0 p30 Offs(p10;200,200,0); p0:=offs(p10;200,0,0); Move- p10, v200, firer tpeni Move- p20, v200, tirer tPcni Move- p30, v200, fire, tPen 10A

...展开详情
试读 13P RAPID基本入门
img
romantice
  • 分享精英

    成功上传11个资源即可获取

关注 私信 TA的资源

上传资源赚积分,得勋章
    最新推荐
    RAPID基本入门 48积分/C币 立即下载
    1/13
    RAPID基本入门第1页
    RAPID基本入门第2页
    RAPID基本入门第3页
    RAPID基本入门第4页

    试读已结束,剩余9页未读...

    48积分/C币 立即下载 >