Creating objects in a specific namespace

Questions regarding the use of UaModeler

Moderator: uamodeler

Post Reply
node.dave
Sr. Member
Sr. Member
Posts: 10
Joined: 24 Feb 2023, 21:27

Creating objects in a specific namespace

Post by node.dave »

I'm attempting to use UaModeler to implement a design another group in my company came up with.

The design uses the FxRoot from Part 81 along with children in a hierarchy of AutomationComponent > Assets > OurCustomAsset.

In UaModeler, I've loaded the standard Opc.Ua.NodeSet2.ua model and the Opc.Ua.Di.NodeSet2.ua model. In addition, I've downloaded the XML nodeset files for opc.ua.fx.data and opc.ua.fx.ac from the OPC Foundation website and imported them.

That done, the FxRoot object shows up in UaModeler under the Objects folder, and has the expected node ID under the http://opcfoundation.org/UA/FX/Data/ namespace.

The complication at this point, though, is that the design I've been handed has an AutomationComponent beneath FxRoot that resides in our own server namespace (urn:mycompany:mygadget). In UaModeler, if I add an AutomationComponent object of type AutomationComponentType, it resides in namespace 4 (http://opcfoundation.org/UA/FX/AC/), and I am unable to change that namespace. The design has all the nodes beneath FxRoot mapped into our own server namespace, in fact, which isn't something I've figured out how to do in UaModeler, despite the "Enable editing of NodeIds" being checked in settings.

I suspect one of three things is going on, in order of likelihood:
  1. I simply haven't figured out how to use UaModeler to do this;
  2. UaModeler is enforcing some constraint that the designers and I aren't aware of; or
  3. There may be a shortcoming of some sort in UaModeler.
Any thoughts on whether AutomationComponent instances truly must reside in the http://opcfoundation.org/UA/FX/AC/ namespace, and, if not, how the namespace and NodeId of these child objects can be changed in UaModeler?

Thanks,
Dave

node.dave
Sr. Member
Sr. Member
Posts: 10
Joined: 24 Feb 2023, 21:27

Re: Creating objects in a specific namespace

Post by node.dave »

A coworker pointed out the problem: I'd been trying to assign the server namespace at index 1 to the AutomationComponent, and UaModeler was likely correct in disallowing this. Once I added another model to represent the device namespace, I was able to select it as the namespace for the AutomationComponent.

As I suspected, UaModeler knows more than I do. :)

Dave

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

Re: Creating objects in a specific namespace

Post by Support Team »

Hello Dave,

As a default, UaModeler is adding nodes to the last model in the project. We assume the FX AC model is the last in your UaModeler project file.
Instances can be moved to another namespaces/models but only to namespaces with a higher index than the type namespace.
We assume that your instance model is first in the list and you added the type models for FX later.

In general, all models that you import and that you do not want to edit should be locked to makes sure nothing is added to them by accident.
If you import standard namespaces into UaModeler, you should lock with right mouse click to the model in project view and select “Lock Model”.

In addition you need a project specific namespace (model file) where you can create your instances in should be at the end of the list of models.
This allows you to move the instances by changing the namespace.

But to have a clean setup, you should do the following:
(1) Create a new project
(2) Add the standard models you want to use (DI, FX Data, FX AC)
(3) Lock all standard models
(4) Add your instance model
(5) Create your instances in your instance model
Best regards
Unified Automation Support Team

node.dave
Sr. Member
Sr. Member
Posts: 10
Joined: 24 Feb 2023, 21:27

Re: Creating objects in a specific namespace

Post by node.dave »

That clarifies the situation a great deal, thank you!

Dave

Post Reply