Bakkertje - 2015-12-10

Hi All,

It's not clear for me that the compiler give no warning or error when you try to connect/set a other instance of an FB to al local FB by the declaration.
In the example below the declaration of the fbTestLocalVar and fbTestRefToVar looks equal.
The fbTestRefToVar use the fbTestInput as instance that's OK. And the fbTestLocalVar has his own instance of FB_TestInput that's also OK.

But why is the assignment of a local FB variable valid by the declaration of fbTestLocalVar?
What happen with fbTestInput by the declaration of fbTestLocalVar in this case (Is fbTestInput used)?

Codesys V3.5 SP7 Patch 2 is used.

Regards, Bakkertje

IMG: Try to set local FB by instance.PNG