I did a test using the IError instruction. This interrupts on a collision detection Error. It is a movement up and down. when there was a collision When restarted it would turn pulse a light and do other movement.
VAR intnum intno1 := 0;
PERS bool bCollision := FALSE;
VAR bool bVldPath := FALSE;
CONST errnum a_errno1 := 2;
!
PROC main()
IF bVldPath THEN
bCollision := FALSE;
IDelete intno1;
CONNECT intno1 WITH tColl;
IError MOTION_ERRErrorId:=204, TYPE_ALL, intno1;
!ISignalDI Single,diTool_1_Empty,1,intno1;
MotionSupOnTuneValue:=35;
MoveL [[1495.88,-81.48,1091.5],[0.0504659,-0.706454,-0.012259,-0.705852],[-1,1,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]],v500,fine,tCutter;
MoveL [[1495.88,-81.48,680.93],[0.0504638,-0.706455,-0.0122546,-0.705851],[-1,1,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]],v500,fine,tCutter;
WaitTime 2;
ELSE
PulseDOHighPLength:=1, doAmberBeacon;
MoveL [[1495.88,-81.48,1091.5],[0.0504659,-0.706454,-0.012259,-0.705852],[-1,1,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]],v500,fine,tCutter;
MoveL [[1513.59272578952,-280.401165442234,1080.70049611284],[0.0504658649220911,-0.70645350895712,-0.0122589914790037,-0.705851509375559],[-1,1,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]],v500,fine,tCutterWObj:=wobj0;
bVldPath := TRUE;
ENDIF
RETURN;
ENDPROC
TRAP tColl
bCollision := TRUE;
IDelete intno1;
StopMove;
ClearPath;
StopMoveReset;
bVldPath:=FALSE;
ExitCycle;
ENDTRAP