I'm having an issue with a simple connection to UA server and reading multiple items... I have verified the data is being pushed from the server using another third party client. With my setup, I know the specific IP = 10.10.29.215 and server name is MECHLAB1… and I know the specific channel names (don’t need to browse)… for instance, “NIS2|String|TEMS_OPC_Speed1”, “NIS2|String|TEMS_OPC_Speed2”, etc..
I took a basic example from the QuickOPC package and modified, but getting a connect error:
*** Failure: Status is not good: BadNodeIdUnknown.
Thanks for any help!
static void GetData_UA()
{
string hostname = "10.10.29.215";
string servername = "MECHLAB1";
UAEndpointDescriptor endpointDescriptor = "";
endpointDescriptor.Host = hostname.Trim();
endpointDescriptor.Port = 4840;
// Instantiate the client object
var client = new EasyUAClient();
// Obtain values. By default, the Value attributes of the nodes will be read.
ValueResult[] valueResultArray = client.ReadMultipleValues(new[]
{
new UAReadArguments(endpointDescriptor, "NS2|String|TEMS_OPC_Speed1"),
//new UAReadArguments(endpointDescriptor, "NS2|String|TEMS_OPC_Speed2"),
//new UAReadArguments(endpointDescriptor, "NS2|String|TEMS_OPC_Speed3")
});
Console.WriteLine("here");
// Display results
foreach (ValueResult valueResult in valueResultArray)
{
if (valueResult.Succeeded)
Console.WriteLine("Value: {0}", valueResult.Value);
else
Console.WriteLine("*** Failure: {0}", valueResult.ErrorMessageBrief);
}
}