# Error Handler

**URL:** <https://tech-community.robotics.abb.com/t/error-handler/2074>\
**Category:** Robot Controller\
**Created:** [August 8, 2008, 8:44pm UTC](https://tech-community.robotics.abb.com/t/error-handler/2074 "2008-08-08T20:44:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dh\_custompak](https://avatars.discourse-cdn.com/v4/letter/d/ac91a4/32.png) [@dh\_custompak](https://tech-community.robotics.abb.com/u/dh_custompak)\
**Post date:** [August 8, 2008, 8:44pm UTC](https://tech-community.robotics.abb.com/t/error-handler/2074/1 "2008-08-08T20:44:46Z")

</div>

Hi, I was curious if anyone knew the Errnum Data I would use to handle a motion supervision/joint collision. I have looked through out the manual, and read all of the options, but still can not find the data for those errors.

Our main objective is to shut off our electric spindle if the robot hits something.

---

<div class="post-metadata">

**Author:** ![RussD](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@RussD](https://tech-community.robotics.abb.com/u/RussD)\
**Post date:** [August 8, 2008, 11:12pm UTC](https://tech-community.robotics.abb.com/t/error-handler/2074/2 "2008-08-08T23:12:24Z")

</div>

That might be difficult to do with an error handler because you would have to have the same error handler code in every routine. Another alternative might be to use the system output MotSupTrigg (if you have collision detection option) and connect it to a trap routine that stops the motor whenever the output goes high.

---

<div class="post-metadata">

**Author:** ![j\_proulx](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@j\_proulx](https://tech-community.robotics.abb.com/u/j_proulx)\
**Post date:** [August 11, 2008, 6:50pm UTC](https://tech-community.robotics.abb.com/t/error-handler/2074/3 "2008-08-11T18:50:34Z")

</div>

Hello Dustin,

There is no Errnum for Motion Supervision.

IF you have Advanced Rapid, you can generate and interrupt via the IError instruction. See examole:

IError MOTION\_ERRErrorId:=204, TYPE\_ALL, intno1;

If you have Collision Detection option, you can generate an interrupt using the Motion Supervision System Output. This output could be used with ISignalDO instruction.

In the trap routine you can turn off your spindle.

BR

Jim Proulx

---

<div class="post-metadata">

**Author:** ![dh\_custompak](https://avatars.discourse-cdn.com/v4/letter/d/ac91a4/32.png) [@dh\_custompak](https://tech-community.robotics.abb.com/u/dh_custompak)\
**Post date:** [August 11, 2008, 7:03pm UTC](https://tech-community.robotics.abb.com/t/error-handler/2074/4 "2008-08-11T19:03:25Z")

</div>

Thanks Russ and Jim,

I went ahead and tried to create a trap routine watching “MotSupTrigg” however it keeps giving me a Refernce Error, saying that it’s unkown data. Is there something I might be missing? This is what I have in the program pertaining to this trap routine.

VAR intnum Collidedetect := 0;

PROC Main()

CONNECT Collidedetect WITH CollCheck;  
ISignalDOSingle, MotSupTrigg, 1, Collidedetect;

ENDPROC

TRAP CollCheck  
Reset Rout\_On;  
ExitCycle;  
ENDTRAP

Also, I do have Collision Detection on this Robot.

---

<div class="post-metadata">

**Author:** ![RussD](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@RussD](https://tech-community.robotics.abb.com/u/RussD)\
**Post date:** [August 11, 2008, 9:34pm UTC](https://tech-community.robotics.abb.com/t/error-handler/2074/5 "2008-08-11T21:34:59Z")

</div>

Did you create a dedicated output signal mapped to the system output for MotionSuperVisionTriggered? If so, did you warm-start the robot after creating the signal?

---

<div class="post-metadata">

**Author:** ![j\_proulx](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@j\_proulx](https://tech-community.robotics.abb.com/u/j_proulx)\
**Post date:** [August 12, 2008, 4:11am UTC](https://tech-community.robotics.abb.com/t/error-handler/2074/6 "2008-08-12T04:11:10Z")

</div>

Dustin,

As Russ states. You need to assign a digital output to the System Output MotSupTrigg.

Also remember that you can only Connect once.

PROC Main()

CONNECT Collidedetect WITH CollCheck;  
ISignalDOSingle, **doMotSupTrigg** , 1, Collidedetect;

ENDPROC

TRAP CollCheck  
Reset Rout\_On;  
**IDelete Collidedetect;**  
ExitCycle;  
ENDTRAP
