问题标签 [unified-automation-sdk]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c++ - 如何将字符串从 Twincat PLC OPC UA 服务器发送到统一自动化 OPC UA C++ 客户端程序
如何将字符串(温度、压力、设定点)值发送到 OPC UA C++ CLIENT 程序意味着客户端可以访问它可以读取或写入的服务器中的值
c# - 从对 ServerManager 类的公共访问启动 Opc Ua 服务器会引发 NullPointerException
我尝试以这种方式启动 OPC UA 服务器:http ://documentation.unified-automation.com/uasdkdotnet/2.1.0/html/L3ServerTutGSLess01.html
出现
ApplicationInstance.Default.Start(server, null, server)"
以下错误:System.NullReferenceException:对象引用未设置为对象实例。在 UnifiedAutomation.UaServer.ServerSettings..ctor(ApplicationInstance 应用程序) 在 UnifiedAutomation.UaServer.ServerManager.OnServerStarting(ApplicationInstance 应用程序) 在 UnifiedAutomation.UaBase.ServerBase.Start(ApplicationInstance 应用程序) 在 UnifiedAutomation.UaServer.ServerManager.Start(ApplicationInstance 应用程序) 在UnifiedAutomation.UaBase.ApplicationInstance.Start(ServerBase 服务器,WaitCallback 回调,对象 userData)在 TapakoServerStarter.cs 中 VeitsServer.TapakoServerStarter.StartAkomiServer(IDevice testDeviceToLink):行。39 在 OpcUaServerTest.cs 中的 Implementationstests.OpcUaServerTest.ServerShouldRun ():第 44 行
如果从Main()
. 但是,一旦我尝试通过同一项目图中的外部项目(例如测试项目)调用 OpcUaServerStarter,就会出现 NullReferenceException。
也许项目必须编译为 .dll 或者我必须添加一些引用?或者它的可见性在 OPC-UA 网站上MyServerManager
是有原因的。internal
MyServerManager
类(工作的唯一关键区别MyServerManager
可能是public
封装):
谢谢!
c# - OPC UA Client SDK (Unified Automation) 2.5.4 客户端证书在计算机名称更改时失效
对于 OPC UA Client SDK 2.5.4 ,在计算机名称更改时需要重新创建客户端证书,因为它们变得无效。为什么,它在任何地方都有记录吗?
在 2.0 版中,更改计算机名称时客户端证书不受影响,因此无需重新创建它们。使用 Dotnet 4.5 和 C# 6 支持的应用程序。
c# - ApplicationInstance.Start(ServerManager) 和 ServerManager.Start(ApplicationInstance) 的区别
我试图理解我派生的代码,但通过启动 OPC-UA 服务器调用两种方法,我感到很困惑。我正在使用 OPC-UA 的统一自动化实现。
首先调用
然后打电话
这是抽象的代码:
那么这两种方法有什么区别呢?
c# - UA SDK 问题编译服务器应用程序
关于 Unified Automation 提供的以下用于编译 OPC UA 服务器应用程序的教程:
步骤 1 中的注释指示我执行以下任务:
首先,您必须通过从程序集的上下文菜单中选择“删除”来删除现有程序集。然后在解决方案资源管理器中右键单击“引用”并选择“添加引用”。单击“浏览”以浏览程序集。SDK 安装目录包含一个名为“assemblies”的文件夹,该文件夹本身包含多个名为“NET_[version]”的文件夹。添加位于与您正在使用的 .NET 框架对应的文件夹中的程序集。
当我尝试这样做时,我找不到它需要我浏览的程序集。我创建了他们以完全相同的方式使用的示例项目。
简而言之,项目中缺少 UnifiedAutomation.UaBase 和 UnifiedAutomation.UaServer 程序集,我无法添加它们。此外,如感叹号所示,缺少 System.Runtime.Serialization。
如果您能给我一些指导,我将不胜感激。
opc-ua - Livetime / uniqueness of NodeId (How to manage NodeIds for dynamic nodes)
The Specification (Part 3: Address Space Model) of OPC UA says
5.2.2 NodeId
... A Server shall persist the NodeId of a Node, that is, it shall not generate new NodeIds when rebooting.
but how can this be?
NodeId is a combination from a NamespceIndex and Identifier. NamespceIndex can be changed when the Server is restarting. see:
http://documentation.unified-automation.com/uasdkhp/1.0.0/html/_l2_ua_node_ids.html
For this reason, a Client should not persist the namespace index without storing the namespace URI as well, because a namespace URI represented by index “2” during one session could be represented by index “5” during the next session
Also the use of FolderType with e.g. "Files" as Items speak again this, or should the server store the NodeId it uses for File-X to assign it right again after restart?
What for is "GenericModelChangeEventType" if no NodeId can be created?
Client: I thought useing BrowsePath-Path (e.g. "Objects.Server.ServerStatus.CurrentTime" (* ) ) for addressing NodeIds and then using the NodeId while the clinet session to access the nodes is a good approach. Also because Companion Specifications defines the browsename so I might by save. Is this a good idea? ( *need attention on collisions caused by different namespaces)
Server: How should the Server behave when it needs to generate/create new NodeIds. Need the NodeIds to be unambiguous all the time or just for the Server runtime. I know some Servers are using NodeIds with String-Typed Identifiers and this String-Identifiers are made from the BrowsePath e.g. "ns=1;s=Server.ServerStatus.CurrentTime". But I don't like this...
c# - 如何在 C# 中写入 OPC UA 服务器中的字符串标签?
我正在使用来自 Unified Automation 的 SDK,它本质上是一些创建和运行 OPC UA 服务器的 C# 源代码。目前,由于代码中写入函数的性质,我只能写入初始化为整数或双精度的数据标签。每种数据类型都有一个写入函数,如下所示:
问题在于 BitConverter,因为转换字符串并不那么简单。到目前为止,我已经尝试使用:
然而,后来在 Kepware 中阅读它时,我得到了一个不寻常的结果: 见第一行
任何帮助表示赞赏。
c# - 如何在 C# 中模拟 OPC UA 会话以进行单元测试
我有一个 C# 应用程序,其中包括一个与多个 OPC UA 会话 ( UnifiedAutomation.UaClient.Session ) 一起使用的服务。这些会话是通过连接到 opc.tcp://localhost:48030 等地址来创建的。
我想对我的服务的方法进行单元测试,但我不知道如何模拟 OPC UA 会话。
知道这是否可能吗?
c# - 通过 SDK 调用方法调用方法不会返回预期的输出
我是 OPC-UA 的新手。目前在学习了统一自动化文档提供的演示和示例之后。我能够编写一个连接到服务器端点并调用方法的简单代码。但遗憾的是,该方法并没有返回预期的结果。此外,如果我通过UAExpert 在同一服务器上调用相同的方法和具有相同参数的相同URL,我会得到预期的结果。我束手无策,希望下面的任何帮助都是我目前编写的代码。
如果我遗漏了代码中的任何内容,请告诉我。
服务器在代码中没有返回异常,所有输入参数都是好的,错误状态也是如此。
更新:过滤器表达式应该是:(ip.src == 172.16.55.144 && ip.dst == 212.43.72.27) || (ip.dst == 172.16.55.144 && ip.src == 212.43.72.27) 请在以下链接中找到来自 Wireshark 的数据包: uaexpert: https://1drv.ms/u/s!ArxC3dVLzVTqhUGxsO1aDssb45er?e=tBcBRz localClient: https://1drv.ms/u/s!ArxC3dVLzVTqhUANVvKmHG5ULW6_?e=cAO5C8
更新:根据评论的建议更新代码。来自wireshark的更新代码包:https ://1drv.ms/u/s!ArxC3dVLzVTqhUIuqudrkrjMn8kn?e=fAZOtd
.net - 如何将可选节点从我的信息模型实例化到我的 OPC UA 服务器(.Net 环境)
我是 OPC UA 服务器开发的初学者。我正在使用 .NET 环境来创建一个具有我自己的信息模型的服务器,该信息模型是在 UAModeler 上创建的。
当我实例化我的信息模型中可用的节点时,只有那些设置为 Mandatory 的节点才能成功实例化。我试图找到一种方法如何实例化剩余的节点,这些节点也被目的设置为可选的建模规则。
下面是节点管理器类的代码片段:
`Console.WriteLine("正在加载 Im 2.1 模型。"); ImportUaNodeset(Assembly.GetEntryAssembly(), "informationmodel_2.0.xml"); Console.WriteLine("IM 成功加载");
任何建议或类似的已解决示例都将受到高度评价。
谢谢