# Error Code to PLC

**URL:** <https://tech-community.robotics.abb.com/t/error-code-to-plc/8934>\
**Category:** RAPID Programming\
**Tags:** error, error-handling, rapid-code\
**Created:** [June 28, 2019, 8:07am UTC](https://tech-community.robotics.abb.com/t/error-code-to-plc/8934 "2019-06-28T08:07:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_TawTech](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@Dave\_TawTech](https://tech-community.robotics.abb.com/u/Dave_TawTech)\
**Post date:** [June 28, 2019, 8:07am UTC](https://tech-community.robotics.abb.com/t/error-code-to-plc/8934/1 "2019-06-28T08:07:14Z")

</div>

Hi all,

I’m a ABB robot newbie.

I want to display any error code on a HMI connected to a Allen Bradley PLC. I have created an unsigned double integer and used the following code  
ERROR  
SetAO ErrorCode, ERRNO;  
ENDPROC

But the received code does not match the error codes in the manual. Does anyone know of a way of doing this. I did thing about doing a lookup table, but with the vast amount of possible codes, this would not be a great way of doing it. I also was wondering if there is any way of converting the ASCII (I assume this is the format) in the IRC5 to a decimal number that matches the fault code.

Many thanks for any suggestions.

Dave

---

<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:** [June 28, 2019, 11:55am UTC](https://tech-community.robotics.abb.com/t/error-code-to-plc/8934/2 "2019-06-28T11:55:46Z")

</div>

An analog output is not appropriate for sending those numbers. Use a group output and a dint is probably not necessary either, but that is up to you, probably num is sufficient.

---

<div class="post-metadata">

**Author:** ![soup](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/soup/32/1592_2.png) [@soup](https://tech-community.robotics.abb.com/u/soup)\
**Post date:** [June 28, 2019, 3:05pm UTC](https://tech-community.robotics.abb.com/t/error-code-to-plc/8934/3 "2019-06-28T15:05:16Z")

</div>

You had the right idea - just use a group output and SetGO instead.

---

<div class="post-metadata">

**Author:** ![Dave\_TawTech](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@Dave\_TawTech](https://tech-community.robotics.abb.com/u/Dave_TawTech)\
**Post date:** [June 30, 2019, 7:15am UTC](https://tech-community.robotics.abb.com/t/error-code-to-plc/8934/4 "2019-06-30T07:15:00Z")

</div>

Thanks guys, it works

Dave
