When to use a formal call? When to use a non-formal call?
To brush up your knowledge:
Example for a formal call: Inst2 (EN := TRUE,IN1:=10,IN2 := 20,T1 := T#3ms, OUT => result); Example for a non-formal call: Inst2 (10,20,T#3ms)
See " Call of function block instance in ST ", " Call of function in ST " and/or " Call of method in ST " , if you need more details on formal and non-formal call.
Now to the answer when to use formal call vs. non-formal call: Certainly you will be faster to enter a non-formal call than a formal call. However, the usage rather depends on the decision which parameters you want/must enter within the call.
The following table should make this decision easier as it lists which call is suited for which purpose (= icon
) and which call is not suited (= icon
). The table also lists conditions that require just one of the calls (= icon
).
Purpose |
Formal call |
Non-formal call |
The call should not list all →input variables or →output variables. |
|
|
The call should list all input variables. |
|
|
The call should list EN/ENO. |
|
|
The call should list assignments of output variables. |
|
|
The call should list variables in any order. |
|
|
A function block instance should be assigned as parameter to the called function block instance or function and it should be called there. |
|
|
Condition |
Formal call |
Non-formal call |
In-out variables are declared in the called function block or function. |
|
|
logi.cals recommends to install and use the most current versions of logi.CAD 3 and the runtime system so that the latest features and problem fixes according to the release notes are provided in the used version.
Did this article help you? Did you find the requested information in this user documentation?
If not, contact the support team of logi.cals. State your questions or suggestions to improve/enhance the user documentation as detailed as possible.