You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create a nodeset2.xml generator in my C# application.
I basically reverse engineered a solution from a nodeset file exported from TIA19.
I only store the string identifier in my DB. For example: "DataBlockName.StructureName.StructureElement"
From this I split it by '.' and add it to my nodeset if the node Id does not exist. UAObject for the DataBlockName and UaVariable for the other elements. The DataType is assigned by me for each element (Yes i will include DataType as well in DB if the generator works properly)
I used Opc.Ua.Export.UANodeSet.Write to create the .xml.
I could import my xml file with the reference server app. I can read and write the nodes with my client application, basic subscriptions work too.
My problem is, when I want to create a subscription on a structure or UDT it does not notify the client.
I started to create different functions for creating the UDT inside the XML. I think I created every reference, element, variabletype etc. that I could find in the xml exported from TIA 19, but it does not work as intended.
When the PLC runs the OPC Server, then under Data Types - OPC Binary there is a SimaticStructures node which defines all structures in the PLC.
Even though the exported XML (from the PLC) contains this definition (and my solution too):
<UADataType NodeId="ns=3;i=3400" BrowseName="3:SimaticStructures" IsAbstract="true">
<DisplayName>SimaticStructures</DisplayName>
<Description>User program defined types (during the declaration of the PLC structured data type).</Description>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=22</Reference>
</References>
<Definition Name="3:SimaticStructures" />
</UADataType>
<UAVariableType NodeId="ns=3;i=2400" BrowseName="3:SimaticStructuresType" IsAbstract="true" DataType="ns=3;i=3400">
<DisplayName>SimaticStructuresType</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=63</Reference>
</References>
</UAVariableType>
I cannot browse it, and the structures have DataType=NULL
instead of
I want to understand how these references and connections work, so that i can find a solution to generate it in my method.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Guys!
I am trying to create a nodeset2.xml generator in my C# application.
I basically reverse engineered a solution from a nodeset file exported from TIA19.
I only store the string identifier in my DB. For example: "DataBlockName.StructureName.StructureElement"
From this I split it by '.' and add it to my nodeset if the node Id does not exist. UAObject for the DataBlockName and UaVariable for the other elements. The DataType is assigned by me for each element (Yes i will include DataType as well in DB if the generator works properly)
I used Opc.Ua.Export.UANodeSet.Write to create the .xml.
I could import my xml file with the reference server app. I can read and write the nodes with my client application, basic subscriptions work too.
My problem is, when I want to create a subscription on a structure or UDT it does not notify the client.
I started to create different functions for creating the UDT inside the XML. I think I created every reference, element, variabletype etc. that I could find in the xml exported from TIA 19, but it does not work as intended.
When the PLC runs the OPC Server, then under Data Types - OPC Binary there is a SimaticStructures node which defines all structures in the PLC.
Even though the exported XML (from the PLC) contains this definition (and my solution too):
I cannot browse it, and the structures have DataType=NULL




instead of
I want to understand how these references and connections work, so that i can find a solution to generate it in my method.
Thanks for the help!
Beta Was this translation helpful? Give feedback.
All reactions