opcuanode
R2026bCreate OPC UA node objects
Description
An opc.ua.Node object stores information about a node in an OPC
UA server. Each node has a NodeType property that determines its
purpose:
Objectnodes do not store data values, and you use them to navigate the server namespace.Variablenodes store data values such as sensor or actuator readings, and you read or write current and historical values using these nodes.Methodnodes behave as callable functions linked to objects, and you use them to run object-specific operations.
Creation
Description
creates an OPC UA node object or array of node objects using the namespace index and
identifier without associating the nodes with an OPC UA server. Each node object sets its
nodeList = opcuanode(index,id)Name property to 'index:id'. Other properties of
the node objects are marked as unknown until you associate the nodes
with an OPC UA server.
To associate the nodes with an OPC UA server, specify the client when using these
nodes with the writeValue or readValue function.
immediately associates the node object with the specified client
nodeList = opcuanode(index,id,uaClient)uaClient. If uaClient is connected at this time,
the function sets the properties of nodeList according to the server
connected to uaClient.
Tip
Create node objects with
opcuanodeonly when you know the namespace index and identifier of the nodes you are interested in.If you do not know the namespace index and identifier for the node, create node objects by browsing the namespace of a connected OPC UA client object with
browseNamespaceorgetNamespace, or browse theParentandChildrenproperties of existing node objects.
Input Arguments
Output Arguments
Properties
Object Functions
findNodeById | Find OPC UA server node by namespace index and identifier |
findNodeByName | Find OPC UA server nodes by name |
getAllChildren | Recursively retrieve all children of OPC UA server node |
getNodeAttributes | Read OPC UA server node attributes |
invoke | Execute method node on OPC UA server |
isEmptyNode | True for empty nodes of OPC UA node array |
isObjectType | Determine if nodes are object type |
isVariableType | Determine if nodes are variable type |
readAtTime | Read historical data from nodes of OPC UA server at specific times |
readHistory | Read historical data from nodes on OPC UA server |
readProcessed | Read aggregate data from nodes of an OPC UA server |
readValue | Read values from nodes on OPC UA server |
subscribe | Monitor nodes for data change notification |
writeValue | Write values to nodes on OPC UA server |
Examples
Version History
Introduced in R2015bSee Also
Functions
opcua|findNodeByName|findNodeById|browseNamespace|readValue|getNamespace|writeValue|invoke