我正在尝试通过使用https://github.com/OPCFoundation/UA-.NET的Open OPC-UA.NET实现,从SINUMERIK840d调用OPC-UA方法"ReadVar“
我对如何使用这个堆栈实现的知识有限,不知道是否有人有一个轻量级的示例,说明如何使用它连接到OPC-UA服务器并从C#代码调用该方法?
我已经尝试使用Unified Automation试用二进制客户端来测试调用此方法,它工作得很好。我也想知道购买一个商业OPC-UA SDK而不是使用上面提到的开源版本的主要好处(除了明显的支持等)是什么。
发布于 2016-08-22 17:29:10
你必须知道方法的节点id,方法的"object“的节点id,以及它的参数。使用OPC-UA .Net中提供的示例,您可以执行经典的"hello world“:-)
IList<object> val = session.Call(
// I know that this node holds the method I like to use
new NodeId("Methods", 2),
// and I know this node is "hello" method
new NodeId("Methods_Hello", 2),
"world");
Console.WriteLine(val[0]);https://stackoverflow.com/questions/37674274
复制相似问题