This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Extract quality parts from OPC quality ID


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


[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.


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');
grp = addgroup(da);
itm = additem(grp,'Random.Qualities');
[quality,substatus,limit] = opcqparts(itm.QualityID)

See Also


Introduced before R2006a