<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Convert FB to PROGRAM</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/dc0a65c6ec/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/dc0a65c6ec/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/dc0a65c6ec/</id><updated>2020-02-27T19:45:46.733000Z</updated><subtitle>Recent posts to Convert FB to PROGRAM</subtitle><entry><title>Convert FB to PROGRAM</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/dc0a65c6ec/?limit=25#d788" rel="alternate"/><published>2020-02-27T19:45:46.733000Z</published><updated>2020-02-27T19:45:46.733000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com0ec713a4c1722363a8768d96a6719e54c51f274b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;dont mind all these extra texts.&lt;/p&gt;
&lt;p&gt;A function block has its inputs and outputs, and a program can not have this.&lt;br/&gt;
so you must check the VAR list and change the inputs to the normal var and same for outputs.&lt;/p&gt;
&lt;p&gt;better is however to call the FB in your main program and when debugging you can click on the FB and see it actually working.&lt;/p&gt;
&lt;p&gt;I still make the same mistake to make the program and then realise i have to do it in a FB.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Convert FB to PROGRAM</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/dc0a65c6ec/?limit=25#e835" rel="alternate"/><published>2020-02-27T19:45:45.458000Z</published><updated>2020-02-27T19:45:45.458000Z</updated><author><name>pnn</name><uri>https://forge.codesys.com/u/pnn/</uri></author><id>https://forge.codesys.come884105eb9fbb3d2992b2111b68f84ce6e15ac0d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I want to convert a SFC FB to a PROGRAM.&lt;br/&gt;
Tried to copy/paste steps but it didn't work. &lt;br/&gt;
So I exported the FB to .exp file, and then edited the .exp file with Notepad - just changed &lt;br/&gt;
"FUNCTION_BLOCK Test" to "PROGRAM Test" at he beginning, and&lt;br/&gt;
"END_FUNCTION_BLOCK" to "END_PROGRAM" at the end.&lt;br/&gt;
Then I deleted the FB from the project and imported the edited .exp file.&lt;/p&gt;
&lt;p&gt;So now I have it as a PROGRAM, the project compiles OK, but is this safe?&lt;br/&gt;
There are some things in the .exp file that I don't understand, namely&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;(&lt;em&gt; @OBJECTFLAGS := '0, 8' &lt;/em&gt;)&lt;br/&gt;
(&lt;em&gt; @SYMFILEFLAGS := '2048' &lt;/em&gt;)&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;What is the meaning of these flags and do they depend on the type of POU? &lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>