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.

"OPC operation failure" or "External component has thrown an exception"

More
03 Apr 2011 13:49 #349 by admin
In order to resolve this, we need to determine whether the problem is in the server or in the client, and therefore get a capture of the communication between them. For this, please download and install the <a href="/LinkClick.aspx?fileticket=1l6hzn3Fhks%3d&tabid=195">OPC Analyzer tool.
After installing, enter any necessary information in the "Category Filter" and "Remote Machine Name" fields, and press the "Refresh" button. Then, select your target OPC server from the "Server" drop-down, and make sure the trace is started (if "TRACE STOPPED" is displayed, press the "start trace" button).
You then need to modify your application to connect to the OPC Analyzer instead of your real target OPC server; the OPC Analyzer acts as an intermediate logger. The ProgID of the OPC Analyzer is "OpcTestLab.OpcAnalyzer.1". You can then run your application, and you should see the trace being collected in the OPC analyzer. Make handnotes of times of any relevant events, such as the time when you have started the application, and when the exception occurred. Afer you are finished, select File -> Save Trace in the Opc Analyzer, save the .TRA file, and send it to us - ideally, attach it to your reply in this forum.
Note 1: Upgrading to version 5.04 is recommended, and there were multiple fixes made to that version, but none was specifically meant to resolve the problem described.
Note 2: The OPC Analyzer tool is available to OPC corporate members only, thus the download is only permitted to your user account (you must be logged into our site), and you can only use it for the purpose of troubleshooting this particular problem.

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

More
02 Apr 2011 18:22 #344 by support
<span style="font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'">From:<span style="font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'"> M.
Sent: Saturday, April 02, 2011 4:08 PM
To: Zbynek Zahradnik
Subject: ....

Hello,

.....

Meanwhile, in reference to this conversation (see below), I upgraded to version 5.3, but the problem continues.

Now I have the InnerException :

OPC operation failure
InnerException : System.Runtime.InteropServices.COMException (0xC004C013): Read not completed. This error indicates that it could not be verified that the requested read operation was completed during the timeout period. It is possible that the read operation will actually succeed or fail, but later. Increase the timeout period if you want to obtain positive or negative indication of the operation outcome. Other reason for this error may be that under heavy loads, topic request or response queue is overflowing. Check the event log for queue overflow errors.


Our customer said that they had problemes with his OPC server, but after restart their OPC server, your OPC client didn't reconnect.

When this error appears, can not be recovered anymore (even waiting several hours!). I closed our application (the OPC client), and reopened, and it works perfectly. So, it seems a problem on reconnection of OPC client.

Do you think upgrading to 5.4 can solve anything ?

Any suggestion ?

Best regards,

Marc

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

More
01 Dec 2010 07:33 #148 by support
The expected behavior is that the component should reestablish any lost communication (with configurable delays), without further coding effort on your side. More information to this in the "Failure Recovery" chapter in "Concepts" document (online: www.opclabs.com/onlinedocs/Qui...). If it is not happening, it looks like a problem either in the component or in the OPC server.
In order for us to be able to proceed further, can you please provide following information:
- All details about the exceptions you can gather. Mainly, the error code/HResult, and even more importantly, the InnerException and again all information about it (if there is such InnerException - there should be, at least with the "OPC operation failure", and it contains the actual cause of the problem).
- How long (roughly) have you waited until you claimed that the communucation cannot be reestablished.
- Which OPC Server are you connecting to.
I would also suggest that you download the very recent QuickOPC.NET version/build from our Web site. At the time of writing this, we are at version 5.03; your license allows for all "5.0n" versions. There were some bug fixes recently - not to this particular problem, but in the area of error reporting, so using the newest build may help in diagnostics.
Many thanks
Zbynek Zahradnik

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

More
01 Dec 2010 07:22 #147 by support
Hi Zbynek,
.....
The case is we have a very simple application that need to retrive the value of a tag from an OPC Server every second, and we have this code (simplified):

Public easyDAClient1 As OpcLabs.EasyOpc.DataAccess.EasyDAClient = Nothing
Public Sub read_every_second()
If easyDAClient1 Is Nothing Then easyDAClient1 = New OpcLabs.EasyOpc.DataAccess.EasyDAClient
Value1 = easyDAClient1.ReadItemValue("", "OPCServer", "Tag1")
End Sub


This code works well several days, but sometimes, it start to fail, and the ReadItemValue throws an exception like this :

- OPC operation failure

Or other like this :

- External component has thrown an exception.


When this exception occurs, we can not recover the communication with the OPC until we restart the entire application (not the OPC Server). Then, it works well again (so, we assume it is not a problem of the OPC Server)

Do you have any idea about how to recover this error ? Does the OpcLabs.EasyOpc.DataAccess.EasyDAClient have any method to restart the communication or restablish connection ?

Thanks in advance,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
M.

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

Moderators: support
Time to create page: 0.045 seconds