opc-uakepserverex

OPC UA address differ between server and client


I have created a channel and device on KepserverEx with a couple of tags. In the configuration, I have set the address of a node as:

ns=3;s=Channel1.Device1.Start

And if I browse for the same node using UeExpert I find the NodeId as

nsu=KEPServerEX;ns=2;s=Channel1.Device1.Start

Which is what I need to use in my C# Client.

Why the value of ns(namespace index) is not the same as I have defined in the Server?


Solution

  • I don't know about KepserverEx, but in general the namespace index of a node is not static, but is (re-)defined dynamically in a server when a model is loaded/instantiated. The only static namespace index is 0 for the default opc ua nodeset.

    So, if you have only two namespaces (+ the default nodeset) defined in your server, the namespaces will have the indicies 1 and 2.

    If the client doesn't know the index of a namespace in a specific server, it can request the list of namespaces and can so resolve the right index for a specific namespace name.