Main Content


Indices matching OPC HDA data item IDs


ind = getIndexFromID(dObj,'itemID')
ind = getIndexFromID(dObj,idCell)


ind = getIndexFromID(dObj,'itemID') returns the index of HDA data object array dObj that matches the item ID 'itemID'.

ind = getIndexFromID(dObj,idCell) returns the indices of HDA data object array dObj that match the item IDs contained in the cell array idCell. idCell must be a cell array of character vectors.


Load the OPC HDA example data file and find the index of 'Item Example.Item.2':

load opcSampleHdaData;
ind = getIndexFromID(hdaDataVis,'Example.Item.2');