Additional quality data saved to the historian
- Last UpdatedJul 01, 2024
- 2 minute read
The Historian also has two additional data quality fields (quality and quality detail) that are non-OPC compliant. Both fields are stored with each record in addition to the OPC quality. The Historian maps the value of these fields in a manner consistent with its quality definition for those fields. The values of those fields are driven by the OPC quality sent by Application Server. For example, an OPC Good quality results in the Historian quality detail of Good.
Historian Quality is a 1-byte flag that summarizes the quality of the associated data value in the packet sent by Application Server. Historian Quality is an enumerated type with the following values:
|
Hex |
Decimal |
Name |
Description |
|---|---|---|---|
|
0x00 |
0 |
Good |
Good value. |
|
0x01 |
1 |
Bad |
Value was marked as invalid. |
|
0x10 |
16 |
Doubtful |
Value is uncertain. Only fabricated at retrieval time. |
|
0x85 |
133 |
Initial Value |
(Good) Initial value for a delta request. |
OPC Qualities from Application Server result in storage of a Historian Quality as follows:
|
OPC quality (substatus form) |
Historian quality decimal (1-byte) |
|---|---|
|
Good (any) |
0 - Good |
|
Bad (any) |
1 - Bad |
|
Bad (Initializing form) |
1 - Bad |
|
Uncertain (any) |
0 - Good |
Historian QualityDetail contains the detail of data quality as a 32-bit value. QualityDetail is derived from OPC quality. Each source is allocated a byte position within the QualityDetail 32-bit word, which is formatted as:
0xXXRRDDDD
Only the low-order two bytes (DDDD) are mapped to OPC quality for data sent by Application Server and saved to the historian:
|
OPC quality (any substatus form) |
Results in any one of these Historian quality details |
|---|---|
|
Good (any) |
192 - Good value 150 - Initial value (good) 151 - Initial store/forward value (good) 252 - First value received (good) 44 - First good value received by storage after the connection to HCAL has been restored. 248 - First value in the second stream during a store-and-forward. |
|
Bad (any) |
24 (DAServer disconnect) |
|
Bad (Initializing form) |
24 (DAServer disconnect) |
|
Uncertain (any) |
192 |