Contenuto principale

getIndexFromName

R2026b

Return OPC data with matching names

    Description

    ind = getIndexFromName(dObj,nodeName) returns the index of UA data object array dObj that matches the item ID.

    example

    Examples

    collapse all

    Load the OPC UA example data file and find the index of 'Square' and 'Sawtooth'.

    load opcSampleUaData;
    ind = getIndexFromID(uaDataSample,{'Counter','Sawtooth'})
    ind =
    
         1     3

    Input Arguments

    collapse all

    OPC UA data, specified as an OPC UA data object array. For more information, see Data.

    OPC UA node name, specified as a character vector or cell array of character vectors.

    Output Arguments

    collapse all

    Index of the specified data item, returned as a scalar or a vector.

    Version History

    Introduced in R2015b

    See Also

    Functions