Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Browsing Nodes

More
15 Jun 2010 20:36 #31 by support
Replied by support on topic Re: Browsing Nodes
I do not know your specific scenario, but it looks like that you are attempting to provide some kind of "intelligency" or "auto-configuration" in your client - such as that the client would find a node named "FIM" in the OPC server, no matter which server it is or where in the tree the node it is located precisely. This may be a nice feature (and, in your scenario, it could be a real "must have" requirement), and is doable, but implemennting it has some disadvantages - such as the inefficiency I have described.
More typically, the client software is equipped with a feature that allows the user to select this node - either in some kind of confiiguration file, or interactively. The browsing methods on QuickOPC's EasyDAClient object can be used as basis for this. If the client is WinForms app or can at least invoke WinForms, it can use BrowseItemsForm from OpcLabs.EasyOpc.DataAccess.Forms to do this, without programming the internals of the user interface.

Please Log in or Create an account to join the conversation.

More
15 Jun 2010 16:10 #30 by ianfenton@rmtrobotics.com
I was afraid you might say that. I am fully capable of writing that search code myself, I was just hoping there may be a better way to do it as I suspect the time involved would be fairly long. The reason for this is that we are not supplying the OPC server and are relying on our integrators to purchase whichever server they prefer to work with and the different servers build there nodes slightly differently.Thanks for the response.

Please Log in or Create an account to join the conversation.

More
15 Jun 2010 14:50 #29 by support
Replied by support on topic Re: Browsing Nodes
It looks like that you are looking for "find" or "search" capability. The browsing functions in OPC-DA (and consequently in QuickOPC) do not support this, at least not throughout the whole tree. In QuickOPC, you can always "emulate" searching by using the elementNameFilter and passing in either the precise node name or a match pattern; however this only works on a single parent node/level, so you already must know "where" to perform your search.
A search that would work throughout the whole address space tree is not supported in OPC-DA specifications, and therefore is only possible by traversing the tree until a match is found. As a general OPC address space tree may be quite large, this search operation would be inherently inefficient, but that may be acceptable if you definitely must have it. The shortest way to implement this is by writing a recursive function that looks for the match at given parent level, and if not found there, it tries the same on all child branches. You would then invoke the search by calling that function on a root level (an empty string for the parent).
Let me know if this explanation is sufficient to you. If you do not feel like writing this function, I can put together an example for you; in such case, please let me know which language you prefer (C#, VB.NET ...).
Kind regards,
ZZ

Please Log in or Create an account to join the conversation.

More
14 Jun 2010 16:08 #28 by ianfenton@rmtrobotics.com
I have noticed that depending on the OPC Server (I have 3 different ones for testing) the parent nodes can be named differently from the root, therefore I don't know the specific node names up front when searching (browsing). I know the group and items I am looking for but not the branches the server adds to the group. For example, I have created the following branch & leaf tag; - FIM - StnIDI have one OPC Server which adds the following branches to the group: "Channel1.Device", so my tags become "Channel1.Device.FIM.StnID". Other OPC Servers add different parent branches.Unless I browse for the exact path ("Channel1.Device.FIM") the browse methods don't find the "FIM" tags. I was hoping to just include the "FIM" as the parent id and have the browse methods do the entire search without having to drill down through each branch one at a time. Is there a way to do this? I have tried BrowseNodes & BrowseLeaves but have the same result.Thanks.

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.047 seconds