Structure Set

This function block is used to (over)write the elements of a user defined data structure.

The data structure is connected to the input X. The new values for the items of the structure can be given by the inputs X0 to X7. After overwriting the items with a new value the data structure will be written back to the input signal X. There can be at most eight inputs to set the values of the items.

Parameters

In the parameter dialog the data type can be selected. By right-clicking into the dialog area, it is possible to add elements to the structure, which creates a new input for that item.

Signals

Name I/O Type(s) Function
X I/O User defined data type Date structure
X0 I Data type independent Items of the data structure
...      
X7 I Data type independent Items of the data structure

Visualization

The function block changes its size according to the number of inputs. The name of the items will be displayed directly in the symbol.

Comment

In Online mode the items are set one by one, starting with the first one on top. If the same item is defined for different inputs, the last assignment overwrites the ones before.

Pay attention to the sequence of the block numbers.

Example

The following example shows how a user defined data structure type LRECT is first defined with the initial values 1; 10; 1; 10 and then the items are set with the new values 10; 20; 10; 20.