Yes, I double checked my configuration and I do have CollisionErrorHandling=Yes. I also noticed in Control Panel > Supervision there is a setting for Non motion execution. Do you know what this does?
So it looks like I need to accept that there is no way to directly handle this fault because the system fault is shutting down the main routine - is that correct?
Now to figure out the solution suggested by you and lemster68:
- Configure a system output MotSupTrigg and connect it to a digital output.
- In a background task, connect a trap to ISignalDO.
This works, but maybe I shouldn’t assume a trap is necessary, I can just watch for the digital output to go high.
I might need some help with the next step:
You said, “force an interrupt in the maintask from a background task with system inputs”.
How can I do this if the main task was stopped by the system error?
Your other suggestion, “Or you can set a bool in the background task, and then check that bool in a event routine at program startup.”
Are you referring to a configured event routine like Start or Restart, or do you just mean that my main routine should check for this boolean? Then if I see this boolean true, I take care of cleaning up the collision before starting the normal business of the main routine?
Assuming I’m still with you up to here, can you provide more detail for: “start the robottask with a simulated I/O system input”? Is this the background task setting a digital input that is configured to a system input like “Start at Main”?
Now, taking a step back, am I missing something obvious that gotten me this deep into a fairly complex solution? Other than preventing the collision from ever happening. Seems like a very common thing to recover from a motion supervision event without manual intervention . How am I getting into something that’s so hard to recover from?
Thanks to both of you for jumping in to help.