You can insert calls for existing functions (FC) and function blocks (FB) using a drag-and-drop operation from the project tree. If you call function blocks from other function blocks, you can either call them as a single instance, multi-instance or parameter instance.
See also: Basics of instances
Requirement
-
A network is available.
-
The block that is to be called is available.
Inserting a call of a function (FC)
To insert a call of a function (FC) into a network using a drag-and-drop operation, follow these steps:
-
Drag the function from the project tree to the required network.
Inserting a call for a function block (FB)
To insert a call for a function block (FB), follow these steps:
-
Drag the function block from the project tree to the required network.
The "Call options" dialog opens.
-
In the dialog, enter whether you want to call the block as a single, multi or parameter instance.
-
If you click on the "Single instance" button, you will have to enter a name in the "Name" text box for the data block that you want to assign to the function block.
If you call a block that contains monitoring, assign a ProDiag function block to the monitoring functions in the "ProDiag FB" text box.
-
If you click on the "Multi-instance" button, you will have to enter the name of the tag in the "Name in the interface" text box; this is the name that you use to enter the called function block as a static tag in the interface of the calling block.
-
If you click on the "Parameter instance" button, enter the name of the in/out (InOut) parameter to which the instance should be passed during runtime in the "Name in the interface" text box.
-
-
Confirm your entries with "OK".
Result
The function or the function block is inserted with its parameters. You can then assign the parameters.
See also: Parameter transfer at block call
|
Note If when calling a function block you specify an instance data block that does not exist, it will be created. |