<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Issue with StructType in devdesc.xml</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/055005c31a/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/055005c31a/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/055005c31a/</id><updated>2020-02-27T13:56:08.108000Z</updated><subtitle>Recent posts to Issue with StructType in devdesc.xml</subtitle><entry><title>Issue with StructType in devdesc.xml</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/055005c31a/?limit=25#7fbd" rel="alternate"/><published>2020-02-27T13:56:08.108000Z</published><updated>2020-02-27T13:56:08.108000Z</updated><author><name>lam.le</name><uri>https://forge.codesys.com/u/lam-le/</uri></author><id>https://forge.codesys.com9155b8ace187ccadf75e0f6abdadc556eb1776c2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi all,&lt;br/&gt;
Thanks for adding me to this forum, this is my first post but I hope to be involved in more discussions later.&lt;br/&gt;
I am having issue in using StructType in devdesc to have struct like data. My structType definition is as below:&lt;/p&gt;
&lt;p&gt;&amp;lt;structtype name="ModuleInfo"&amp;gt;&lt;br/&gt;
    &amp;lt;component offlineaccess="readwrite" identifier="SwType" type="std:WORD" onlineaccess="readwrite"&amp;gt;&lt;br/&gt;
        &amp;lt;default&amp;gt;0&amp;lt;/default&amp;gt;&lt;br/&gt;
        &amp;lt;visiblename name="local:ModuleInfo.SwType"&amp;gt;Software type&amp;lt;/visiblename&amp;gt;&lt;br/&gt;
    &amp;lt;/component&amp;gt;&lt;br/&gt;
    &amp;lt;component offlineaccess="readwrite" identifier="SerialNum" type="std:DWORD" onlineaccess="readwrite"&amp;gt;&lt;br/&gt;
        &amp;lt;default&amp;gt;0&amp;lt;/default&amp;gt;&lt;br/&gt;
        &amp;lt;visiblename name="local:ModuleInfo.SerialNum"&amp;gt;Module serial number&amp;lt;/visiblename&amp;gt;&lt;br/&gt;
   &amp;lt;/component&amp;gt;&lt;br/&gt;
&amp;lt;/structtype&amp;gt;&lt;/p&gt;
&lt;p&gt;And inside connector element:&lt;br/&gt;
            &amp;lt;hostparameterset&amp;gt;&lt;br/&gt;
                &amp;lt;parameter type="local:ModuleInfo" parameterid="5"&amp;gt;&lt;br/&gt;
                    &amp;lt;attributes download="true" offlineaccess="read" functional="false" channel="input" onlineaccess="read"&amp;gt;&lt;br/&gt;
                    &amp;lt;default&amp;gt;&lt;br/&gt;
                    &amp;lt;name name="local:Id000005"&amp;gt;Module information&amp;lt;/name&amp;gt;&lt;br/&gt;
                &amp;lt;/default&amp;gt;&amp;lt;/attributes&amp;gt;&amp;lt;/parameter&amp;gt;&lt;br/&gt;
                       &amp;lt;/hostparameterset&amp;gt;&lt;/p&gt;
&lt;p&gt;Everything worked fine, I can create new variable, eg: s_serial mapped to SerialNum field, in the IO mapping page and it shows correct value. However, when we tried to map existing variable to a field, the application either threw exception “invalid access” or gave some wrong value.&lt;br/&gt;
Could someone point out what could be wrong please. Thank you all and have a nice day.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>