# Only a few OPC UA Quality Codes translated to Ignition

**URL:** <https://forum.inductiveautomation.com/t/only-a-few-opc-ua-quality-codes-translated-to-ignition/14813>\
**Category:** Module Development\
**Tags:** sdk, ignition79\
**Created:** [July 18, 2017, 6:54am UTC](https://forum.inductiveautomation.com/t/only-a-few-opc-ua-quality-codes-translated-to-ignition/14813 "2017-07-18T06:54:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mik977](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@mik977](https://forum.inductiveautomation.com/u/mik977)\
**Post date:** [July 18, 2017, 6:54am UTC](https://forum.inductiveautomation.com/t/only-a-few-opc-ua-quality-codes-translated-to-ignition/14813/1 "2017-07-18T06:54:08Z")

</div>

I’ve done a test. In my driver I generated Tags from all subcodes like this:

for (StatusCode.SubCode c : StatusCode.SubCode.values()) {  
… generate tags with respective subcodes …  
}

However, only a bunch of subcodes are recognized by Ignition (translated from OPC UA to Ignition Quality).

- Bad\_ConfigurationError -\> Config Error (4)
- Bad\_DataUnavailable -\> Bad Quality (0)
- Bad\_NoData Available -\> Bad Quality (0)
- Bad\_NotConnected -\> Not Connected (8)
- Bad\_NotFound -\> Not Found (404)
- Bad\_ServerNotConnected -\> Not Connected (8)
- Bad\_ShelvingTimeOutOfRange -\> Demo Expired (900)
- Bad\_UserAccessDenied -\> Access Denied (403)
- Uncertain\_LastUsableValue -\> Uncertain (showing last value) (68)
- Uncertain\_NoCommunicationLastUsableValue -\> Uncertain (showing last value) (68)

Other codes are translated to Unknown (600)

According to this document:

[http://docs.inductiveautomation.com/display/DOC79/Tag+Quality+and+Overlays](http://docs.inductiveautomation.com/display/DOC79/Tag+Quality+and+Overlays)

other codes should be supported like: SENSOR\_BAD (80), SUB\_NORMAL (88), …

I would also need Uncertain\_SubstituteValue to be supported at least.

This is important to translate Quality from IEC protocols.

Is it possible to extend or customize the translation from OPC Quality to Ignition Quality?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 18, 2017, 1:37pm UTC](https://forum.inductiveautomation.com/t/only-a-few-opc-ua-quality-codes-translated-to-ignition/14813/2 "2017-07-18T13:37:02Z")

</div>

No, unfortunately the Ignition quality codes are not extensible.

I’ve had the same struggle myself when working on drivers. You’ll have to settle for a very small subset of StatusCodes and use logging to provide additional information or use more detailed StatusCodes but live with Ignition turning them into Unknown quality.

---

<div class="post-metadata">

**Author:** ![mik977](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@mik977](https://forum.inductiveautomation.com/u/mik977)\
**Post date:** [July 18, 2017, 2:51pm UTC](https://forum.inductiveautomation.com/t/only-a-few-opc-ua-quality-codes-translated-to-ignition/14813/3 "2017-07-18T14:51:45Z")

</div>

I wouldn’t mind that Ignition displays the unknown qualities as “Unknown” quality, if only the integer constants went through somehow.

For me the right solution woud be to pass OPC quality as is and have it as maybe “UserQuality” or “SourceQuality” in Tag attributes besides “Quality”. But I guess this would involve a major change in the Ignition architecture.

I guess it wouldn’t be too hard to automatically offset the OPC codes to not get in the way of Ignition quality codes.  
GOOD … 0x00 -\> 0x20xxxxxx (offset)  
UNCERTAIN … 0x40 -\> 0x40xxxxxx (same)  
BAD … 0x80 -\> 0x80xxxxxx (same)  
The overlay icon could be a user quality figure

But maybe there are other things to consider and I am oversimplifying 🙂

Anyway, thank you for the quick reply
