As an alternative to configuring a node in the Node tab, the node properties can be passed as a struct
to this parameter. The Extended Node
Configuration parameter must be selected for this
purpose. Define an array of struct for reading multiple nodes. The
required struct elements are:
Namespace (see Namespace parameter)
IdentifierType (see Identifier Type parameter)
Identifier (see Identifier parameter)
Dimension: The dimension(s) of the node. Possible values
are
1 for scalar values
n for vectors
[m, n] for 2D-arrays
DataType: The data type of the node. Must be passed as a
character array. Possible options are: double, single,
uint32, int32, uint16, int16, uint8, int8, boolean
SamplingInterval: The interval at which the remote server
should check for value changes. Required if the Create
Subscription parameter is selected.
You can create the struct in the base workspace, the model workspace
or in a data dictionary and pass the variable name to the mask
parameter. Example:
Nodes(1).Namespace = 1;
Nodes(1).IdentifierType = 'Numeric';
Nodes(1).Identifier = 2081;
Nodes(1).Dimension = 1;
Nodes(1).DataType = 'uint8';
Nodes(1).SamplingInterval = 100;
Nodes(end+1).Namespace = 2;
Nodes(end).IdentifierType = 'String';
Nodes(end).Identifier = 'Speed';
Nodes(end).Dimension = 10;
Nodes(end).DataType = 'single';
Nodes(end).SamplingInterval = 100;
Nodes(end+1).Namespace = 2;
Nodes(end).IdentifierType = 'String';
Nodes(end).Identifier = 'Torque';
Nodes(end).Dimension = [3,4];
Nodes(end).DataType = 'double';
Nodes(end).SamplingInterval = 100;
As an alternative, you can directly define the struct in the mask
parameter. Example:
[struct('Namespace',1,'IdentifierType','Numeric','Identifier',2081,'Dimension',1,'DataType','uint8','SamplingInterval',100), ...
struct('Namespace',2,'IdentifierType','String','Identifier','Speed','Dimension',10,'DataType','single','SamplingInterval',100), ...
struct('Namespace',2,'IdentifierType','String','Identifier','Torque','Dimension',[3,4],'DataType','double','SamplingInterval',100)]
It is not possible to define init values for the Data output port or the value element in the data bus.
Instead, 0 is indicated in all data elements when the real-time
application starts. If an init value is required, place a dedicated Read
block for the specific node and use the Node tab for configuration.