<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Nested Data Types definition</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/9ec743afda/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/9ec743afda/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/9ec743afda/</id><updated>2020-02-27T22:28:11.075000Z</updated><subtitle>Recent posts to Nested Data Types definition</subtitle><entry><title>Nested Data Types definition</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/9ec743afda/?limit=25#3040" rel="alternate"/><published>2020-02-27T22:28:11.075000Z</published><updated>2020-02-27T22:28:11.075000Z</updated><author><name>Rolf-Geisler</name><uri>https://forge.codesys.com/u/rolf-geisler/</uri></author><id>https://forge.codesys.com5645beaeae07def403aa7cdc95fa1270fcbfa3c5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;you can do this, but first you have to declare the "inner" type separately. &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;TYPE&lt;/span&gt; &lt;span class="nt"&gt;TRealSet&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;STRUCT&lt;/span&gt;
&lt;span class="nt"&gt;Real3&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="nt"&gt;REAL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;Real4&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;REAL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;END_STRUCT&lt;/span&gt;
&lt;span class="nt"&gt;END_TYPE&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This you can use now as follows:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;TYPE&lt;/span&gt; &lt;span class="nt"&gt;Test&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt;
&lt;span class="nt"&gt;STRUCT&lt;/span&gt;
&lt;span class="nt"&gt;Real1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;REAL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;Real2&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;REAL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;RealSet&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;TRealSet&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;END_STRUCT&lt;/span&gt;
&lt;span class="nt"&gt;END_TYPE&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>Nested Data Types definition</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/9ec743afda/?limit=25#649b" rel="alternate"/><published>2020-02-27T22:28:09.508000Z</published><updated>2020-02-27T22:28:09.508000Z</updated><author><name>RollingPin</name><uri>https://forge.codesys.com/u/rollingpin/</uri></author><id>https://forge.codesys.com23989947d0058968b24b0d408fa84632ac19a6ac</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I was looking at the possibility of creating nested data types in CoDeSys 2.3 (as in Simatic). Is this possible? Something like the below:&lt;/p&gt;
&lt;p&gt;TYPE Test :&lt;/p&gt;
&lt;p&gt;STRUCT&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;Real1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;REAL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;Real2&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;REAL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;RealSet&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;STRUCT&lt;/span&gt;

    &lt;span class="n"&gt;Real3&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;REAL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

    &lt;span class="n"&gt;Real4&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;REAL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;END_STRUCT&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;END_STRUCT&lt;/p&gt;
&lt;p&gt;END_TYPE&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>