Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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)

See Also

Functions

Introduced before R2006a

Was this topic helpful?