Quality codes vs. Status codes|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Quality codes vs. Status codes
Avatar
Simon de Kraa
The Netherlands
Member
Members
Forum Posts: 12
Member Since:
02/24/2022
sp_UserOfflineSmall Offline
1
05/05/2022 - 08:05
sp_Permalink sp_Print

Hello,

Apologies in advance for my limited knowledge of OPC UA.

I am a little bit confused about the difference of quality codes and status codes.

If I am not mistakes both can be set to a node/tag.

So e.g. a node/tag can have a status of Bad_WaitingForInitialData or a quality of Bad.

What is the difference? Why are there quality codes if the list of status codes looks is more comprehensive?

Quality Codes
https://honeywellprocess-commu…..lity-Codes

Status Codes
https://honeywellprocess-commu…..tatus-Code

Thank you,

Simon.

Avatar
Randy Armstrong
Admin
Forum Posts: 1579
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
05/05/2022 - 10:47
sp_Permalink sp_Print

Quality Code are a concept from OPC Classic (COM DA).

They are an set of bits that is returned in addition to an HRESULT.

In OPC the HRESULT and Quality Code were combined in to the StatusCode.

You can convert from Quality Code/HRESULT to a StatusCode and back again.

Avatar
Simon de Kraa
The Netherlands
Member
Members
Forum Posts: 12
Member Since:
02/24/2022
sp_UserOfflineSmall Offline
3
05/05/2022 - 12:40
sp_Permalink sp_Print

Ah, I see!

I think I have found the document that talks about this:

https://reference.opcfoundatio…..rt8/A.4.3/

This seems a bit abstract to me. Are there any practical examples available that you know of?

Or a way to call this “COM UA Proxy” that is mentioned?

Avatar
Randy Armstrong
Admin
Forum Posts: 1579
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
05/05/2022 - 16:31
sp_Permalink sp_Print

That reference explains how to map between QualityCode and StatusCode.

GetQualityCode implements that mapping:
https://github.com/OPCFoundati…..omUtils.cs

Avatar
Simon de Kraa
The Netherlands
Member
Members
Forum Posts: 12
Member Since:
02/24/2022
sp_UserOfflineSmall Offline
5
05/05/2022 - 23:28
sp_Permalink sp_Print

If I look at the list of status codes in GetQualityCode() compared to the full (?) list that can be found here, it looks rather limited.

Is this because of this particular implementation or is there another reason?

Avatar
Randy Armstrong
Admin
Forum Posts: 1579
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
6
05/06/2022 - 06:01
sp_Permalink sp_Print sp_EditHistory

Not every StatusCode has a unique mapping and that should not be an issue.

All of the StatusCodes that are associated with quality of the data are mapped (see Part 8 and Part 11).

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 19
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1445
Posts: 4889