Tool used to generate OPC UA node set|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Tool used to generate OPC UA node set
Avatar
Lee Smith
New Member
Members
Forum Posts: 2
Member Since:
09/12/2014
sp_UserOfflineSmall Offline
1
01/04/2018 - 08:22
sp_Permalink sp_Print

In the past I've used commercial UA SDKs and have always been able to use the available modelling tool to generate my own complex data types and use them within my server.

 

Due to restrictions on my new platform, I'm now trying to use the open source .NET standard UA SDK which can be found here on github:

https://github.com/OPCFoundati.....ETStandard

 

In the example for this SDK, an XML and CSV file get passed to the OPC ModelCompiler for generating C# classes.  It's my understanding that if I want to create my own complex data types that I need to manipulate the csv and xml file passed to the ModelCompiler.  So my question is, what tool is used to create the stock Boiler example that this SDK is shipped with.  I think I need that tool to create my own types.  I did try to use my Unified Automation UAModeller tool to generate the XML file but this raises errors in the ModelCompiler tool due to the xml being a different format.  Surely some tool exists that is generating the XML file rather than it being done by hand.  By way of an example, here is the start of the XML file that is the type I'm looking for a tool to generate:

 

<?xml version="1.0" encoding="UTF-8"?>

<opc:ModelDesign TargetNamespace="https://opcfoundation.org/UA/Boiler/" xmlns="https://opcfoundation.org/UA/Boiler/" xmlns:uax="https://opcfoundation.org/UA/2008/02/Types.xsd" xmlns:ua="https://opcfoundation.org/UA/" xmlns:opc="https://opcfoundation.org/UA/ModelDesign.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><opc:Namespaces><opc:Namespace XmlNamespace="https://opcfoundation.org/UA/2008/02/Types.xsd" InternalPrefix="Opc.Ua.Server" Prefix="Opc.Ua" Name="OpcUa">https://opcfoundation.org/UA/&.....ce&gt;<opc:Namespace Prefix="Boiler" Name="Boiler">https://opcfoundation.org/UA/B.....es&gt;<opc:ReferenceType BaseType="ua:NonHierarchicalReferences" SymbolicName="FlowTo"><opc:Description>A reference that indicates a flow between two objects.</opc:Description><opc:InverseName>FlowFrom</opc:InverseName></opc:ReferenceType><opc:ReferenceType BaseType="FlowTo" SymbolicName="HotFlowTo"><opc:Description>A reference that indicates a high temperature flow between two objects.</opc:Description><opc:InverseName>HotFlowFrom</opc:InverseName></opc:ReferenceType><opc:ReferenceType BaseType="ua:NonHierarchicalReferences" SymbolicName="SignalTo"><opc:Description>A reference that indicates an electrical signal between two variables.</opc:Description><opc:InverseName>SignalFrom</opc:InverseName></opc:ReferenceType><opc:ObjectType BaseType="ua:BaseObjectType" SymbolicName="GenericControllerType"><opc:Description>A generic PID controller</opc:Description><opc:Children><opc:Property SymbolicName="Measurement" ValueRank="Scalar" DataType="ua:Double"/><opc:Property SymbolicName="SetPoint" ValueRank="Scalar" DataType="ua:Double" AccessLevel="ReadWrite"/><opc:Property SymbolicName="ControlOut" ValueRank="Scalar" DataType="ua:Double"/></opc:Children></opc:ObjectType><opc:ObjectType BaseType="ua:BaseObjectType" SymbolicName="GenericSensorType"><opc:Description>A generic sensor that read a process value.</opc:Description><opc:Children><opc:Variable SymbolicName="Output" ValueRank="Scalar" DataType="ua:Double" TypeDefinition="ua:AnalogItemType"/></opc:Children></opc:ObjectType>....

 

Thanks in advance,

Lee

Avatar
Randy Armstrong
Admin
Forum Posts: 1451
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
01/08/2018 - 07:55
sp_Permalink sp_Print

There is no tool. You need to manually edit an XML design file. 

Avatar
sixdiamants
Zoetermeer
Member
Members
Forum Posts: 4
Member Since:
06/15/2017
sp_UserOfflineSmall Offline
3
02/05/2018 - 05:18
sp_Permalink sp_Print sp_EditHistory

There's no tool - but

it's fairly straightforward to write the XML by hand because the XSD is available (though not very well documented imho).

Otherwise, I wrote my own tooling to generate XML from a dataset that I wanted to expose through OPC-UA. Basically, it is python code that casts objects taken from the dataset to a modeldesign.xml. I found the lxml python module to be helpful. You may want to explore this route if you need to do create larger address spaces.

Yours,

Bob

Avatar
Olivier Roulet-Dubonnet
New Member
Members
Forum Posts: 1
Member Since:
11/21/2015
sp_UserOfflineSmall Offline
4
02/09/2018 - 12:07
sp_Permalink sp_Print sp_EditHistory

A collegue just crashed on the same issue yesterday and is now working on adding ModelDesign support to the open source ua modeler https://github.com/FreeOpcUa/o.....ua-modeler . It is probably just a few hours work to modify current xml exporter

so you will probably have a graphical editor soon.

Avatar
Stefan Profanter
New Member
Members
Forum Posts: 2
Member Since:
07/12/2016
sp_UserOfflineSmall Offline
5
05/02/2019 - 05:34
sp_Permalink sp_Print

I wrote a Tutorial on how to create custom NodeSet2.xml files using the official OPC Foundation's UA-ModelCompiler:

https://opcua.rocks/custom-inf.....on-models/

Feel free to comment and give feedback below the blog post.

 

The UA-ModelCompiler needs as input a manually Written Model.xml file, which is much simpler than the NodeSet2.xml file. It also does a lot of checking while converting. This ensures that the resulting NodeSet2.xml file is valid.

Avatar
Randy Armstrong
Admin
Forum Posts: 1451
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
6
05/02/2019 - 12:58
sp_Permalink sp_Print

Added link from Readme on GitHub:

https://github.com/OPCFoundati...../README.md

Avatar
Andrew Roos
Member
Members
Forum Posts: 3
Member Since:
01/28/2019
sp_UserOfflineSmall Offline
7
05/03/2019 - 00:59
sp_Permalink sp_Print

I'm sure it's too late to help the OP, but for anyone else who stumbles on the thread, Beeyond UMX (https://beeond.net/opc-ua-products/) is a simple free application that generates ModelDesign XML files for the ModelCompiler. It's very simple and does not diagram the information model, but is less intimidating for a beginner than starting with an empty text document.

Avatar
Stefan Profanter
New Member
Members
Forum Posts: 2
Member Since:
07/12/2016
sp_UserOfflineSmall Offline
8
05/03/2019 - 07:32
sp_Permalink sp_Print

Didn't know about the Beeyond UMX tool. I just had a look at the video and it looks quite nice.

I will definitely have a look at it in more detail and maybe I'll also write a tutorial on the UMX tool 🙂 Will keep you updated on this.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 23
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1349
Posts: 4577