path recovery after e-stop was triggered

Hello all,

Using robot ware 5.16, path recovery option available.
Trying to program the robot to go to Service_pos after E-stop was pressed and reset, and automatically go back and continue work where he left off.

Tried:
Configuration - I/O:
doEStopTriggered, digital output.

MODULE MainModule

VAR errnum ERR_MY_ERR:=-1;
VAR robtarget p1;

PROC Path_10()
Bookerrno Err_MY_err;
IF DOutput(doEStopTriggered)=1 RAISE ERR_MY_ERR;
ArcLStart Target_10,v1000,seam1,weld1,fine,Weldgun\WObj:=Workobject_1;
ArcL Target_20,v1000,seam1,weld1,z10,Weldgun\WObj:=Workobject_1;
ArcL Target_30,v1000,seam1,weld1,z10,Weldgun\WObj:=Workobject_1;
ArcL Target_40,v1000,seam1,weld1,z10,Weldgun\WObj:=Workobject_1;
ArcL Target_50,v1000,seam1,weld1,z10,Weldgun\WObj:=Workobject_1;
ArcLEnd Target_50,v1000,seam1,weld1,fine,Weldgun\WObj:=Workobject_1;
ERROR
IF ERRNO=ERR_MY_ERR THEN
StopMove;
StorePath;
SetDO doEStopTriggered,0;
p1:=CRobT(\Tool:=weldgun\WObj:=Workobject_1);
MoveL Service_Pos,V1000,z20,Weldgun\Wobj:=Workobject_1;
MoveL p1,v1000,fine,Weldgun\Wobj:=Workobject_1;
RestoPath;
StartMoveRetry;
ENDIF
ENDPROC

System Modules (for the digital output)

MODULE Events(SYSMODULE)
PROC QStopTriggered()
SetDO doEStopTriggered,1;
Exitcycle;
ENDPROC
ENDMODULE

When i reset the E-stop, and press play the robot does the error correction but loops over and over inside off the error handler.
If instead of StartMoveRetry i use Return the robot starts welding from the beginning, and not where he left off.

Can you please help me, i am doing something wrong.

Try a “long jump”:
Main()

BookErrNo err_move_stop;
IDelete intETriggered;
CONNECT intETriggered WITH stop_weld;
ISignalDO doEStopTriggered,0,intETriggered;
TRAP stop_weld
StopMove\Quick;
RAISE err_move_stop;
ERROR
RAISE ;
ENDTRAP

PROC Path_10()

ArcLStart *,V100,smh,wld_h30n0\Weave:=wv_h30n0,fine,tool_w50022 \Wobj:=BT1\Track:=track_h\SeamName:=“seam1”;

ArcLEnd *,V200,smh,wld_h30n0\Weave:=wv_h30n0,fine,tool_w50022 \Wobj:=BT1\Track:=track_h;

ERROR (err_move_stop)
IF ERRNO=err_move_stop THEN
err_coll_routine;
RETRY;
ENDIF
ENDPROC

Your E-Stop will stop the robot(if it is a emergency stop as I understood). If you reset (doEStopTriggered=0) an interrupt will be activated which
calls a trap-routine that generates an error. The error is handed over to the error handler of the current procedure. There your handler routine (here replaced by err_coll_routine) will be executed and
the controller will continue with the current instruction (retry).

Thank you for your reply, i tried it , and it does not do anything

Your e-stop is a emergency stop of the robot where you set doEStopTriggered to 1 automatically?

This is how i get the digital output: doEStopTriggered to become 1, when the Emergency stop button is pressed

MODULE Events(SYSMODULE)
PROC QStopTriggered()

SetDO doEStopTriggered,1;
Exitcycle;

ENDPROC

  1. Controller configuration, type Event routine.
  2. Right click to create a new event routine.
  • Routine: QStopTriggered
  • Event: QStop
  • Sequence number: 0
  • Task: T_ROB1
  • All tasks: No
  • All motion tasks: NO

I understand. Let’s skip trap and try something simple.

VAR errnum err_move_stop:=-1;

! your event routine
PROC QStopTriggered()
RAISE err_move_stop;
ERROR
RAISE;
ENDPROC

Main()

BookErrNo err_move_stop;

! your welding routine
PROC Path_10()

ArcLStart *,V100,smh,wld_h30n0\Weave:=wv_h30n0,fine,tool_w50022 \Wobj:=BT1\Track:=track_h\SeamName:=“seam1”;

ArcLEnd *,V200,smh,wld_h30n0\Weave:=wv_h30n0,fine,tool_w50022 \Wobj:=BT1\Track:=track_h;

ERROR (err_move_stop)
IF ERRNO=err_move_stop THEN
err_coll_routine;! your error routine
RETRY;
ENDIF
ENDPROC

Event routine contains no exitcycle.

i get an error in the event routine: unhandled error

The ERROR(err_move_stop)- section must be in all routines where a QStop can happen.

i put the error(err_move_stop) section in all the routines,
and now i have an error when i press the e_stop: Task: T_ROB1
The program is executing in an EVENT routine. It is not allowed to execute the instruction MoveL in an EVENT routine.

mmh, I checked the code as above on my controller and it runs. Your event-routine contains only the code from my example ? - there should be anything else in.
So when you make your MoveL you have already left Proc QStopTriggered.

This is what i have found in the Technical reference manual
RAPID Instructions, Functions and Data types:

RestoPath cannot be executed in a RAPID routine connected to any of following special
system events: PowerOn, Stop, QStop, Restart or Step.

Can i use anything else to store and restore the interrupted path ?

Yes the restriction is like that. But in your event-routine there is no movement or restopath, it just generates an error and leaves. What is your RW version?

5.16

yes but i have in the gun cleaning procedure store and resto path

Ok, you have to do so when interrupting a path. I do not quite understand why the controller is announcing that he is still in the event-routine when it is already finished (after its error-statement).

Try to go back to the first proposal with interrupt and trap.
But do the trigger not on low but on high : ISignalDO doEStopTriggered,1,intETriggered;

its the same, loops inside the gun_cleaning process

But you have removed : IF DOutput(doEStopTriggered)=1 RAISE ERR_MY_ERR; from your welding routine?

if i remove that, then it continues the welding from the beginning , and does not do the gun cleaning process :frowning:

Its because of ExitCycle I suppose, where it uses the error-section inside main. A “Retry” there will call Path_10 again. Loop inside the gun-cleaning means there is another error which end up always there.
Your code should look like that now:

MODULE Events(SYSMODULE)
PROC QStopTriggered()
SetDO doEStopTriggered,1;
ENDPROC
ENDMODULE

Main()

IDelete intETriggered;
CONNECT intETriggered WITH stop_weld;
ISignalDO doEStopTriggered,1,intETriggered;

TRAP stop_weld
StopMove\Quick;
RAISE ERR_MY_ERR;
ERROR
RAISE ;
ENDTRAP

path_10;

ENDPROC

PROC Path_10()
Bookerrno Err_MY_err;
ArcLStart Target_10,v1000,seam1,weld1,fine,Weldgun\WObj:=Workobject_1;
ArcL Target_20,v1000,seam1,weld1,z10,Weldgun\WObj:=Workobject_1;
ArcL Target_30,v1000,seam1,weld1,z10,Weldgun\WObj:=Workobject_1;
ArcL Target_40,v1000,seam1,weld1,z10,Weldgun\WObj:=Workobject_1;
ArcL Target_50,v1000,seam1,weld1,z10,Weldgun\WObj:=Workobject_1;
ArcLEnd Target_50,v1000,seam1,weld1,fine,Weldgun\WObj:=Workobject_1;
ERROR
IF ERRNO=ERR_MY_ERR THEN
StopMove;
StorePath;
SetDO doEStopTriggered,0;
p1:=CRobT(\Tool:=weldgun\WObj:=Workobject_1);
MoveL Service_Pos,V1000,z20,Weldgun\Wobj:=Workobject_1;
MoveL p1,v1000,fine,Weldgun\Wobj:=Workobject_1;
RestoPath;
StartMoveRetry;
ENDIF

The error-section muste be in all path_ii.

i cant put the Trap routine in the PROC MAIN () it says syntax error