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.

browseNamespace (opcua)

Graphically browse name space and select nodes from server

Syntax

NodeList = browseNamespace(UaClient)
NodeList = browseNamespace(UaClient,Nodes)

Description

example

NodeList = browseNamespace(UaClient) opens the Browse Name Space dialog box for OPC UA client object UaClient. Using this browser, you can construct a list of nodes, and return an array of those nodes in NodeList. You can use NodeList to retrieve data for those items using read, readHistory, readProcessed, readAtTime, or readModified.

The name space is retrieved from the server incrementally. UaClient must be connected when you call this function.

example

NodeList = browseNamespace(UaClient,Nodes) allows you to specify an initial list of Nodes to be supplemented. If you cancel the browsing by pressing the Cancel button, then NodeList will be empty.

Examples

collapse all

This example shows how to create a list of nodes from the OPC UA name space. After selecting the nodes you want in the dialog box, click OK.

s = opcuaserverinfo('localhost');
UaClient = opcua(s);
connect(UaClient);
NodeList1 = browseNamespace(UaClient)

This example shows how to add to a list of nodes from the OPC UA name space. The Browse Name Space dialog box opens with the nodes of NodeList1 already selected.

s = opcuaserverinfo('localhost');
UaClient = opcua(s);
connect(UaClient);
NodeList1 = browseNamespace(UaClient)

% Some time later
NodeList2 = browseNamespace(UaClient,NodeList1)

Input Arguments

collapse all

OPC UA client specified as an OPC UA client object

List of nodes returned as an array of node objects. For information on node object functions and properties, type

help opc.ua.Node

Output Arguments

collapse all

List of nodes returned as an array of node objects. For information on node object functions and properties, type

help opc.ua.Node

Introduced in R2015b

Was this topic helpful?