Main Content

getIndexFromID

Indices matching OPC HDA data item IDs

Syntax

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

Description

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.

Examples

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

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