我提供了 OPC 服务器的链接:http: //192.168.2.5 :54354并被要求读取项目值。我是 OPC 新手,我认为我的服务器是 OPC XML-DA,但是当我尝试示例代码时,它可以工作。但是当我替换我的服务器 URL 和项目名称时,它不起作用,服务器地址似乎缺少某些部分
var client = new EasyDAClient();
DAVtqResult[] vtqResults = client.ReadMultipleItems(
new ServerDescriptor { UrlString = "http://opcxml.demo-this.com/XmlDaSampleServer/Service.asmx" },
new DAItemDescriptor[]
{
"Dynamic/Analog Types/Double",
"Dynamic/Analog Types/Double[]",
"Dynamic/Analog Types/Int",
"SomeUnknownItem"
});
这一项有效,但不适用于我的服务器 URL: http: //192.168.2.5 :54354
我不确定是什么/XmlDaSampleServer/Service.asmx
意思,但我可以使用https://www.kassl.de/opc/explorer连接到我的服务器.shtml