Documentation search search close
CONTENTS
https://www.speedgoat.com/help/slrt/page/icon_documentation.jpg
v10.0.1.x for R2026a
View other versions

OPC UA - Server Node

OPC UA - Server Node — Adds OPC UA nodes to the server's address space

Library

Simulink Real-Time - Speedgoat

Description

This block is used to add OPC UA nodes, such as objects and variables to the server's address space. The block provides an interface to configure, read and write the node. Your model can contain multiple OPC UA Server Node blocks for each OPC UA Server in your target machine.

Ports

Inputs
Data

This port is used to write data to the OPC UA node defined. Fundamental data types from boolean to double are supported as well as dimensions from scalar values to 2D-arrays. If the Init Value parameter is empty, the OPC UA node inherits the data type and the dimensions from the connected source block.

The port is only visible if the Node Type parameter is Variable and the Operation parameter is Write. The port's label is only visible if the Extended Interface parameter is selected.

Enable

If enabled by the Extended Interface parameter, the block updates the node's data with the signal connected to the Data input port as long as the Enable input port is TRUE.

If disabled, the block updates the node's data on each sample hit, according to the Sample Time parameter, and without checking data changes.

Best practice is to set the block's sample time to a higher rate (like the model's base sample time) and trigger the Enable input port at a lower rate or once for certain events. You could also connect this port with the output port of a Detect Change block and connect the input port with your data to be written. This ensures that data from external write operations is not periodically overwritten.

Outputs
Data

This port is used to read data from the OPC UA node defined. Fundamental data types from boolean to double are supported as well as dimensions from scalar values to 2D-arrays. If the Init Value parameter is empty, the OPC UA node inherits the data type and the dimensions from the connected sink block.

The port is only visible if the Node Type parameter is Variable and the Operation parameter is Read. The port's label is only visible if the Extended Interface parameter is selected.

Parameters

Station ID

Apply the Station ID of the corresponding Setup block. Must range between 0 and 65535.

Node Class

Select the class of the new node. The options are:

  • Object

  • Variable

Objects do not have a value. They just organize a quantity of variables. Use the Node Identifier and Parent Identifier parameters to create relations between objects and variables and to finally build up a tree of nodes.

With regards to the OPC UA standard, objects are always type BaseObjectType whereas variables are type BaseDataVariableType.

Namespace

Defines the namespace index to which the node should be added. Supported values are 0 to 255. By default, you can assign nodes to the namespaces 0 and 1. Increase the Number Of Additional Namespaces parameter in the OPC UA Server Setup block mask to define additional namespaces.

Node Identifier Type

An OPC UA node is represented by its node identifier in the corresponding namespace. The node identifier must be unique within the namespace and can be of type Numeric, String, GUID and Opaque.

Node Identifier

The format of the node identifier varies depending on the Node Identifier Type parameter. Examples:

  • Numeric

    5
  • String

    'myNodeID'
  • GUID

    'BAEAF004-1E43-4A06-9EF0-E52010D5CD10'
  • Opaque

    'ABC123'

When passing a character array that contains special characters such as " or \ , ensure that you place the so-called escape character \ before the special character. Examples:

Type

'\"Program1\".\"Function2\".\"Variable3\"'

for node identifier

"Program1"."Function2"."Variable3"

Type

'Program1\\Function2\\Variable3'

for node identifier

Program1\Function2\Variable3
Parent Identifier

This is the identifier of the parent node in the OPC UA address space. The format must be the same as for the Node Identifier parameter, according to the selected Node Identifier Type. You can easily build up a structured node tree from the structure of your model just by using block names and subsystem names as node identifiers and parent identifiers. Discover the OPC UA product examples and learn how to map the model structure to the OPC UA node tree structure.

If you want to add nodes to the server's root node, enter an empty character array or an empty numeric array, depending on the Node Identifier Type parameter.

Browse Name

The browse name of the OPC UA node as character array. This name is another attribute of the node used for localization by the remote client. As browsing the server's address space is based on browse paths (starting node + relative path), the browse name does not have to be unique in the corresponding namespace.

Display Name

The display name of the OPC UA node as character array. Remote clients typically read this attribute and display it in a user interface.

Description

The description of the OPC UA node as character array. Remote clients typically read this attribute and display it in a user interface.

Init Value

The default value of the OPC UA node when the server starts to communicate (before it is overwritten by the remote client or by the block's input port). The data type and dimensions of the value you enter define the data type and dimensions of the OPC UA node to be created. The parameter further defines the data type and dimensions of the input and the output ports. Fundamental data types from boolean to double are supported as well as dimensions from scalar values to 2D-arrays. If no init value is specified, the node's data type and dimensions are inherited from the connected source and sink blocks.

The parameter is only visible if the Node Type parameter is Variable.

Interpret vector parameters as 1-D

When you select this check box, the block interprets the Init Value parameter as a vector of length N, provided the parameter evaluates to an N-element row or column vector. When you clear this check box, the block interprets the Init Value parameter as a matrix of dimension 1-by-N or N-by-1.

The parameter is only visible if the Node Type parameter is Variable.

Access Level

This parameter defines the permission level for remote clients. Clients can only read, only write, read and write, or have no access at all.

The parameter is only visible if the Node Type parameter is Variable.

Operation

This parameter defines the local operation on the node's value. You can read the value, write the value or do both. Write enables the input port. Read enables the output port.

The parameter is only visible if the Node Type parameter is Variable.

Extended Interface

If selected, the block shows the Enable input port. Otherwise, the port is hidden.

The parameter is only visible if the Node Type parameter is Variable.

Sample Time

Defines the base sample time at which this driver block gets its sample hit. This parameter can also be set to -1 for inherited sample time. The units are in seconds.