Array IEC type mapping

In IEC programs arrays can be defined as variables.

In principle, these IEC arrays can also be mapped directly to OPC UA variables, whereby the OPC UA variable reveals the structure of the array via additional properties.

According to the PLCopen Companion Specification, an OPC UA array node has the following additional properties:

  • Dimensions

  • IndexMax

  • IndexMin

The following describes how IEC arrays are represented and accessed in the Lenze OPC UA information model.

The option can be selected via the parameter [0x2471:051]. For this, see also in Server information modeling.

Array Expansion enabled [1] (default)

Each IEC array element is represented as a separate node in the OPC UA information model. Especially older OPC UA clients only support this access option.

The advantage of this option is that especially older OPC UA clients only support this access option. In addition, a targeted reading and writing to an array element is possible.

The disadvantage of this option is that the information model becomes very complex and, depending on the array size, a corresponding number of nodes is required.

IEC variable = myArray : ARRAY [0..9] OF INT;

Required number of nodes = 14 (1 for the array itself and 3 for the properties and 10 for the array elements)

Array Expansion disabled [0]

Here the entire array is represented only as a central node with its properties. The individual array elements [0], [1], ... [n] are not available in the OPC UA information model as separate nodes.

The advantage of this option is a minimization of the required OPC UA nodes in the information model and thus a lower complexity.

The disadvantage of this option is the handling and interpretation of the central array node on client side. This is defined in Part 4 Services of the OPC UA specification.

Ein Bild, das Text enth-lt.

Automatisch generierte Beschreibung

IEC-Variable = myArray : ARRAY [0..9] OF INT;

Required number of nodes = 4 (1 for the array itself and 3 for the properties)

The OPC UA array size is taken over automatically from the PLC variable. The maximum array size of a PLC variable which can be published is 3 dimensions and 65536 elements in sum (over all dimensions).