Is there any code based approach for commanding a controlled motor halt in UR10e?

Hello everyone,

I’m currently working with the UR10e robot and externally controlling it in velocity mode using ROS2 controller manager (Humble). I’m wondering if there’s a way to command a smooth halt through the code, essentially rapidly stopping each motor by implementing quick stop deceleration.

Ideally, I’m looking for a behavior similar to a safeguard stop, but without pausing the externalcontrol.urcap and without being triggered by a physical switch. Any insights or suggestions on achieving this would be greatly appreciated!

Thanks in advance.

Would it be possible to use a stopj or stopl command via a UR script? The script manual should cover using those commands.