Arrays
In OPC UA, arrays are described for UA_Variable nodes using the ValueRank and ArrayDimensions attributes. The actual DataType always specifies the element type, for example Int32, Double or String.
ValueRank
ValueRank fixes whether a variable is a scalar or an array and how many dimensions the array has.
- -3: Scalar or one-dimensional array
- -2: any, i.e. scalar or array
- -1: Scalar, i.e. not an array
- 0: Array with one or more dimensions
- 1: one-dimensional array
- n: n-dimensional array
ArrayDimensions
ArrayDimensions describes the size of the individual dimensions.
The value is specified as a list of dimensions. The number of entries in ArrayDimensions should match the number of dimensions in ValueRank. If the size is not to be fixed, ArrayDimensions can be left empty or 0.
Examples:
- 0: n-dimensional array with any number of elements
- 10: one-dimensional array with 10 elements
- 3,4: two-dimensional array with 3 × 4 elements
- 2,5,8: three-dimensional array with 2 × 5 × 8 elements
The values can be edited in the Node Editor using the following elements. While the ValueRank only allows permissible values, the value itself must be checked for the ArrayDimensions:

Examples ValueRank and ArrayDimensions
ValueRank = -1 → Scalar, ArrayDimensions remains empty
ValueRank = 1 → one-dimensional array, e.g. ArrayDimensions = 10
ValueRank = 2 → two-dimensional array, e.g. ArrayDimensions = 3,4