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 images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/check.svg ) and which call is not suited (= icon images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/error.svg ). The table also lists conditions that require just one of the calls (= icon images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/check.svg ).

Purpose

Formal call

Non-formal call

The call should not list all →input variables or →output variables.
That means, variables should be omitted within the call.

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/check.svg

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/error.svg

The call should list all input variables.
(The execution control parameters EN and ENO are excepted.)

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/check.svg

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/check.svg

The call should list EN/ENO.

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/check.svg

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/error.svg

The call should list assignments of output variables.

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/check.svg

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/error.svg

The call should list variables in any order.

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/check.svg

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/error.svg

A function block instance should be assigned as parameter to the called function block instance or function and it should be called there.
(This scenario demands →in-out variables in the called function block type or function.)

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/check.svg

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/error.svg

Condition

Formal call

Non-formal call

In-out variables are declared in the called function block or function.

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/check.svg

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/error.svg

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg 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.