Introduction
You have the following options to open FFBs (Elementary Function, Elementary Function Block, Derived Function Block, Procedure):
You can enter the call like you enter any text (for syntax, see Calling FFB sections in the Reference manual),
you can use the function input assistants,
or
you can enter the FFB to the section using the drag & drop method.
Calling a function block using the function input assistant
Process the following steps to call a function block (elementary or derived) with the function input assistant:
Step |
Action |
---|---|
1 |
Place the cursor at the target position. Note: No text may be selected in the section. The following positions are possible:
|
2 |
Open the function input assistant using:
Result: The function input assistant will be opened. ![]() |
3 |
In the an FFB selection window. line click the button , to openResult: The FFB selection dialog box is opened. ![]() |
4 |
Select the library and family from the column which contains the desired function block.Tip: If you do not know where to find the FFB you are looking for select the , entry to see a list of all the FFBs available independently of their libraries. |
5 |
Select the desired function block from the column.Example: ![]() |
6 |
Confirm the selection with .Result:
![]() |
7 |
The number of inputs can be increased with some elementary functions. (You find out which functions can be expanded by referring to the descriptions for the individual functions.) Expandable pins can be recognized from the following display: ![]() To add further pins select the last pin in the structure and press . |
8 |
Double-click the cell of the first parameter and enter the name of the variable/address or an expression to be used.You have the following options to enter the variable/address:
Assign all parameters of the function block a variable/address in this way. Example: ![]() |
9 |
Confirm the entries using the button.Result: The function block call is inserted into the IL section and a syntax and semantics check is performed. Example: ![]() |
Calling a function or procedure using the function input assistant
Calling a function or procedure using the function input assistant is identical in principle to calling a function block. The only difference is the absence of an instance name (step 6 of the procedure Calling a function block using the function input assistant).
Remarks
Some complex FFBs provide additional windows for entering parameters. Access to this window is gained using the Special Assistant button that appears at the bottom of the window.
Calling a function block instance using the function input assistant
Process the following steps to select a block instance that has already been declared:
Step |
Action |
---|---|
1 |
Place the cursor at the target position. |
2 |
Open the function input assistant using:
Result: The function input assistant will be opened. ![]() |
3 |
In the an FFB selection window. click the button , to openResult: The dialog box for selecting function block instances is opened. ![]() |
4 |
Select the desired block instance from the column and confirm the selection with .Result:
![]() |
5 |
Double-click the cell of the first parameter and enter the name of the variable/address to be used.You have the following options to enter the variable/address:
Assign all parameters of the function block a variable/address in this way. Example: ![]() |
6 |
Confirm the entries using the button.Result: The function block call is inserted into the IL section and a syntax and semantics check is performed. If the variables are not declared yet a red wavy line under the name is used to identify them. Example: ![]() |
7 |
Declare all variables in the Data Editor or directly in the IL section. Result: The red wavy line under the variable name disappears. |
Changing the actual parameter using the function input assistant
Process the following steps to change actual parameters with the function input assistant:
Step |
Action |
---|---|
1 |
Place the cursor inside a word for the FFB to be changed. Note: No text may be selected and the FFB call to be changed must be syntactically correct. |
2 |
Open the function input assistant using:
Result: The function input assistant is opened with the current actual parameters. ![]() |
3 |
Make the desired changes and confirm using . |
Inserting FFBs via drag & drop
FFBs can also be inserted into the section via drag & drop using the
.You have the following options to activate the
:Use the
menu command.or
Pressing the Alt+3 key combination.