Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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