RobotStudio event

Collision detection

Options
Can I catch System Output MotionSupTrigg in an interrupt? I mean, as soon as a collision is detected, is there enough time for the interrupt to be executed before program execution stops? In the pics below, I link System Output MotionSupTrigg with doMotionErr. Thanks for your time and response.





Comments

  • DavidLanham
    Options
    I was sort of trying to do the same thing recently and found out that you can sort of catch the input.  For me it would stop its execution in the trap routine when the collision happened.

    I was trying to auto recover from a collision.  I wanted the robot to try again before then moving back away and alerting the operator.

    For what I was doing you will have to have a background task running that will help out with the trap routine.  So what I do is setup the TRAP to watch for the signal.  I then have a background task that watches for the robot program to be in Auto have the motion supervision input on and have the program running.  The background task will see these three states before the controller stops the main program for the collision.  I then have the back ground task wait a couple of seconds and then turn on a output that I have mapped to System input to reset error and then have it turn on a output that I have mapped to another system input to start the program running again.  From within the main program I use Error handlers to recover from the collision. 




  • ko414du4
    Options
    Thanks for the comments, David!
    For what I was doing you will have to have a background task running that will help out with the trap routine.   

    I don't have a multitask option on my robot. However, your response lead me to an idea, that is: what if I catch the system output MotionSupTrigg in a STOP event routine?  So whenever program execution is stopped, I check doMotionErr (which is tecnicall MotionSupTrigg itself) and set a flag. Do you think it will work?







    Any comments are deeply appreciated.