Control Module in Control Builder and circular dependency resolution

A

Thread Starter

Ariel Burbaickij

Hello forum participants,
In extension to IEC 61131-3 standard ABB
also provides possibility to programm by means
of "Control Modules". It is claimed that compiler
can automatically resolve the proper order of
execution, provided, surely, there are no
circular dependencies. What are circular dependencies ? Let us make it by example from
the ABB tutorial on the issue.

Control Module 1 Control Module 2
Produce := 50; If Request >= then
Request := Produce-Dlvrd;-----> Deliver:=1;
Dlvrd := Dlvrd + Deliver; R end_if
<------
D
R under the arrow stays for Request and D
under the arrow for Deliver.
So we have circular dependency: Request value
determines the Deliver value, which , in turn,
determines the Request value. The strategy
Write before Read does not work anymore.

The proposed solution than sounds as following:
Introduce state-qualifier to Dlvrd variable
and introduce a new code block in Control Module
1. It looks than like this:

Control Module 1 Control Module 2
Produce := 50; If Request >= 1
Request := Produce-Dlvrd:eek:ld; Deliver :=1;
Code_Block_1.1 -----> end_if;
R Code_Block_2.1
<-------
D
Dlvrd:new := Dlvrd:eek:ld + Deliver;
Code_Block_1.2

Now my question:
What do you think did compiler indeed reached
such heights that it is not neccesary anymore
to include the statemnet
Dlvrd:eek:ld := Dlvrd:new; for the use in next scan
or is it indeed just an error ?

Yours sincerely
Ariel Burbaickij
 
Top