GetQualityName

GetQualityName — converts the quality value of a point to a text string.

Synopsis

GetQualityName (quality)
    

Arguments

quality

A value that indicates the quality of the point, as returned by the function PointMetaData.

Returns

A text string corresponding to the quality.

Description

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.

[Note]

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 FlagHexDecString
OPC_QUALITY_BAD0x00Bad
OPC_QUALITY_UNCERTAIN0x4016Uncertain
OPC_QUALITY_GOOD0xc0192Good
OPC_QUALITY_CONFIG_ERROR 0x44Config Error
OPC_QUALITY_NOT_CONNECTED0x88Not Connected
OPC_QUALITY_DEVICE_FAILURE0xc12Device Failure
OPC_QUALITY_SENSOR_FAILURE 0x1016Sensor Failure
OPC_QUALITY_LAST_KNOWN0x1420Last Known
OPC_QUALITY_COMM_FAILURE0x1824Comm Failure
OPC_QUALITY_OUT_OF_SERVICE 0x1c28Out Of Service
OPC_WAITING_FOR_INITIAL_DATA 0x2032Waiting For Initial Data
OPC_QUALITY_LAST_USABLE 0x4468Last Usable
OPC_QUALITY_SENSOR_CAL0x5080Sensor Cal
OPC_QUALITY_EGU_EXCEEDED 0x5484EGU Exceeded
OPC_QUALITY_SUB_NORMAL0x5888Sub Normal
OPC_QUALITY_LOCAL_OVERRIDE0xd8216Local Override