Structure Init
With this function block it is possible to create a user defined data structure and provide them for further use in the program.
All basic elements are combined in one structure and provided at output Y as data type. Through the inputs, initial values can be assigned to all basic elements. It is possible to provide up to eight input signals for initialization of the data structure.
Parameters
The data type can be selected in the parameter dialog. 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 | Typ(en) | Funktion |
---|---|---|---|
X0 | I | Data type independent | Items of the data structure |
... | |||
X7 | I | Data type independent | Items of the data structure |
Y | O | User defined data type | 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 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 to create and initialize a user defined data structure which is then used by further function blocks.