lam.le - 2019-09-23

Hi all,
Thanks for adding me to this forum, this is my first post but I hope to be involved in more discussions later.
I am having issue in using StructType in devdesc to have struct like data. My structType definition is as below:

<structtype name="ModuleInfo">
<component offlineaccess="readwrite" identifier="SwType" type="std:WORD" onlineaccess="readwrite">
<default>0</default>
<visiblename name="local:ModuleInfo.SwType">Software type</visiblename>
</component>
<component offlineaccess="readwrite" identifier="SerialNum" type="std:DWORD" onlineaccess="readwrite">
<default>0</default>
<visiblename name="local:ModuleInfo.SerialNum">Module serial number</visiblename>
</component>
</structtype>

And inside connector element:
<hostparameterset>
<parameter type="local:ModuleInfo" parameterid="5">
<attributes download="true" offlineaccess="read" functional="false" channel="input" onlineaccess="read">
<default>
<name name="local:Id000005">Module information</name>
</default></attributes></parameter>
</hostparameterset>

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.
Could someone point out what could be wrong please. Thank you all and have a nice day.