OPC UA ClientVariableNode
OPC UA ClientVariableNode
In order to receive or send data in OPC UA, variable nodes must be used.
Note: CDP Studio has a discovery functionality included. By using discovery you can easily find remote server node structure and variable types and create best matching OPC-UA-Client variable node configuration. See also OPC UA Server Discovery.
Single-channel (of any CDP signal type) and/or multi-channel (of type string) ClientVariableNodes can be added to OPC-UA-Client 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.
ClientVariableNode have the following configuration properties:
Property | Description |
---|---|
Type<string> | CDP value type of the node. Any CDP value type can be used to access 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. Note: Input property in CDP is always considered from CDP point of view (ie. not from OPC UA client point of view). |
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 server or other clients), for example when routing the value to the GUI widget. |
ChangeMonitoring<bool> | Set to false when node value change monitoring (and publishing) for the node is not needed. Defaults to true. |
PublishingInterval<double> | Interval (in milliseconds) at which server has to send data to client. Component process period is used when PublishingInterval is set to 0. Note: ClientVariableNode creates OPC UA monitoring item under one, shared OPC UA subscription for all ClientVariableNodes that have the same PublishingInterval. |
ClientVariableNode state can be observed at runtime via these read-only properties:
Property | Description |
---|---|
UAType<string> | OPC UA data type of the node. 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) |
MinimumSamplingInterval<double> | Minimum interval (in milliseconds) at which the server is checking data source for changes |
ServerTimestamp<string> | Timestamp when value was registered in server |
SourceTimestamp<string> | Timestamp when value was set by its source |
ClientVariableNodeChannelGroup
ClientVariableNodeChannelGroup 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.
ClientVariableNodeChannelGroup 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 ClientVariableNodes
In OPC UA node variable values can be simple scalars but can also be complex, up to three-dimensional values. CDP supports accessing these multidimensional values by following objects:
- ClientVariableNode1DArray - for a one-dimensional array (vector ie. value-list)
- ClientVariableNode2DArray - for a two-dimensional array (matrix ie. list of equally sized vectors)
- ClientVariableNode3DArray - for a three-dimensional array (cube ie. list of equally sized matrices)
See also OPC UA Arrays.
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.