Main Content

opcqparts

Extract quality parts from OPC quality ID

Syntax

[MajorQual,Substatus,Limit,Vendor] = opcqparts(QualityID)

Description

[MajorQual,Substatus,Limit,Vendor] = opcqparts(QualityID) extracts the major quality, the quality substatus, the limit status, and the vendor-specific quality information fields, given the daitem object QualityID property value.

The QualityID is a double value 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.

For more information on quality values, see OPC Quality.

Examples

Extract the major quality, substatus, and limit status of the item Random.Qualities on the Matrikon™ OPC Simulation Server:

da = opcda('localhost','Matrikon.OPC.Simulation');
connect(da)
grp = addgroup(da);
itm = additem(grp,'Random.Qualities');
[quality,substatus,limit] = opcqparts(itm.QualityID)

Version History

Introduced before R2006a

See Also

Functions