I am working with a UR5e.
During program execution the robot triggers extruders and external motors via I/O Signals and Modbus signals.
As the system is complex and still being developed the robot runs into errors frequently.
The problem is that it sometimes stops the program while external actuators are still activated. In the case of extruders this results in a huge mess even if they are quickly stopped manually.
How can I run a Modbus command or I/O command every time the robot runs into an error to stop the extruders and external actuators?