Hi all,
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.
1 Like
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".
1 Like
Ok, thanks, that clarifies it.
Hi!
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.
0-3 Bad
4-7 Error_Configuration
8-11 Bad_NotConnected
12-31 Bad
32-35 Uncertain_InitialValue
36-63 Bad
64-67 Uncertain
68-71 Uncertain_LastKnownValue
72-83 Bad
84-87 Uncertain_EngineeringUnitsExceeded
88-91 Uncertain_DataSubNormal
92-191 Bad
192-195 Good
196-215 Bad
216-219 Good
220-255 Bad
256 Uncertain
257-299 Bad
300 Error_Configuration
301 Error_IO
302-309 Uncertain
310 Error_ExpressionEval
311 Error_DatabaseQuery
312 Bad_DatabaseNotConnected
313-319 Uncertain
320 Good_Provisional
321-329 Uncertain
330 Error_TagExecution
331-339 Uncertain
340 Error_TypeConversion
341-402 Uncertain
403 Bad_AccessDenied
404 Bad_NotFound
405 Bad_ReferenceNotFound
406-409 Uncertain
410 Bad_Disabled
411-499 Uncertain
500 Bad_Stale
501-699 Uncertain
700 Good_WritePending
701-899 Uncertain
1 Like
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
DataQuality.fromIntValue(someInt)
To get a corresponding quality instance. Note that not all possible OPC DA types are represented, I'm pretty sure:
https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.30/com/inductiveautomation/ignition/common/sqltags/model/types/DataQuality.html
2 Likes