OPC-DA Qualities
This document describes the quality values that the OPC Router can output in the OPC client context as a Quality-String or Quality-ID. This overview serves as a reference for triggers and transfer objects when quality information is additionally provided or further processed.
Basics
In the OPC client environment, quality information is used to indicate whether a read value is valid, restricted, or erroneous.
The values listed here are based on the quality logic known from OPC DA, which uses fixed numerical base values. Additionally, runtime-related states may occur, which are provided by the OPC Router or the OPC library being used.
Quality Values
The following table contains the base values output by the OPC Router and their meanings.
| String | ID/Integer | Meaning |
|---|---|---|
| Timeout | -3 | Internal timeout state. No new valid value was delivered within the expected time. |
| NotInitialized | -2 | Internal initialization state. No usable quality information is yet available for the data point. |
| NotSpecified | -1 | No specific quality status is available. |
| bad | 0 | Poor quality without further specification. |
| badConfigurationError | 4 | Configuration error on the server or item. |
| badNotConnected | 8 | The data source or item is not connected. |
| badDeviceFailure | 12 | A device error was detected. |
| badSensorFailure | 16 | A sensor error was detected. |
| badLastKnownValue | 20 | Communication is disrupted, but the last known value is still available. |
| badCommFailure | 24 | Communication error. No valid current value is available. |
| badOutOfService | 28 | The item or group is out of service or inactive. |
| badWaitingForInitialData | 32 | Still waiting for the first valid data. |
| uncertain | 64 | Uncertain quality without further specification. |
| uncertainLastUsableValue | 68 | The last usable value is being passed. |
| uncertainSensorNotAccurate | 80 | The sensor is operating outside its accuracy range or is not correctly calibrated. |
| uncertainEUExceeded | 84 | The value lies outside the defined engineering unit limits. |
| uncertainSubNormal | 88 | The value comes from multiple sources, but there are not enough good sources available. |
| good | 192 | Good quality without any specific additional information. |
| goodLocalOverride | 216 | Good quality, but the value was locally overridden or forced. |
badWaitingForInitialData (32) as well as the negative values NotSpecified, NotInitialized, and Timeout are additional states that the OPC Router or the OPC library used may provide.
The OPC-DA specification also defines limit bits. This allows the numerical value of a base code to be increased by 1, 2, or 3: +1 = Low Limited, +2 = High Limited, +3 = Constant. These variants are not listed individually in the table.