简体   繁体   English

有什么方法可以减少 OPC UA 客户端中的标签浏览时间?...连接 OPC UA 服务器时

[英]is there any way to reduce the Tags browse time in OPC UA client?... while connected OPC UA Server

I have reduce and checked with SamplingInterval and PublishingInterval ..values There is no impact.我已经减少并检查了SamplingInterval 和 PublishingInterval ..values 没有影响。 can you suggest any way?你能建议什么方法吗? Let me know.让我知道。

As noted before, SamplingInterval and PublishingInterval will not affect the Browse service.如前所述, SamplingIntervalPublishingInterval不会影响Browse服务。 That's why you don't see any improvement.这就是为什么您看不到任何改进的原因。

Browsing in OPC UA is quite expensive on both ends, but you can probably manage some optimization.在 OPC UA 中进行浏览在两端都非常昂​​贵,但您可能可以进行一些优化。

I do not know what technology (or SDK or language) you are using but here's a list of things you could investigate:我不知道您使用的是什么技术(或 SDK 或语言),但这里列出了您可以调查的内容:

  1. Filter you Browse request : for example, if you are only interested in objects and variables but not so much on types etc. you could apply a nodeClassMask to your Browse request (your SDK or stack should allow that).过滤您的浏览请求:例如,如果您只对对象和变量感兴趣,而对类型等不太感兴趣。您可以将nodeClassMask应用于您的浏览请求(您的 SDK 或堆栈应该允许这样做)。 This will tremendously reduce the information going across for the response.这将极大地减少响应所传递的信息。
  2. Choose your browsing direction : in the Browse request, you can specify the browseDirection flag to tell the server to follow certain types of references (forward, reverse, or both).选择您的浏览方向:在 Browse 请求中,您可以指定browseDirection标志以告诉服务器遵循某些类型的引用(正向、反向或两者)。 In most cases forward is what you'd want if you are browsing for variables and objects.在大多数情况下,如果您正在浏览变量和对象,您会想要 forward 。 This will also speed up the request/response.这也将加快请求/响应。 You will see that parameter in the same specification and also in your SDK documentation.您将在同一规范以及您的 SDK 文档中看到该参数。
  3. Pick a reference type to follow : similarly to #2, you can select one specific reference type to use for your Browse (ie Organizes, HasComponent, HasTypeDefinition, etc.) to reduce payloads.选择要遵循的引用类型:与 #2 类似,您可以选择一种特定的引用类型用于您的浏览(即 Organizes、HasComponent、HasTypeDefinition 等)以减少有效负载。 This Browse request parameter is called referenceTypeId .此 Browse 请求参数称为 referenceTypeId 。

Details on things you can do with a Browse requests are in this section of the OPC Specification .有关您可以使用浏览请求执行的操作的详细信息,请参见OPC 规范的这一部分

To give you an idea, here's a snippet using the OPC UA .NET-Standard C# API to make a browse request with some of those parameters filtered:为了给你一个想法,这里有一个片段使用 OPC UA .NET-Standard C# API 来发出浏览请求,其中一些参数被过滤:

session.Browse(
                null,
                null,
                ObjectIds.ObjectsFolder,
                0u,
                BrowseDirection.Forward, //forward only
                ReferenceTypeIds.HierarchicalReferences, //only hierarchical
                true,
                (uint)NodeClass.Variable | (uint)NodeClass.Object | (uint)NodeClass.Method,
                out continuationPoint,
                out references);

Hopefully this will help you bit.希望这会帮助你。 OPC UA can be cumbersome at times... OPC UA 有时会很麻烦……

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM