ABB机器人如何实现中断的立即停止,中断处理完后又接着中断触发时原来的路径移动?答案是肯定有的,是如何实现的呢?不急,且听下文分解。
CONSTrobtargetp10:=[[310.64,-150.00,624.70],[0.320936,1.06963E-08,0.947101,-7.81584E-08],[-1,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];CONSTrobtargetp20:=[[710.64,-150.00,624.70],[0.320935,4.22874E-08,0.947101,2.15468E-09],[-1,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];CONSTrobtargetp30:=[[710.64,150.00,624.70],[0.320935,7.05697E-09,0.947101,5.00524E-08],[0,-1,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];CONSTrobtargetp40:=[[310.64,150.00,624.70],[0.320935,5.10625E-08,0.947101,8.5824E-08],[0,-1,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
VAR intnum intno1:=0;
PERSrobtargetpNowPos:=[[318.588,150.001,624.701],[0.320935,-1.40162E-07,0.947101,1.21984E-07],[0,-1,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];PERSrobtargetpApporach:=[[501.57,0.00,824.55],[0.326198,0,0.945302,0],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
rInitAll; !初始化程序
MoveL p10,v1000,fine,tool0\WObj:=wobj0;
MoveL p20,v1000,fine,tool0\WObj:=wobj0;
MoveL p30,v1000,fine,tool0\WObj:=wobj0;
MoveL p40,v1000,fine,tool0\WObj:=wobj0;
MoveL p10,v1000,fine,tool0\WObj:=wobj0;
ENDPROC
TRAP Trap1 !中断程序Trap1
reg1 := reg1 + 1; !reg1自加1
StopMove; !中断程序触发时停止运动
StorePath; !存储当前路径
pNowPos:=CRobT(\Tool:=tool0\WObj:=wobj0); !获取当前位置赋值给pNowPos点
MoveJ pApporach, v1000, fine, tool0; !中断产生时远离点
WaitTime 1; !延时1S
MoveJ pNowPos, v1000, fine, tool0; !运行中断产生时存储的位置pNowPos点
RestoPath; !恢复中断之前的路径运动
StartMove; !开始运动
ENDTRAP
PROC rInitAll()
Idelet intno1; !取消当前中断符intno1的连接,预防误触发
CONNECT intno1 WITH Trap1; !将中断符与中断程序tTrap连接
ISignalDI di1, 1, intno1; !定义触发条件,即当数字输入信号di1为1时,触发该中断程序
ENDPROC
ENDMODULE
了解更多产品相关信息请关注:ABB机器人打磨集成服务商