• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Products
    • Automation Designer
    • HMI Designer
    • Maritime HMIs
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Protocols - OPC UA I/O
  • OPC UA ServerVariableNode
  • 5.0.0

OPC-UA-Server EventsToOPC-UA

OPC UA ServerVariableNode

OPC UA ServerVariableNode

In order to allow clients to read or write values in the OPC UA server, variable nodes must be added to the 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 a single-channel node to send or receive one channel (i.e. signal) value per OPC UA node. Choose a multi-channel (string) node to send or receive many channels (i.e. signals) encapsulated into one OPC UA node.

ServerVariableNode has the following configuration properties:

PropertyDescription
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, the variable value is synced to the OPC UA network and also back from the OPC UA network despite 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 (e.g. 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 the 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 data variable).

Note: The AccessLevel property of the single-channel scalar (i.e. non-array) ServerVariableNodes and variables having custom data type will be adjusted automatically at startup based on the Input and Bidirectional properties:

  • When Bidirectional=0 and Input=1, the AccessLevel W - write bit will be removed, thus the variable will be read-only for clients.
  • When Bidirectional=0 and Input=0, the AccessLevel R - read bit will be removed, thus the variable will be write-only for clients.

That also means that with Bidirectional=1, the AccessLevel will be kept untouched (i.e. as configured).

ServerVariableNode state can be observed at runtime via these read-only properties:

PropertyDescription
ServerTimestamp<string>Timestamp when the value was registered in the server.
SourceTimestamp<string>Timestamp when the value was set by its source.

ServerVariableNodeChannelGroup

ServerVariableNodeChannelGroup has a Channel sub-element where multiple channels can be added. These channels will then be used to receive or send the actual OPC UA value using a translator of <istream> type (for incoming values) and <ostream> type (for outgoing values), specified in the Translator element. When no Translators are specified, default TextTranslator<istream> and TextTranslator<ostream> are used, which results in sending and receiving channel values in text format, line by line. Since this Channel sub-element can also contain ChannelGroups, a 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 also has a ValueMap sub-element 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 the following variable objects:

  • ServerVariableNode1DArray - for a one-dimensional array (vector i.e. value-list)
  • ServerVariableNode2DArray - for a two-dimensional array (matrix i.e. list of equally sized vectors)
  • ServerVariableNode3DArray - for a three-dimensional array (cube i.e. list of equally sized matrices)

See also OPC UA Arrays.

Variables of OPC UA Custom Data Types

In addition to variables of OPC UA built-in data types, variables of custom data types can also be added to the OPC-UA-Server. See in more detail what custom data types are and how to configure them at OPC UA Custom Data Types.

ServerMethodNode

As CDP is mostly signal-oriented (not RPC method-call oriented), the OPC-UA-Server currently has very limited support for method nodes. ServerMethodNode can be added to the 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.

OPC-UA-Server EventsToOPC-UA

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2025 CDP Technologies. Privacy and cookie policy.

Return to top