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 Strings.
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
get | opcqstr
 | opcqid | | opcqstr |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit