OPCFoundation / UA-ModelCompiler

ModelCompiler converts XML files into C# and ANSI C
MIT License
151 stars 92 forks source link

How to use the software #54

Closed kksi0227 closed 3 years ago

kksi0227 commented 4 years ago

Don't understand how to use this software, do you have instructions

mpostol commented 4 years ago

Hi @kksi0227

Hope it helps

kksi0227 commented 4 years ago

he UA Model Designer cannot be downloaded from the corresponding url

kksi0227 commented 4 years ago

Can you write a corresponding Demo

Bracewind commented 4 years ago

Edit : There is a simpler solution than modifying the bat file. In the root floder of the Project, launch a terminal and run .\PublishModel OpcUaCustomModel CUSTOM v104. It will generate the file as before

Old answer : I suppose it depends on your platform, here are the step for C# You have to write a xml file describing your Address Space (see https://opcua.rocks/custom-information-models/) Then add a bat command to compile your file, for me it is basically

CALL PublishModel OpcUaCustomModel CUSTOM %1 %2

that I added to the Step 1 of the BuildStandardTypes.bat file the OpcUaCustomModel is the name of my xml file located in the ModelCompiler\Design.v104 folder

Then all the files will be generated in a folder outside this project called nodesets in CUSTOM folder (Same name that I put in the CALL command above)

If you want to use it properly, you have to create a bat file that is a little more complex.

mpostol commented 4 years ago

@kksi0227 you don't have to bother with the manual edition of the XML files. I have just released the new version 4.3 of the Address Space Model Designer (ASMD). In this release, many bugfixes have been applied. The OPCFoundation/UA-ModelCompiler is embedded as a plug-in to build a solution (check out the video ASMD - How to Build Solution to get started using an embedded example).

Check out the new version and let me know how it works for you. This software is available here:

https://github.com/mpostol/ASMD/releases/tag/4.3.0

The ASMD Designer is a powerful tool, which allows creating, displaying, and editing OPC Unified Architecture models compliant with the OPC Unified Architecture Address Space (Part 3) and Information Model (Part 5) concepts. The tool is created for developers and engineers, for professionals and beginners. It is maintained as the open-source software (OOS) available at

mpostol/ASMD

Check it out to learn how it could help design OPC UA Information Model definitions. I hope, this article is useful to learn how to deploy IM.

Information Models Development

How to be involved

I am a researcher who is passionate about applying knowledge and experience in building a machine-centric global village. Let's build it with you and for you. To join our effort and create an organization context I have launched the Object-Oriented Internet Partnership Program.

Consider joining as a sponsor, contributor, or end-user. Details are covered by the section How to be involved

Your participation is needed to make sure the work will continue as expected.

How to get started

Installation

Download and run the file UA.ModelDesigner.exe to unzip the content to the selected folder and create an icon on the desktop. The application will run after unpacking. To restart the application you may use the icon on the desktop or double click the application file <target>\UA.ModelDesigner\OOI.UA.ModelDesigner.exe, where \<target> is the already folder selected during the installation. To uninstall the software and embedded example simply delete the \<target> folder and the icon.

Note: The self-extracting zip file and the main application is not code-signed. The unsigned executable maybe not allowed by your company IT policy. The installer package containing signed stuff is on the project road map mpostol/ASMD#89. Further development planning is based on the sponsors' priorities.

Opening the embedded example

Check out the section How to open an example in the project documentation or video OPC UA Information Model How to Create Instances.

See Also

Documentation

Video