- Posts: 43
- Thank you received: 1
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
- After an unsuccessful BrowseBranches() (COM Timeout exception comes), the next one (good) needs a big time before succeeding.
After an unsuccessful BrowseBranches() (COM Timeout exception comes), the next one (good) needs a big time before succeeding.
I'm willing to continue some further analysis, I would only postpone it a little bit because we are currently under release (until end of September) therefore I shall keep this issue open and go ahead as soon as we have released our Beta...
If I find an installation of the bad server before then I will send it to you immediately.
Thank you very much for support,
with my best regards,
Emilio
Please Log in or Create an account to join the conversation.
Best regards
Please Log in or Create an account to join the conversation.
using System;
using OpcLabs.EasyOpc;
using OpcLabs.EasyOpc.DataAccess;
namespace ConsoleApplication1
{
class Program
{
static void Main()
{
var client = new EasyDAClient();
Console.WriteLine(DateTime.Now);
try
{
DANodeElementCollection nodes1 = client.BrowseBranches("", "OPCLabs.KitServer.2");
}
catch (OpcException opcException)
{
Console.WriteLine(opcException.GetBaseException().Message);
}
Console.WriteLine(DateTime.Now);
DANodeElementCollection nodes2 = client.BrowseBranches("", "Kepware.KEPServerEX.V5");
Console.WriteLine(DateTime.Now);
Console.ReadLine();
}
}
}
The output from the program is:
8/29/2014 2:13:50 PM
Cannot connect Data Access client (timeout).
8/29/2014 2:14:50 PM
8/29/2014 2:14:51 PM
So, it takes one minute to timeout on the "bad" server (which is expected - that's the default value), but the subsequent browsing on the "good" server still completes quickly.
Can you confirm that my test is implemented the way you have wanted it be done?
I will not be able to resolve it without having a repro, or further information.
Would you be able to put the OPC Analyzer there and collect the calls and their timings, or somehow provide me with access to the "bad" server?
Note that this does not affect the second issue (timeout not applied in BrowseNodes, possible infinite block) - as I said I know what is going on, and I plan to resolve it.
Please Log in or Create an account to join the conversation.
I originally reported it mainly because it might be a side effect of something else, it is always good to investigate unexpected behaviours, they might reveal more important issues.
We do not need a quick fix at this point.
We shall eventually upgrade to newer versions sometimes, if you can just keep us informed about this point, it is completely fine for me.
Thanks for support and best regards,
Emilio
Please Log in or Create an account to join the conversation.
With the new server you made, it is probably so that the browsing method is blocked. QuickOPC should eventually time out. But I have discovered that, while the time-out do apply with operations, there is a problem in the implementation of the browsing methods, and they do *not* time out. I was planning to fix it in the next version; for this, I do not need further detail to it. But I would like to know how big a problem that may be for you, and how quickly do you expect be fixed.
However, the original problem report you gave seems different. There, the server probably blocked itself earlier, maybe in the class factory (result of CoCreateInstance), or a similar place. For this, our timeouts actually work well, which is indicated by the exception you received, i.e. "Cannot connect Data Access client (timeout).". The only problem there was the delayed browse on the "good" server afterwards, which is something that I did not expect, and wanted to investigate further.
Do you agree?
Best regards
Please Log in or Create an account to join the conversation.
Here below the full exception message:
The last lines are concerning my implementation...
{OpcLabs.EasyOpc.OpcException: OPC operation failure. ---> System.Runtime.InteropServices.COMException: Cannot connect Data Access client (timeout).
--- End of inner exception stack trace ---
at OpcLabs.EasyOpcRaw.DataAccess.RawEasyDAClient.CheckComResult(CHResult* hResult)
at OpcLabs.EasyOpcRaw.DataAccess.RawEasyDAClient.BrowseNodes(ServerDescriptor serverDescriptor, NodeDescriptor parentNodeDescriptor, DANodeFilter nodeFilter)
at OpcLabs.EasyOpc.DataAccess.EasyDAClient.BrowseNodes(ServerDescriptor serverDescriptor, DANodeDescriptor parentNodeDescriptor, DANodeFilter nodeFilter)
at OpcLabs.EasyOpc.DataAccess.EasyDAClient.BrowseBranches(ServerDescriptor serverDescriptor, DANodeDescriptor parentNodeDescriptor, String elementNameFilter, String vendorFilter)
at OpcLabs.EasyOpc.DataAccess.EasyDAClient.BrowseBranches(ServerDescriptor serverDescriptor, DANodeDescriptor parentNodeDescriptor, String elementNameFilter)
at OpcLabs.EasyOpc.DataAccess.EasyDAClient.BrowseBranches(ServerDescriptor serverDescriptor, DANodeDescriptor parentNodeDescriptor)
at OpcLabs.EasyOpc.DataAccess.EasyDAClient.BrowseBranches(ServerDescriptor serverDescriptor)
at EH.ImsOpcBridge.Service.Implementation.BO.OpcManager.BrowseRecursive(EasyDAClient opc, ServerDescriptor serverDescriptor, DANodeElement nodeElement, OpcItem opcParentItem) in d:\1Data\Views\RTC\DA\ImsOpcBridge\DesignImplementation\EH.ImsOpcBridge.Service.Implementation\BO\OpcManager.cs:line 155
at EH.ImsOpcBridge.Service.Implementation.BO.OpcManager.ReadOpcAddressSpace(String serverName, OpcItem& opcItem, UInt32& error, Exception& exception) in d:\1Data\Views\RTC\DA\ImsOpcBridge\DesignImplementation\EH.ImsOpcBridge.Service.Implementation\BO\OpcManager.cs:line 103}
Please Log in or Create an account to join the conversation.
The symptoms you describe now (infinite block) are different from those before.
For the original symptoms, can you please answer my question in the post from yesterday:
3. It times out after cca 20 seconds (please send me the exception message and details - it is really important)
Thank you
Please Log in or Create an account to join the conversation.
The DLL that you also see contains several methods that we have to implement, it is our link between our implementation and the server EXE.
I put the infinite Wait in an initial call that gets the OPC address space.
I don't remember now which OPC call is the corresponding one...
Probably it is still in the first CoCreateInstance, but I can't be sure unfortunately.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
The behavour is not exactly like with the "real" bad OPC server, because I don't know what exactly happens there, but it is almost the same, anyway it can help you in finding what is happening.
- Unzip the attached file in any folder.
- Run RegServer.exe (as Administrator under Windows 7).
You can use the following sample code to test:
var opc = new EasyDAClient();
var descriptor = new ServerDescriptor("Endress.TestBadServer.1");
DANodeElementCollection nodes;
try
{
nodes = opc.BrowseBranches(descriptor);
}
catch (Exception exception)
{
// Here it hangs until COM timeout.
var t = exception.Message;
}
descriptor = new ServerDescriptor("any-good-opc-server");
nodes = opc.BrowseBranches(descriptor);
// it never reaches this point, or after a HUGE timeout, I didn't wait long enough.
opc.Dispose();
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-Classic in .NET
- Browsing, Browse Dialogs and Controls
- After an unsuccessful BrowseBranches() (COM Timeout exception comes), the next one (good) needs a big time before succeeding.