RobotStudio event

What "Reset execution error signal" is useful for?

Hello all,

I was wondering how the system input "Reset execution error signal" is used amd cam be useful.

I thought that when an execution error arises, it was necessary to acknowledge the error using a DI connected to this system input (similarly to what happen when an emergency occurs, when you have to use the system input "Reset emergency stop").

But actually a "Start at Main" already works as acknowledge.




Comments

  • lemster68
    lemster68 ✭✭✭
    Start at main could cause a crash midway through the program so if you want to resume without aborting the program this will be useful.
    Lee Justice
  • Thank you for the answer.

    I still need some explanations, I wrote a simple example to understand better.

    Let say that all system input and output are connected to a PLC.
    The behaviour I want to obtain is the following: when error (ERR_USER) arises, I want to stop robot motion and program execution and then start it again (with system input "Start") from where it was stopped but only after that the system output "Execution Error" has been reset through system input "Reset execution error signal".

    What's the logical sequence of instruction/system input I should use for this?


      

    VAR errnum ERR_USER := 1;


    PROC main()

            !Add your code here
            MoveJ p1, v200,fine,tool0\WObj:=wobj0;
            
            MoveJ p2, v200,fine,tool0\WObj:=wobj0;

            MoveJ p3, v200,fine,tool0\WObj:=wobj0;
            
            
            IF DI_UserError = 1 THEN   !DI_UserError is only a bit I use to trigger the error 
                RAISE ERR_USER;
         
            ENDIF

            ERROR
            
            IF ERRNO = ERR_USER THEN
                example := example + 1;
                
                ErrLog 4800,    "error_1", ERRSTR_EMPTY,
                        ERRSTR_EMPTY,ERRSTR_EMPTY,ERRSTR_EMPTY;
      
            ENDIF
             

            Stop;

            
        ENDPROC
    ENDMODULE
  • lemster68
    lemster68 ✭✭✭
    You are welcome.  What is the purpose of this?  " example := example + 1;"  I don't get it.
    Anyway.  Your error handler needs to have a way to get back into the routine to resume.  What is the course of action do you want to try?  Retry, Trynext and so on.  In the case of division by zero, it will always error, so a retry will end up exceeding the retry counter.  Perhaps you want to set a group output to send the error number to the PLC.
    Lee Justice
  • dragolollo
    edited 9:24AM
    I'm sorry, "example" was just a debug variable I forgot to cancel 

    I would like to go back to the point where the error occured and to start the execution of the program only after that robot receiveS "Start" system input from PLC


  • lemster68
    lemster68 ✭✭✭
    Since you already have a stop instruction in your error handler, the robot will not resume execution until it gets the start input.  To resume from the error, a retry is what you need.
    Lee Justice