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

And inside connector element:
<hostparameterset>
<parameter parameterid="5" type="local:ModuleInfo">
<attributes channel="input" download="true" functional="false" offlineaccess="read" 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.