<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Data exchange between 2 FBs</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/c88e6d383c/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/c88e6d383c/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/c88e6d383c/</id><updated>2020-12-30T15:33:39.840000Z</updated><subtitle>Recent posts to Data exchange between 2 FBs</subtitle><entry><title>Data exchange between 2 FBs</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/c88e6d383c/?limit=25#4d63" rel="alternate"/><published>2020-12-30T15:33:39.840000Z</published><updated>2020-12-30T15:33:39.840000Z</updated><author><name>tvm</name><uri>https://forge.codesys.com/u/tvm/</uri></author><id>https://forge.codesys.com96e8745d4975bec30cdf21b67d7d42621c35bba7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;What about this?&lt;/p&gt;
&lt;p&gt;FUNCTION_BLOCK BASE&lt;br/&gt;
VAR_STAT&lt;br/&gt;
    Shared:     INT;&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;p&gt;FUNCTION_BLOCK FB_1 EXTENDS BASE&lt;br/&gt;
FUNCTION_BLOCK FB_2 EXTENDS BASE&lt;/p&gt;
&lt;p&gt;&lt;img src="./attachment/Capture.PNG" width="50%"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Data exchange between 2 FBs</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/c88e6d383c/?limit=25#cfaf" rel="alternate"/><published>2020-12-28T16:37:01.602000Z</published><updated>2020-12-28T16:37:01.602000Z</updated><author><name>Morberis</name><uri>https://forge.codesys.com/u/morberis/</uri></author><id>https://forge.codesys.comd4e511ba9eabaa3ee499240d27c259d13f27eb31</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I am not sure. If you do something like FB1_Name.FB_Variable in the second FB you get an error that "Functionblock 'FB1_Name' must be instantiated to be accessed. &lt;/p&gt;
&lt;p&gt;For my own libraries I just make an output variable in the first FB and an input variable on the second but I can see why you would want to do it your way. Though I'm unsure what would happen with multiple instances of FB 1.&lt;/p&gt;
&lt;p&gt;Looking through the help file quickly I'm wondering if &lt;a class="" href="https://help.codesys.com/webapp/parameters;product=LibDevSummary;version=3.5.15.0" rel="nofollow"&gt;Parameter transfer by reference&lt;/a&gt; might work for you.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Data exchange between 2 FBs</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/c88e6d383c/?limit=25#3394" rel="alternate"/><published>2020-12-28T12:14:11.531000Z</published><updated>2020-12-28T12:14:11.531000Z</updated><author><name>jeetshah</name><uri>https://forge.codesys.com/u/jeetshah/</uri></author><id>https://forge.codesys.com1a6c6defa743c24cbc5e31054830e45b0a633004</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am  a library developer &amp;amp; new to CodeSys.&lt;/p&gt;
&lt;p&gt;I have a very simple question. I have 2 FBs with some input &amp;amp; output parameters. I want to take the output of 1 FB &amp;amp; use it in the 2nd FB. (irrespective of the instance of FB)&lt;/p&gt;
&lt;p&gt;One way is that maybe i can use GVL. But i dont want to do so as i am making a library &amp;amp; not end application(PLC program)&lt;/p&gt;
&lt;p&gt;Is their any other way to get data of a 1st FB instance in a 2nd FB??&lt;/p&gt;
&lt;p&gt;Maybe using some interfaces?? Could someone post an example??&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>