server_example: Read MyVariable using namespace and string identifier #1235
-
I am trying to read the "MyVariable" node from server_example .py using (sync) client_example.py. client.get_node("ns=2;s=MyVariable").read_browse_name()
> BadNodeIdUnknown: "The node id refers to a node that does not exist in the server address space."(BadNodeIdUnknown) If i recursively traverse the tree i get (the same as UaExpert): {QualifiedName(NamespaceIndex=2, Name='MyObject'): [
{QualifiedName(NamespaceIndex=2, Name='MyVariable'): SyncNode(NodeId(Identifier=13, NamespaceIndex=2, NodeIdType=<NodeIdType.FourByte: 1>))},
...
]} And i know from WAGO PLCs that it is possible to read nodes using this method. Did i miss something here? Or is there a special reason why it doesnt work in the examples? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
looks like ns=2;s=MyVariable does not exist in your ua server! BadNodeIdUnknown is a response from the server!? maybe the ns-idx wrong? |
Beta Was this translation helpful? Give feedback.
-
nodeid != browsename try this: |
Beta Was this translation helpful? Give feedback.
nodeid != browsename try this:
client.get_node("ns=2;i=13")