<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Why can a local FB set by the Instantiation</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e3be8c9ec6/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e3be8c9ec6/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/e3be8c9ec6/</id><updated>2020-02-27T14:17:04.570000Z</updated><subtitle>Recent posts to Why can a local FB set by the Instantiation</subtitle><entry><title>Why can a local FB set by the Instantiation</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e3be8c9ec6/?limit=25#4656" rel="alternate"/><published>2020-02-27T14:17:04.570000Z</published><updated>2020-02-27T14:17:04.570000Z</updated><author><name>Bakkertje</name><uri>https://forge.codesys.com/u/bakkertje/</uri></author><id>https://forge.codesys.com0183dd3c063df0f809900c42e2852375b3b84307</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi All,&lt;/p&gt;
&lt;p&gt;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.&lt;br/&gt;
In the example below the declaration of the fbTestLocalVar and fbTestRefToVar looks equal.&lt;br/&gt;
The fbTestRefToVar use the fbTestInput as instance that's OK. And the fbTestLocalVar has his own instance of FB_TestInput that's also OK.&lt;/p&gt;
&lt;p&gt;But why is the assignment of a local FB variable valid by the declaration of fbTestLocalVar?&lt;br/&gt;
What happen with fbTestInput by the declaration of fbTestLocalVar in this case (Is fbTestInput used)?&lt;/p&gt;
&lt;p&gt;Codesys V3.5 SP7 Patch 2 is used.&lt;/p&gt;
&lt;p&gt;Regards, Bakkertje&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Try to set local FB by instance.PNG" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1486"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>