<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to call of a method of a function block in another program</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1ad37da90c/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1ad37da90c/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/1ad37da90c/</id><updated>2024-06-03T20:02:30.076000Z</updated><subtitle>Recent posts to call of a method of a function block in another program</subtitle><entry><title>call of a method of a function block in another program</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1ad37da90c/?limit=25#6105" rel="alternate"/><published>2024-06-03T20:02:30.076000Z</published><updated>2024-06-03T20:02:30.076000Z</updated><author><name>swe-hob</name><uri>https://forge.codesys.com/u/swe-hob/</uri></author><id>https://forge.codesys.combfe03c0313ccd030d35e7d8763164d01356d591b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Let's assume following:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;PRG_1
fb_1 : fbExample1;

fb_1.method_1
do something...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;PRG_2
fb_2 : fbExample2;

fb_2.method_2
if xTest then
    PRG_1.fb_1.method_1();
end_if;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Is there a reason why runtime hangs when I call the method_1 in PRG_1 from a method in PRG_2?&lt;br/&gt;
Both programs run in the same task. No chance that any other program calls the method.&lt;br/&gt;
What I practically do there is that in the program PRG_2 I add a structed object into a buffer.&lt;br/&gt;
In PRG_1 I just process the items in the buffer.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>