<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to FB property as VAR_INPUT or VAR_OUTPUT</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/600a2c07a6/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/600a2c07a6/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/600a2c07a6/</id><updated>2020-02-27T14:05:28.164000Z</updated><subtitle>Recent posts to FB property as VAR_INPUT or VAR_OUTPUT</subtitle><entry><title>FB property as VAR_INPUT or VAR_OUTPUT</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/600a2c07a6/?limit=25#33ec" rel="alternate"/><published>2020-02-27T14:05:28.164000Z</published><updated>2020-02-27T14:05:28.164000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com1efc8c3be7642f8ea3acaf805b3a6f91b3435852</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; scott_cunningham&lt;/p&gt;
&lt;p&gt;Properties are not VAR_INPUTS or VAR_OUTPUTS.  They are basically both an input and an output (two methods in one - a GetProperty() and a SetProperty()).  Many people use properties instead of VAR_INPUTS because you can validate the data or force code to execute.  VAR_INPUTS don't do anything until the FB "runs" (i.e. doing the following only sets the variable, but doesn't execute code or update any outputs: MyFb.Counter := 1;... instead you have to call the FB like this: MyFb(Counter:=1);... but sometimes you don't really want to do that)..&lt;/p&gt;
&lt;p&gt;I am probably not understanding your question - can you be more specific?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>FB property as VAR_INPUT or VAR_OUTPUT</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/600a2c07a6/?limit=25#ac5e" rel="alternate"/><published>2020-02-27T14:05:27.813000Z</published><updated>2020-02-27T14:05:27.813000Z</updated><author><name>wpmccormick</name><uri>https://forge.codesys.com/u/wpmccormick/</uri></author><id>https://forge.codesys.comc026e6f36e11d12d706d5a673206ac6c28323b12</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm using CoDeSys in an OEM implementation. &lt;/p&gt;
&lt;p&gt;In the OEM's implementation, having a VAR_INPUT or VAR_OUTPUT as a PROPERTY will generate a compile error &amp;gt;&lt;strong&gt;Zitat:&lt;/strong&gt;&lt;br/&gt;
C0031:  Type definition expected instead of 'PROPERTY'&lt;br/&gt;
 until you add a single comment above the FUNCTION BLOCK declaration. Then it will work, except that when you use the FB, you won't see any input or output wires for the VAR_INPUT or VAR_OUTPUT.&lt;/p&gt;
&lt;p&gt;This all seems like some buggy implementation to me, but my OEM contact says that you can't do any of it.&lt;/p&gt;
&lt;p&gt;What say the CoDeSys community?&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Bill&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>