Glossary · Address space

Variable

In OPC UA, a Variable is the NodeClass that holds a value. Its Value attribute is a DataValue - value, StatusCode and timestamps - described by the DataType, ValueRank and ArrayDimensions attributes and governed by AccessLevel. Variables are what clients read, write, subscribe to and historise; everything else is structure.

The attributes that define a Variable

DataType names the DataType node the value conforms to. ValueRank and ArrayDimensions say whether it is a scalar, a fixed-size array or a matrix. AccessLevel and UserAccessLevel are bitmasks for readable, writable and history access, the second one after the current user's Role permissions are applied. MinimumSamplingInterval tells you the fastest rate the server can actually sample the source, and Historizing whether history is being collected.

DataVariables and Properties

Two roles exist, distinguished only by the reference that reaches the Variable. A DataVariable, reached by HasComponent, is process data: a temperature, a counter, a state. A Property, reached by HasProperty and typed PropertyType, is metadata about its parent: EngineeringUnits, EURange, a serial number. Properties are leaves - they must not have DataVariable children - and are typically static, so subscribing to them at a 100 ms interval wastes server resources.

Typed Variables in Part 8

Data Access adds the VariableTypes that make analogue data self-describing: AnalogItemType with EURange and EngineeringUnits properties, AnalogUnitType, DiscreteItemType and its two-state and multi-state variants. A client that reads these properties can render 42.5 degrees C with a valid range of 0 to 100 instead of a bare double, which is exactly what opcua-commander does.

Example

The attributes of one AnalogItemType Variable as UaExpert shows them

NodeId               ns=4;s=Mixer_01.Temperature
NodeClass            Variable
BrowseName           4:Temperature
DataType             Double            (ns=0;i=11)
ValueRank            -1                (Scalar)
ArrayDimensions      null
AccessLevel          CurrentRead | HistoryRead
UserAccessLevel      CurrentRead
MinimumSamplingInterval  100 ms
Historizing          true
Value                42.5
  StatusCode         Good (0x00000000)
  SourceTimestamp    2026-09-07T08:14:22.310Z
  ServerTimestamp    2026-09-07T08:14:22.318Z

HasTypeDefinition -> AnalogItemType
HasProperty       -> EURange        { Low = 0, High = 100 }
HasProperty       -> EngineeringUnits  EUInformation, UNECE code for degree Celsius
The mistake people make: Writing a value whose Variant type does not exactly match the node's DataType attribute. Int16 into an Int32 node, a scalar into a one-element array node, or a Double into a Float node all return BadTypeMismatch - servers are not required to coerce. Read the DataType, ValueRank and ArrayDimensions attributes first and build the Variant to match.

Defined in: Part 3 - Address Space Model, Variable NodeClass and its attributes; Part 8 - Data Access for AnalogItemType and the discrete item types.

Last verified 7 September 2026 against OPC UA 1.05.07. OPC UA Connect is an educational resource and is not affiliated with the OPC Foundation.

Free download
OPC UA Server Acceptance Test Pack
A 40-check acceptance test you run against a vendor's server before commissioning sign-off. Weighted scoring, three hard gates, and a one-page verdict for the supplier meeting.
Get the free test pack →
Free, no course, no login