This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

findNodeByName (opcua)

Find nodes by name


FoundNodes = findNodeByName(NodeList,NodeName)
FoundNodes = findNodeByName(NodeList,NodeName,'-once')
FoundNodes = findNodeByName(NodeList,NodeName,'-partial')
FoundNodes = findNodeByName(NodeList,NodeName,'-once','-partial')


FoundNodes = findNodeByName(NodeList,NodeName) searches the descendants of NodeList for all nodes whose Name property matches NodeName. The search among all nodes, including NodeList, is not case sensitive.

FoundNodes = findNodeByName(NodeList,NodeName,'-once') stops searching when one node has been found.

FoundNodes = findNodeByName(NodeList,NodeName,'-partial') finds all nodes that start with NodeName.

FoundNodes = findNodeByName(NodeList,NodeName,'-once','-partial') finds only the first partial match.

This function might query the server for further descendants (children) of NodeList.


Find the ServerCapabilities node from the server node.

UaClient = opcua('localhost',51210);
serverNode = findNodeByName(UaClient.Namespace,'Server','-once');
capabilitiesNode = findNodeByName(serverNode,'ServerCapabilities')
capabilitiesNode = 
OPC UA Node object:
                      Name: ServerCapabilities
               Description: Describes capabilities supported by the server.
            NamespaceIndex: 0
                Identifier: 2268
                  NodeType: Object

                    Parent: Server
                  Children: 14 nodes.

See Also


Introduced in R2015b