Best way to stop motion based on IO


I was wondering what is the best way to stop a motion if a input turns to 0?
Send_and_subcribe with a custom instruction?
A while loop? Can the motion even be stopped since the instruction is sent?
Meaning should I discretize more the motion and have periodic check of ReadDigital ?

Thanks in advance.

it depends a bit of what you want to achieve:

if you want only a safety stop you can integrate an interrupt routine into the rapid code with a stop motion statement, to continue you would need to restart with PP-Main

if you want to stop and skip the motion and continue with the process code, this needs a bigger customization effort

please let me know which objective you want, if not described above please describe your preferred scenario

Thanks a lot for your reply.

I am trying to stop a linear motion and reverse it if an IO turns to 0.
Basically, an input of 0 means there is a high risk of damaging the tool, and the only way to prevent the damage is to do the motion in reverse. So far I discretized the linear motion into 1mm increments with checks of that IO, but I was wondering if there was another way.

ABB offers a package called Path recovery. The explanation of the RAPID instructions and some examples you can find in the technical reference manual form ABB search for (PathRecStart)

It would be possible to create a custom instructions to start the path recording and for the motion you would need to create your own custom move instruction (you can copy the existing instructions and just change to new names) here you could integrate the behavior of path retraction and decide how you end the instruction for further continuity

I know it would work but you would have to program and test for yourself.

If you need professional support for the development of this functionality you could go in contact with Giuliano Ganga from Ganga Engineering or with ABB Robotics and I could support on the side for the COMPAS_RRC integration if needed.

1 Like

Thanks a lot ! I’ll check that