RobotStudio event

Error Handlers

Do error handlers need to be in the routine that the Motion Pointer is in when the error occurs? Or the routine that the Program Pointer is in?
I assume if you have an error handler in the main routine, and you call a second routine, the error handler will not work if the error occurs before the PP or MP returns from the second routine?

Answers

  • I expect that the only relevance that the motion pointer has would be if you use collision error handling.  More often than not the program pointer will be ahead of the mp.  If there is a possibility that an error will occur in a called routine, then it should have its own error handler.  You could even use the RAISE instruction to bring the error to the calling routine for its error handler to deal with.
    Lee Justice