Coder Social home page Coder Social logo

Comments (7)

JayeshThamke avatar JayeshThamke commented on August 26, 2024 4

@aliridha1510 I tried generating code from OpcUaDiModelv11.xml and OpcUaDiModelv11.csv file. Playing with ModelCompiler source code I could generate ansic code. I tried following input tokens/args to Opc.Ua.ModelCompiler.exe

.\Bin\Release\Opc.Ua.ModelCompiler.exe -d2 ".\Test1\model\OpcUaDiModelv11.xml" -c ".\Test1\model\OpcUaDiModelv11.csv" -o2 ".\Test1\out\" -ansic ".\Test1\out\AnsiC\" -useXmlIn itializers -console

the help text for

-ansic

does not provide any information about output directory as an input argument after -ansic

I have checked it in my repository, from where you can download all of them:
https://github.com/JayeshThamke/opcua_ansic_files.git

from ua-modelcompiler.

mpostol avatar mpostol commented on August 26, 2024

You can easily do it using the demo version of the OPC UA Address Space Model Designer.

Always it is reverse engineering (disassembler) process, so some details may be lost.

Because it is hard to prepare UANodeSet file manually, my advice is to use ModelDesign schema as the source code to be compiled and produce all required deliverables (including UANodeSet) all together.
More about deploying the OPC UA Information Model you can find in the whitepaper:
OPC UA INFORMATION MODEL DEPLOYMENT.

Unfortunately the ModelCompiler in this repository fits only partially to the whole process.

from ua-modelcompiler.

MaartenBE avatar MaartenBE commented on August 26, 2024

I am in the situation where another company has delivered the OPC UA model in UaNodeSet format (XML) and the proprietary .ua format of Unified Automation's UaModeler. I want to use the same model that we use to generate and develop in C to be used for our testing framework that uses the C#.NET SDK.

I tried to load the base model in the Address Space Model Designer but I cannot get the build to finish. The resulting output is:

Building the solution ...
***********************************
------ Building project: Project: gen_requirement. ------
Build started at: 16/11/2016 11:48:04.

C:\Users\Maarten\AppData\Local\Apps\2.0\PXT0AEO4.EK1\D4Z81JGV.TEX\cas...tion_432daad65bc0ee4c_0003.0014_206f2a4c1b631ccc\exe\Cas.Opc.Ua.ModelCompiler.exe -d2 "C:\Users\Maarten\AppData\Local\Apps\2.0\PXT0AEO4.EK1\D4Z81JGV.TEX\cas...tion_432daad65bc0ee4c_0003.0014_206f2a4c1b631ccc\gen_requirement.xml"  -cg "C:\Users\Maarten\AppData\Local\Apps\2.0\PXT0AEO4.EK1\D4Z81JGV.TEX\cas...tion_432daad65bc0ee4c_0003.0014_206f2a4c1b631ccc\gen_requirement.csv" -o "C:\Users\Maarten\AppData\Local\Apps\2.0\PXT0AEO4.EK1\D4Z81JGV.TEX\cas...tion_432daad65bc0ee4c_0003.0014_206f2a4c1b631ccc\gen_requirement" -console

!ERROR!
The following has occurred:
Object reference not set to an instance of an object.
   at Opc.Ua.ModelCompiler.ModelCompilerValidator.Validate2(IList`1 designFilePaths, String identifierFilePath, Boolean generateIds)
   at Opc.Ua.ModelCompiler.ModelGenerator2.ValidateAndUpdateIds(IList`1 designFilePaths, String identifierFilePath, UInt32 startId)
   at Opc.Ua.ModelCompiler.Program.ProcessCommandLine2(List`1 tokens)

The build cannot be continued.
Build ended at: 16/11/2016 11:48:12.

I agree that when designing a model that it makes sense to start with the ModelCompiler format. However I don't have the time to fully convert the existing model into this format since manually converting this is tedious work and error prone.

from ua-modelcompiler.

mpostol avatar mpostol commented on August 26, 2024

Object reference not set to an instance of an object is error generated by the ModelCompiler, which is embeded in the CAS Model Designer. Maybe it is the site effect of the model error. This compiler is not perfect but I don’t know any better application.

Have you got any errors while importing the NodeSet model? The list of error is in the application log file and displayed in the debug window. The location of the log file is in the help menu.
For further technical support related to OPC UA Model Designer contact me directly at [email protected].

from ua-modelcompiler.

aliridha1510 avatar aliridha1510 commented on August 26, 2024

any news ?

from ua-modelcompiler.

NichtEuler avatar NichtEuler commented on August 26, 2024

Hi,

As there is no definitive answer: How can I turn my UaNodeset.xml in a ModelDesign.xml without using a modeldesigner?
Is there a way to extract a ModelDesign.xml from my server (https://github.com/OPCFoundation/UA-.NETStandard)?
Would be really awesome to be able to create your own Modeldesigns without buying those modeldesigners.

from ua-modelcompiler.

mpostol avatar mpostol commented on August 26, 2024

@NichtEuler I understand your point, but the question is how to compensate for the development effort. It is possible and easy to expand the project:

https://github.com/mpostol/OPC-UA-OOI/tree/master/SemanticData

and add the converter code I have in my commercial product, but the question is about motivation.

from ua-modelcompiler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.