Professional OPC
Development Tools

logos

Browsing server with items added dynamically after initialization -> new items never found.

More
12 Nov 2014 13:14 #2520 by support
Emilio,

great, I am glad you have found it.

Best regards

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

More
11 Nov 2014 12:56 #2519 by Emilio
Hi Zbynek,

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.

More
11 Nov 2014 12:28 #2518 by Emilio
Hello Zbynek,

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.

More
11 Nov 2014 11:13 - 11 Nov 2014 11:13 #2517 by support
Emilio, this is truly weird.

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
Last edit: 11 Nov 2014 11:13 by support.

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

More
11 Nov 2014 06:37 #2516 by Emilio
Hello,

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
Attachments:

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

More
10 Nov 2014 15:29 #2513 by Emilio
I can give more hints, if that helps.

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.

More
10 Nov 2014 14:56 #2512 by Emilio
I captured a trace from the OPC Analyzer, I also see only one branche, although other clients show at this point the two branches...

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.
Attachments:

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

More
10 Nov 2014 14:31 #2511 by Emilio
Sorry...I go to the OPC Foundation page...

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

More
10 Nov 2014 14:21 #2510 by Emilio
I can't see the OPC Analyzer...the PDF yes!
Thanks
Emilio

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

More
10 Nov 2014 12:58 #2509 by support
In such case, I cannot reproduce it, when the server is still running (kept running by other connected client).

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.

Moderators: support
Time to create page: 0.229 seconds

      

 Recommend this on Google