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.

getIDFromName

Translate OPC HDA aggregate type or item attribute name to numeric identifier

Syntax

ID = getIDFromName(Obj,NameStr)

Description

ID = getIDFromName(Obj,NameStr) returns the ID associated with the aggregate type or attribute item name NameStr. If NameStr is an array, ID is a vector of IDs.

Examples

Retrieve the ID of the TIMEAVERAGE item attribute provided by the Matrikon™ Simulation Server.

hdaObj = opchda('localhost','Matrikon.OPC.Simulation');
connect(hdaObj);
descID = getIDFromName(hdaObj.Aggregates,'TIMEAVERAGE')

Retrieve the ID of the DESCRIPTION item attribute provided by the Matrikon Simulation Server.

hdaObj = opchda('localhost','Matrikon.OPC.Simulation');
connect(hdaObj);
descID = getIDFromName(hdaObj.ItemAttributes,'DESCRIPTION')

See Also

Functions

Was this topic helpful?