Declaration of function block instances or class instances in ST
Syntax |
---|
|
Meaning | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
declaration of one or more →function block instances, The declaration of more sections of this kind is allowed. The declaration is possible within the declaration of a →program or of a →function block. Providing the optional keyword Use the optional keywords for visibility to define the visibility of all elements of this section. These keywords are possible within the declaration of a function block only.
An existing →function block (created in →ST, →FBD or →LD) is possible as type for a function block instance. When declaring a function block instance within the section Moreover, it is possible to declare function block instances with one- or multi-dimensional arrays (this is similar to "Declaration of an ARRAY data type in ST" as well) or by means of structure elements (see "Declaration of a structured data type in ST").
|
Good to know |
---|
Moreover, Neuron Power Engineer allows you to define a not yet fully specified location for the declaration. See "Declaration of a language element with partial address in ST" for details. Moreover, Neuron Power Engineer allows you to specify additional data for the declaration. See "Defining description, comment, JSON string or type for variables or data types" for details. |
Examples |
---|
|
Example for the declaration of a function block instance incl. its initialization -- one of its inputs is declared by using a structure data type |
---|
|