UaModeler - Use it to generate code from EXISTING SERVER

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
FabioLantek
Full Member
Full Member
Posts: 5
Joined: 04 Dec 2020, 10:23

UaModeler - Use it to generate code from EXISTING SERVER

Post by FabioLantek »

Goodmorning Sirs,
i'm struggling to do this:

I have this machine (OpcuaServer) i am already connected (Using uaExpert) and where i can read structures.
It has some STRUCTURES (Objects, not simple, plain strings or numbers) that i need to WRITE into by using code (.net framework).

I KNOW that, for this purpose, multiple approaches are allowed and what i want to achieve is to USE UaModeler to generate TYPES and IDENTIFIERS code files. I know this can be done but when i try to create a new project inside UaModeler i can't figure out HOW TO "Connect" to an existing MODEL / Machine / Server.

I need a tutorial/wizard where i can insert machine IP address/Port and, from that information, generate all the structure identifiers / types CodeFiles (in c#).

I hope that this is easy to achieve with UaModeler but when i use it i just can create SOMETHING NEW (Like, building new types or stuff) but i cannot CONNECT to my existing machine to READ Structures from that.

Hope this is clear....can you guys help me?

User avatar
Support Team
Hero Member
Hero Member
Posts: 3064
Joined: 18 Mar 2011, 15:09

Re: UaModeler - Use it to generate code from EXISTING SERVER

Post by Support Team »

Hi,

the modeler is an (offline) tool for developers. It is designed to not need any direct access to the Client/Server your are working for. It is a development tool you use at design time, but not at runtime.

The trick is to import/export the XML-Nodeset. The UaModeler can "import" Nodeset2, you can modify it and you can generate code from it.

The question is where do you get the original XML Nodeset form your server from? Answer is: UaExpert, is a client that can browse through all the namespaces of the server it is connectied to. With NodeSet-Export plugin you can browse and export into XML (you get an "offline copy" of the server's namespaces). This XML you can import in UaModeler, modify, and work with, and generate code for your implementation.
Best regards
Unified Automation Support Team

FabioLantek
Full Member
Full Member
Posts: 5
Joined: 04 Dec 2020, 10:23

Re: UaModeler - Use it to generate code from EXISTING SERVER

Post by FabioLantek »

Support Team wrote:
17 Feb 2023, 16:43
Hi,

the modeler is an (offline) tool for developers. It is designed to not need any direct access to the Client/Server your are working for. It is a development tool you use at design time, but not at runtime.

The trick is to import/export the XML-Nodeset. The UaModeler can "import" Nodeset2, you can modify it and you can generate code from it.

The question is where do you get the original XML Nodeset form your server from? Answer is: UaExpert, is a client that can browse through all the namespaces of the server it is connectied to. With NodeSet-Export plugin you can browse and export into XML (you get an "offline copy" of the server's namespaces). This XML you can import in UaModeler, modify, and work with, and generate code for your implementation.
So, if i want to generate code with UaModeler, with constructor defined objects and structures (With the purpose of writing inside complex objects, for example), i have to:
1) Use UaExpert (Export XML NodeSet Export View) to generate an xml file for each Namespace i need
2) Within UaModeler, i create a new Project (.net client application) and in the "Choose Base Models" page i choose "Find another Model" and choose those XML files
3) Now, from UaModeler project, i select the OPCUA SDK Folder and licence and press Generate Code.

Is this correct?

Post Reply