# ErrLog in a Trap Routine

**URL:** <https://tech-community.robotics.abb.com/t/errlog-in-a-trap-routine/9012>\
**Category:** RAPID Programming\
**Created:** [July 31, 2019, 11:45am UTC](https://tech-community.robotics.abb.com/t/errlog-in-a-trap-routine/9012 "2019-07-31T11:45:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![EricH](https://avatars.discourse-cdn.com/v4/letter/e/ea5d25/32.png) [@EricH](https://tech-community.robotics.abb.com/u/EricH)\
**Post date:** [July 31, 2019, 11:45am UTC](https://tech-community.robotics.abb.com/t/errlog-in-a-trap-routine/9012/1 "2019-07-31T11:45:00Z")

</div>

When I write an ErrLog in a Trap Routine, the log is displayed without description text. Is there a way to fix this?

TRAP ClearPickAreaTrap  
IF rob\_do\_48\_Rob\_out\_of\_TurnTable = 0 THEN  
StopMove \Quick;  
ErrLog 4830,\W,“Clearance Error”,ERRSTR\_TASK,“Lost clearance for Turntable, while picking a part”,ERRSTR\_EMPTY,ERRSTR\_EMPTY;  
WHILE rob\_di\_16\_Clearance\_Pick\_Part = 0 DO  
WaitTime 1;  
ENDWHILE  
StartMove;  
ENDIF  
ENDTRAP

This is the Result:

 ![|479x268.jpg](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/1/104733776d73e09e14b96676018444606a72b4fe.jpeg)

---

<div class="post-metadata">

**Author:** ![SomeTekk](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/sometekk/32/151_2.png) [@SomeTekk](https://tech-community.robotics.abb.com/u/SomeTekk)\
**Post date:** [July 31, 2019, 12:10pm UTC](https://tech-community.robotics.abb.com/t/errlog-in-a-trap-routine/9012/2 "2019-07-31T12:10:14Z")

</div>

The switches prohibit writing the message to the pendant.

[\W]  
Warning  
Data type: switch  
Gives a warning that is stored in the robot error message log only (not shown directly on the FlexPendant display).

[\I]  
Information  
Data type: switch  
Gives an information message that is stored in the event log only (not shown directly on the FlexPendant display).

If none of the arguments \W or \I are specified then the instruction will generate an error message directly on the flexpendant and also store it in the event log.

---

<div class="post-metadata">

**Author:** ![EricH](https://avatars.discourse-cdn.com/v4/letter/e/ea5d25/32.png) [@EricH](https://tech-community.robotics.abb.com/u/EricH)\
**Post date:** [July 31, 2019, 1:05pm UTC](https://tech-community.robotics.abb.com/t/errlog-in-a-trap-routine/9012/3 "2019-07-31T13:05:16Z")

</div>

Without \W has the same problem. Still no title and description displayed.

 ![|455x254.jpg](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/1X/fd8bcb9c18f543084b5b5f6bc05ee75b092505c3.jpeg)

---

<div class="post-metadata">

**Author:** ![SomeTekk](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/sometekk/32/151_2.png) [@SomeTekk](https://tech-community.robotics.abb.com/u/SomeTekk)\
**Post date:** [July 31, 2019, 2:42pm UTC](https://tech-community.robotics.abb.com/t/errlog-in-a-trap-routine/9012/4 "2019-07-31T14:42:09Z")

</div>

Curious.

Have you tried creating your own error strings as opposed to using the predefined data?

Maybe Lemster of Micky will have better ideas than I have. :neutral:

---

<div class="post-metadata">

**Author:** ![lemster68](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/lemster68/32/1945_2.png) [@lemster68](https://tech-community.robotics.abb.com/u/lemster68)\
**Post date:** [July 31, 2019, 4:11pm UTC](https://tech-community.robotics.abb.com/t/errlog-in-a-trap-routine/9012/5 "2019-07-31T16:11:38Z")

</div>

Did you install your own .xml file? If you want to use just your own strings then you have to use 4800.

---

<div class="post-metadata">

**Author:** ![EricH](https://avatars.discourse-cdn.com/v4/letter/e/ea5d25/32.png) [@EricH](https://tech-community.robotics.abb.com/u/EricH)\
**Post date:** [August 1, 2019, 7:10am UTC](https://tech-community.robotics.abb.com/t/errlog-in-a-trap-routine/9012/6 "2019-08-01T07:10:19Z")

</div>

Thanks lemster, that was the problem.

Found this in the Help manuals:

ErrLog generates program errors between 4800-4814 if using the xml file that are installed by the system, and between 5000-9999 if installing an own xml file.

So this means I have only 15 error ids, if I don’t use xml files. :o
