GetQualityNameGetQualityName — converts the quality value of a point to a text string.
GetQualityName (quality)
qualityA value that indicates the quality of the point, as returned by
the function PointMetaData.
A text string corresponding to the quality.
This function converts the quality value of a point to a text string. The
function is created in the script Quality.g, and is
available to any DataHub script that requires or includes the
Quality.g file, using one of these statements:
require ("Quality");
include ("Quality");
The Quality.g file is located in the require folder of your
DataHub installation.
![]() | |
DataHub point information includes a data quality indication that is consistent with the OPC specification. Even if you are not working with OPC data, you may still wish to use the quality in your custom applications and DataHub scripts. |
The possible quality strings are:
| Quality Flag | Hex | Dec | String |
|---|---|---|---|
OPC_QUALITY_BAD | 0x0 | 0 | Bad |
OPC_QUALITY_UNCERTAIN | 0x40 | 16 | Uncertain |
OPC_QUALITY_GOOD | 0xc0 | 192 | Good |
OPC_QUALITY_CONFIG_ERROR | 0x4 | 4 | Config Error |
OPC_QUALITY_NOT_CONNECTED | 0x8 | 8 | Not Connected |
OPC_QUALITY_DEVICE_FAILURE | 0xc | 12 | Device Failure |
OPC_QUALITY_SENSOR_FAILURE | 0x10 | 16 | Sensor Failure |
OPC_QUALITY_LAST_KNOWN | 0x14 | 20 | Last Known |
OPC_QUALITY_COMM_FAILURE | 0x18 | 24 | Comm Failure |
OPC_QUALITY_OUT_OF_SERVICE | 0x1c | 28 | Out Of Service |
OPC_WAITING_FOR_INITIAL_DATA | 0x20 | 32 | Waiting For Initial Data |
OPC_QUALITY_LAST_USABLE | 0x44 | 68 | Last Usable |
OPC_QUALITY_SENSOR_CAL | 0x50 | 80 | Sensor Cal |
OPC_QUALITY_EGU_EXCEEDED | 0x54 | 84 | EGU Exceeded |
OPC_QUALITY_SUB_NORMAL | 0x58 | 88 | Sub Normal |
OPC_QUALITY_LOCAL_OVERRIDE | 0xd8 | 216 | Local Override |