Arrays and index method

The definition of a V.E. variable by means of the index method contains the following attributes. They define the memory layout and size: INDEX, SIZE and ARRAY_ELEMENTS.

Example:

var[4].name Auto
var[4].index 2 (Identifier of the index method)
var[4].type UNS16
var[4].size 2
var[4].array_elements 3

The number of elements in an array variable is set via the array_elements parameter. If the variable is not an array, the value must be array_elements=0 or can be dropped entirely. Each array element's memory requirement (in bytes) is specified via the .size parameter. For single elements the .size parameter is not relevant, but it must be specified in the case of arrays.

Example: the V.E. variable "Auto" is of the UNS16 type. If it is to be used in an array, the attribute var[4].size must be set to 2. If it is not used in an array, the ".size" attribute is superfluous.

Notice

Contrary to the description of functions entitled "External variables in the NC, Rev. 8, Page 13", the export algorithm described here does not allow you to set any values in var[?].size.

The number of index values (corresponding to assigned index blocks) needed for a variable is calculated in accordance with the specified formula:

Required number of index values = (Arrays and index method 1:) (rounded up to an integer)