<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Function or function block?</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/aabc8d8b0d/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/aabc8d8b0d/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/aabc8d8b0d/</id><updated>2020-02-27T20:50:03.832000Z</updated><subtitle>Recent posts to Function or function block?</subtitle><entry><title>Function or function block?</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/aabc8d8b0d/?limit=25#e57c" rel="alternate"/><published>2020-02-27T20:50:03.832000Z</published><updated>2020-02-27T20:50:03.832000Z</updated><author><name>Dario</name><uri>https://forge.codesys.com/u/dario/</uri></author><id>https://forge.codesys.combdef6a5e3f44ec03f54baf0b9f691a14a32458f5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you for the explanation&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Function or function block?</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/aabc8d8b0d/?limit=25#5c20" rel="alternate"/><published>2020-02-27T20:50:02.438000Z</published><updated>2020-02-27T20:50:02.438000Z</updated><author><name>Igor Petrov</name><uri>https://forge.codesys.com/u/igor-petrov/</uri></author><id>https://forge.codesys.comdb38d1e3712eb0d6e19c31f9b948436ddbee61d2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;In the general case function is more preferable. It takes a little bit less memory and easy to use (you need not to declare instances). If you can use a function (you need not internal memory in the POU and 1 output is enough) then you have to use it.&lt;/p&gt;
&lt;p&gt;With one exception , if we need POU with many 'parameter' (constant) inputs FB can be more suitable, especially in cycles. For example:&lt;/p&gt;
&lt;p&gt;Function:  &lt;/p&gt;
&lt;p&gt;Indeed I have only one 'x' varying value, but I have to write in all places: &lt;/p&gt;
&lt;p&gt;And each time the compiler will generate code for transferring all parameters.&lt;/p&gt;
&lt;p&gt;With FB I can write input parameters only once:&lt;/p&gt;
&lt;p&gt;Further in all places (or in cycles) I can write only:&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Function or function block?</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/aabc8d8b0d/?limit=25#dd6c" rel="alternate"/><published>2020-02-27T20:49:58.348000Z</published><updated>2020-02-27T20:49:58.348000Z</updated><author><name>Dario</name><uri>https://forge.codesys.com/u/dario/</uri></author><id>https://forge.codesys.com7e69eda81cce400cbf52d7a002df0bf672d75cfe</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi developers,&lt;/p&gt;
&lt;p&gt;could you explain me what's the real benefit of using FBs rather than functions &lt;/p&gt;
&lt;p&gt;IMHO they are quite similar.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>