Simulating collision error and recovery in RobotStudio

Hello to all, I would like to simulate collision error and recovery possibility in RS. We have robot system with multitasking option. I tried to do recovery inside semistatic task, without success. So my question is where should be trap routine (main, robot motion, or semistatic task), and where should be recovery routine (motion up after collision). And how to raise collision error in rapid (I guess inside robot motion routine?). Thanks in advance.

1 Like

Hi,
I did this once with a S4 system where I used a semistatic task.In this task I used the instruction “IError” to trig a trap routine when a collision had occured.
In the trap routine I used system signals to reset the error, turn on the motors and restart the program. This worked fine in the real robot.

Thanks a lot for the answer Anders.

Would you by chance have a code snippet of this? I’d love to see your trap routine! I am struggling with finding an example for this very same recovery setup!

I’m afraid not, it was over 20 years agoo I did this on a S4 system, so that code is gone :wink: .

Oops I just noticed the date! Totally understandable!! I appreciate you responding!