<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to COMPOSER</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/975b9b1018/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/975b9b1018/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/975b9b1018/</id><updated>2020-02-27T13:48:37.173000Z</updated><subtitle>Recent posts to COMPOSER</subtitle><entry><title>COMPOSER</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/975b9b1018/?limit=25#f723" rel="alternate"/><published>2020-02-27T13:48:37.173000Z</published><updated>2020-02-27T13:48:37.173000Z</updated><author><name>timvh</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.com31cf96a26194a76b1af9e24b74a23e9a42054c29</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The composer in CFC can be used to write the individual variables into a structure. Therefore the output of the composer is of the type of the structure you selected.&lt;br/&gt;
This cannot be used (not good practice) if you want to connect the output of the composer to the VAR_IN_OUT of the function block, because the purpose of the VAR_IN_OUT is to be able to also write back to this structure, but this is then not possible.&lt;/p&gt;
&lt;p&gt;You need to assign a variable to a VAR_IN_OUT, because it is a reference to the address of the variable. If it is not assigned, then it is refering to nothing and the compiler doesn't accept this.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>COMPOSER</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/975b9b1018/?limit=25#2e88" rel="alternate"/><published>2020-02-27T13:48:37.096000Z</published><updated>2020-02-27T13:48:37.096000Z</updated><author><name>ert</name><uri>https://forge.codesys.com/u/ert/</uri></author><id>https://forge.codesys.com64b79c42227409aa387badb399edd9f898300112</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, I am interested in what really the COMPOSER is, i.e. what happens when I drag and drop a composer to CFC and wire it to a structure?&lt;/p&gt;
&lt;p&gt;The reason I am asking is I want to use a composer to expand a Function Block structure declared as VAR_IN_OUT. Then I would like to wire in several structure fields so that they are fixed at certain values. I would like to wire several other structure fields to some VAR_IN_OUT variables which are configurable. The last step is I would like to embed everything described above into a Function Block and use that chosen VAR_IN_OUT fields from the VAR_IN_OUT structure outside of that main Function Block (but not the whole structure of the internal FB, which is too big!).&lt;/p&gt;
&lt;p&gt;So the question is: what the COMPOSER is (does it create any variable etc.) and is it a good practice to do things as described above?&lt;br/&gt;
I noticed that if a VAR_IN_OUT structure is left unconnected I cannot build a project. But when I wire a COMPOSER without anything wired in I can build it (so I guess it can create a structure of VAR_IN_OUT).&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>