OPC UA ServerVariableNode
OPC UA ServerVariableNode
In order to allow clients to read or write values in OPC UA server, variable nodes must be added to OPC-UA-Server.
Single-channel (of any CDP signal type) and/or multi-channel (of type string) ServerVariableNodes can be added to the OPC-UA-Server node tree for sending and receiving information.
Choose single-channel node to send or receive one channel (i.e signal) value per OPC UA node. Choose multi-channel (string) node send or receive many channel (i.e signal) encapsulated into one OPC UA node.
ServerVariableNode have the following configuration properties:
Property | Description |
---|---|
Type<string> | CDP value type of the node. Any CDP value type can be used to serve any OPC UA data type - value will be automatically converted, whenever possible. However, to avoid value loss in conversion, choose a compatible and best matching CDP value type for the ClientVariableNode. See also OPC UA Data Types. |
Input<bool> | Set to true for variables whose value must be controlled by CDP (routed) or false for variables whose value changes must be observed only. |
Bidirectional<bool> | If set, variable value is synced to OPC UA network and also back from OPC UA network despite of the Input property value. Set Bidirectional to true, when you need to control the variable value and also need to reflect the value changes received from OPC UA (eg. value changes made by clients), for example when routing the value to the GUI widget. |
UAType<string> | OPC UA data type of the node. Leave empty for CDP to choose best matching type. See also OPC UA Data Types. |
IsProperty<bool> | If set, the OPC UA variable node is an OPC UA property (otherwise it is an OPC UA datavariable) |
ServerVariableNode state can be observed at runtime via these read-only properties:
Property | Description |
---|---|
ServerTimestamp<string> | Timestamp when value was registered in server |
SourceTimestamp<string> | Timestamp when value was set by its source |
ServerVariableNodeChannelGroup
ServerVariableNodeChannelGroup has a Channel sub-element where multiple channels can be added into. These channels will then be used to receive or send the actual OPC UA value using translator of <istream> type (for incoming values) and <ostream> type (for outoing values), specified in Translator element. When no Translators are specified, default TextTranslator<istream> and TextTranslator<ostream> are used, that results sending and receives channel values in text format, line by line. Since this Channel sub-element can also contain ChannelGroups, complex tree-like structure can also be created. Channel-trees are most useful for JSONTranslator , where it will be used to send or receive channel values in JSON format.
ServerVariableNodeChannelGroup has also a ValueMap subelement that can be used to define transformations that will be done during translation between some CDP value to a corresponding OPC UA value and vice versa.
Multi-Dimensional Values
In OPC UA, variable values can be simple scalars but can also be complex, up to three-dimensional values. CDP supports accessing multidimensional values by following variable objects:
- ServerVariableNode1DArray - for a one-dimensional array (vector ie. value-list)
- ServerVariableNode2DArray - for a two-dimensional array (matrix ie. list of equally sized vectors)
- ServerVariableNode3DArray - for a three-dimensional array (cube ie. list of equally sized matrices)
See also OPC UA Arrays.
ServerMethodNode
As CDP is mostly signal oriented (not RPC method-call oriented) then OPC-UA-Server currently has very limited support for method nodes. ServerMethodNode can be added to OPC-UA-Server and invoked by clients but it does not invoke any code. The method simply takes input argument values and sends back output argument values. However, input and output argument values can be routed in CDP, just like any signal.
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.