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.

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:

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:

Arrays 1:

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