We are on version 8.1.18.
We are starting to work with tag quality codes. We looked at the tag quality codes of our currently stored tags, and the codes don't seem to match the documentation.
We expected to see quality codes in the tag historian looking like: Quality Codes and Overlays - Ignition User Manual 8.1 - Ignition Documentation
But instead, we see different quality codes. Then we looked at the tag quality of our currently stored tags, and the codes also don't seem to match the documentation.
As you can see, the quality codes we see are 0, 500 and 600 (and sometimes others). 500 and 600 however, are not even defined in the docs. 500 could be a a quality code from Vision Quality Code Reference Table Tag Quality and Overlays - Ignition User Manual 8.0 - Ignition Documentation. We are not sure if that has something to do with it.
We found it strange no one else has posted it on the forum, so maybe we're doing something wrong. From our point of view, this looks like a bug.
I hope someone can help us explaining this.
It's not a bug, it's a bridge for backwards compatibility.
In 8.X, we replaced the quality codes used throughout the system with a new implementation to fix various issues. However, old data in tag history (and existing bindings in Vision) would still be using the old values, so to minimize the pain of upgrading data from new systems is migrated into an approximately equivalent 'legacy' quality code before being stored into the historian.
I'm not sure where that graphic might have migrated to in the 8.1 manual, but it's still an accurate reference for the quality code values you can expect to see in the historian.
Ok, thanks for your reply @PGriffith.
So what are the new quality codes then used for? What is the purpose if they are not really used?
And what does code 600 mean? It is in no documentation specified as a quality code.
They are used, all throughout Ignition. At two points (tag history data storage and Vision) they're converted to legacy values for backwards compatibility.
A code of 600 means "Unknown".
Ok, thanks, that clarifies it.
I am working with history from scrips and I hace come to the same issue as @louagejasper mentioned.
I made a map in order to make a converssion within my script, as Ignition does in tag historian and vision, and I realize that the codes correspond to OPC DA quality codes. Is this afirmation correct?
Thank you in advance.
PS: the following map shows the quality sub-code as an integer in the first column, and the quality code stored in the history database in the second one.
The original source of the legacy values was probably compatibility with OPC DA, yes.
If you're inside of Ignition, you can run:
from com.inductiveautomation.ignition.common.sqltags.model.types import DataQuality
To get a corresponding quality instance. Note that not all possible OPC DA types are represented, I'm pretty sure: