Closed avnet78 closed 3 years ago
It looks like you are missing the Workstation.UaClient.dll
. Usually visual studio copy it to your executable folder. You may want to check if it is actually present.
It looks like QuickWatch window is having problem finding the NodeId type. The application is finding the dll just fine, because it opened the session channel with server properly.
More importantly, I want to point out that the Ua Browser is showing the DisplayName of each node in the "Real Time Data" folder. Often the NodeId is different from the DisplayName of a Node. The NodeId may be a String or Int (or sometimes a GUID or byte array). All NodeIds must be unique in their namespace. You may find the server vendors use long strings in the NodeId to ensure they will be all unique, like "ns=3;s=AirConditioner_1.Temperature.EngineeringUnits".
I would use a free tool such as UaExpert from UnifiedAutomation to discover the proper NodeId of the Nodes you wish to read.
Installed UnifiedAutomation's UaExpert as suggested. I think the node id is "ns=2;s=Tag1". I am using the same node id in my code. I have Matrikon UA Explorer as well and attached is the screensh of that. Please advise!
Finally I was able to resolve the issue. I was looking at the code samples and realized that I didn't have the using System.Reactive.Linq; namespace in my code. I am not really sure but adding the namespace dramatically fixed the issue.
I am able to read the values for the OPC UA Server simulator.
Thank you @awcullen & @quinmars
using System.Reactive.Linq;
I am using Integration Obects' OPC UA Server Simulator and trying to read the nodes under Real Time Data, there are about 20 tags. I am able to create the session without any issues but for some reason I am unable to create the NodeId. As you can see in the code snippet below, I tried both NodeId.Parse and new Node(identifer, namespaceindex), but both are throwing an exception - Cannot find type Workstation.ServiceModel.Ua.NodeId in module Workstation.UaClient.exe..
Please help!
Here is my code: