QualityID

Quality of data value as 16-bit integer

Description

QualityID is a numeric indication of the quality of the daitem object's data value.

QualityID is a number ranging from 0 to 65535, made up of four parts. The high 8 bits of the QualityID represent the vendor-specific quality information. The low 8 bits are arranged as QQSSSSLL, where QQ represents the major quality, SSSS represents the quality substatus, and LL represents the limit status.

You use the opcqparts function to extract the four quality fields from the QualityID value. Alternatively, you can use the bit-wise functions to extract the fields you are interested in. For example, to extract the major quality, you can bit-wise AND the QualityID with 192 (the decimal equivalent of binary 11000000) using the bitand function, and shift the result 6 bits to the right using the bitshift function.

You use the opcqstr function to obtain the four quality fields from the QualityID value.

For more information, see OPC Quality.

QualityID is updated when you perform a read operation using read or readasync, or when a subscription callback occurs.

Characteristics

Access

Read-only

Applies to

daitem

Data type

double

Values

An integer from 0 to 65535. The default value is 28 (representing the quality 'Bad: Out of Service').