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.
- Forum
- Discussions
- QuickOPC-Classic in .NET
- Browsing, Browse Dialogs and Controls
- Browsing server with items added dynamically after initialization -> new items never found.
Browsing server with items added dynamically after initialization -> new items never found.
great, I am glad you have found it.
Best regards
Please Log in or Create an account to join the conversation.
got it!!!!!
My Visual Studio must run as Administrator, as well as our Windows Service.
The standard OPC Clients, including some tool that is used by our customer to configure the server, do not run as Administrator.
That is why the OPC server starts a second time...different client identity!
I started directly the EXE not as Administrator and everything ran fine.
I also tried the opposite: Softing Client as Administrator and our Visual Studio, everything still ok at first time!
The story is closed, thanks to your observation about the possible two server instances.
Thanks,
Emilio
Please Log in or Create an account to join the conversation.
you got the problem, BINGO!
However still not a solution...
I haven't noticed it before:
- Connect the server with Softing and wait one minute -> all items are there
- Connect with Matrikon -> all items are there immediately
- Connect with Advosol -> all items are there immediately
- Connect with my test application (form with QuickOpc .NET) -> a second instance of the server is started...ergo only Static items as expected!
It is clear that Browse is ok in all cases.
Obvious question: why EasyDAClient started the server a second time?????
I will analyse further on,
Thanks,
Emilio
Please Log in or Create an account to join the conversation.
First of all, I still cannot reproduce it. I have tried different things - instead of using the Demo app browsing dialogs (as before), I wrote a piece of code. And, I have put in the code from your posts, and tested with browsing just branches, and browsing all nodes. No repro.
Isn't it possible that you somehow connect to a second instance of the server, and not the one that is kept running by the other client (and therefore still disconnect from it after 10-15 seconds)? Have you observed the processes in Task Manager to make sure there are not 2 or more instances of the process?
What is your test application with QuickOPC like - is it also a desktop app (e.g. Console or Windows Forms), or is it a Windows service, or what?
Second, it is clear from the logs that the server is buggy. We send it the right inputs ("browse from the root and give us all the branches"), and we receive what you deem as incorrect result (one branch instead of two). This is demonstrated by e.g. the following snippet:
15:49:06.796 - IOPCBrowse::Browse ---------------------------------------------------------------
General:
HRESULT: 0x00000000 S_OK
In Parameters:
pszContinuationPoint:
szElementNameFilter:
pdwPropertyIDs:
bReturnAllProperties: FALSE
szItemID:
dwPropertyCount: 0
bReturnPropertyValues: TRUE
dwMaxElementsReturned: 100
szVendorFilter:
dwBrowseFilter: OPC_BROWSE_FILTER_BRANCHES
Out Parameters:
ppBrowseElements:
-------- BrowseElement 1 --------
szName = Static
szItemID = Static
dwFlagValue = 1 => OPC_BROWSE_HASCHILDREN
hrErrorID = 0x00000000 S_OK
dwNumProperties = 0
pdwCount: 1
pszContinuationPointOut:
pbMoreElements: FALSE
This is actually enough to say: Please now go and figure out why your server is doing it, because it is not correct. You should be able to use the debugger and figure out inside the server what's wrong.
But I was curious and tried to do more, in order to understand what is the difference between ours and other clients. In one of your traces, the other client has used the OPC DA 2.0 browsing interfaces (we are using OPC DA 3.0 if it is available, as in this case). So this may be the difference. However other clients may be using DA 3.0 and still work, so it is not a whole story.
You should also be aware of another (not related) bug in the server: When we ask it to provide us first with 100 nodes, it exceeds the limit and returns 999 nodes. This is clearly not compliant.
Best regards
Please Log in or Create an account to join the conversation.
I made two tests, same preconditions: the server with dynamic items is running, kept alive by the Softing client, both Static and Dynamic items are there.
Once I connected the OpcAnalyzer via our client, once with another client.
Here attached the two traces: OpcRuntime.txt and GoodTrace.txt.
OpcRuntime comes from OpcLabs Client, GoodTrace comes from the other client.
I see that Browse goes in a different way: once all items are found and once not.
Can you see or suggest some way that we can change browsing in order to find all items?
Many thanks,
regards,
Emilio
Please Log in or Create an account to join the conversation.
I've tried also:
var nodeDescriptor = DANodeDescriptor.Root;
var nodeFilter = new DANodeFilter();
nodeFilter.BrowseFilter = DABrowseFilter.All;
var nodeCollection = opc.BrowseNodes(serverDescriptor, nodeDescriptor, nodeFilter);
var branches = opc.BrowseBranches(serverDescriptor);
Both nodeCollection and branches contain only the Static branche, at the same time browsing with Softing or Advosol sees both branches.
There is no cashing also because I start my client (the one based on QuickOpc .NET) each time new and then I close it.
It seems that this browse (but only from my PC...) sees always only the first branche.
I don't know whether this helps, anyway...
Thanks for support,
Regards,
Emilio
Please Log in or Create an account to join the conversation.
Steps:
- Online with Softing -> one branche only visible.
- after 1 minute add all tags for monitoring, form Softing -> all items (2 branches) visible.
- Started the OpcLabs client -> BrowseBranches() shows only the Static branche.
- Tried now with another OPC client (Advosol) -> both branches visible.
- Tried again with the OpcLabs client -> BrowseBranches() shows only the Static branche.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Thanks
Emilio
Please Log in or Create an account to join the conversation.
Please use the OPC Analyzer to collect the communication between the client and the server, and send me the resulting trace files.
Instructions: www.opclabs.com/files/knowledgebase/QuickOPC/QuickOPC-1-How%20to%20use%20OPC%20Analyzer.pdf
Software: www.opclabs.com/resources/product-information/knowledge-base/category/49-restricted .
Best regards
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-Classic in .NET
- Browsing, Browse Dialogs and Controls
- Browsing server with items added dynamically after initialization -> new items never found.