Array Set

The Array Set action sets the value of an array element(Scalar mode) or a series of array elements(Array mode), based on an index. The result of the array update, the entire array with an updated element value, is returned as a separate output variable.


Parameter descriptions

The action provides these parameters:

Parameter Description
Array Data Type The data type of the array elements. The list of the available data types for the node. For example, BYTE, WORD, DWORD, or INT1, INT2, INT4 and so forth.
Array Size The number of elements in the array.
Length
If you select BINARY or STRING as the array data type, the Length parameter becomes available.

The value is the length to use for each string or binary data element.

Input tab

Parameter Description
Array The source array (the first element) is entered in the Value column.
The result of the Array Set action is copied from the internal replica of the source array to the destination array.
If you want to update a source array directly with the value specified, then the Output tab Array parameter should be set to the same device variable as the Input tab Array parameter.
Index
The array index element value to be set. Array indexes start at zero.
Value
The value to be copied into the array element. If you selected Array as the Mode, then you will be able to provide multiple values. For example: Count: 3, Value:1,2,3.
Count The number of elements to be set from the specified Index.

Output tab

Parameter Description
Array
Specifies the destination array that stores the result of the Array Set action.
The result of the Array Set action is copied from the internal replica of the source array to the destination array.
If you want to update a source array directly with the value specified, then the Output tab Array parameter should be set to the same device variable as the Input tab Array parameter.