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 DA browsing error.

More
21 Nov 2022 11:56 #11220 by AlexMerit
Replied by AlexMerit on topic OPC DA browsing error.
Thank you very much. It works now.
Attachments:
The following user(s) said Thank You: support

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

More
21 Nov 2022 11:14 #11219 by support
Replied by support on topic OPC DA browsing error.
Hello,

the error you are getting ("Item not in callback. The OPC callback does not contain an entry for an expected item. Most likely this error indicates an implementation bug in the OPC server.") is different from what was reported here in the original post, and the cause and resolution are also different.

This error is not related to DCOM or lower communication layers. Changing DCOM or firewall configuration is not going to resolve it.

The error cause is explained in the message itself. Most likely, the OPC server violates the OPC DA specification by sending back a result which does not contain or does properly identify the items it should have.

The reason it "works" in Connection Explorer is because you are not doing the same thing. In the screenshot from the Connection Explorer you provided, you are actually getting the Value property of the OPC item. This operation is *different* from reading the item.

Given that the likely bug in the server has to do with asynchronous Read-s, I can think of two workarounds for you:

1. Instruct QuickOPC to use synchronous OPC read. Example:

 
// This example shows how to read an item synchronously, and display its value, timestamp and quality.
 
using System;
using OpcLabs.EasyOpc.DataAccess;
using OpcLabs.EasyOpc.OperationModel;
 
namespace DocExamples.DataAccess._EasyDAClient
{
    partial class ReadItem
    {
    public static void Synchronous()
    {
    // Instantiate the client object.
    var client = [a href="www.google.com/search?q=new+msdn.microsoft.com"]new[/a] EasyDAClient();
 
    // Specify that only synchronous method is allowed. By default, both synchronous and asynchronous methods are
    // allowed, and the component picks a suitable method automatically. Disallowing asynchronous method leaves
    // only the synchronous method available for selection.
client.InstanceParameters.Mode.AllowAsynchronousMethod = false;
 
DAVtq vtq;
    try
    {
vtq = client.ReadItem("", "OPCLabs.KitServer.2", "Simulation.Random");
    }
    catch (OpcException opcException)
    {
Console.WriteLine("*** Failure: {0}", opcException.GetBaseException().Message);
    return;
    }
 
Console.WriteLine("Vtq: {0}", vtq);
    }
    }
}
 


2. Change your code from using ReadItem to GetPropertyValue. An example for it is here: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...%20of%20single%20property.html . Use DAPropertyIds.Value as the 3rd argument, if you want to get the value. This is quite inefficient, and if you also wanted to get other properties (such as timestamp), you run a risk that they will be out of sync with the value.

Best regards
The following user(s) said Thank You: AlexMerit

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

More
21 Nov 2022 07:33 #11216 by AlexMerit
Replied by AlexMerit on topic OPC DA browsing error.
Hello.
I have a similar problem. I’m trying to read data in VS2019 from GE Fanuc 90-70. There is no problem reading from this OPC server using TIA portal or even Connectivity Explorer. I did all the steps that were mentioned in this theme: turned off firewall and adjusted DCOM settings.
But still, after compiling I get - 'An OPC operation failure with error ID '{opcfoundation.org/DataAccess/}E_FAIL.0xC004900E'
And this message in Windows event logs
COM security initialization (process name "DjOPC", Id 16012) for requestor 'ComSecurityInitializingEasyDAClient' succeeded; the initialization object was: (Default).
Made system call: yes, current thread name: "", from thread pool: no, apartment state: MTA.
Have you any advice on what else I can do?
Attachments:

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

More
21 Nov 2022 06:02 #11215 by AlexMerit
Replied by AlexMerit on topic OPC DA browsing error.
Hello.
I have a similar problem. I’m trying to read data in VS2019 from GE Fanuc 90-70. There is no problem reading from this OPC server using TIA portal or even Connectivity Explorer. And I also connected to other OPC servers in VS2019 without any problems. I did all the steps that were mentioned in this theme: turned off firewall and adjusted DCOM settings. But still, after compiling I get this message:

OpcLabs.EasyOpc.OperationModel.OpcException: 'An OPC operation failure with error ID '{opcfoundation.org/DataAccess/}E_FAIL.0xC004900E' occurred, originating from '' and with depth of 1. The inner exception contains details about the problem.'
Inner exception
ExtendedCOMException: Item not in callback. The OPC callback does not contain an entry for an expected item. Most likely this error indicates an implementation bug in the OPC server.
+ The client method called (or event/callback invoked) was 'ReadMultipleItems[1]'.

And this message in Windows event logs:
COM security initialization (process name "DjOPC", Id 16012) for requestor 'ComSecurityInitializingEasyDAClient' succeeded; the initialization object was: (Default).
Made system call: yes, current thread name: "", from thread pool: no, apartment state: MTA.

Have you any advice on what else I can do?
Attachments:

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

More
11 Oct 2022 15:10 #11152 by support
Replied by support on topic OPC DA browsing error.
Hello.

Please see opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...ultiple%20Implementations.html .

Apparently the Native implementation has some problem coping with your configuration. I do not know the precise reason for that.

This can be changed from the code as well (see the link); or externally to an application with a config file.

Best regards

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

More
11 Oct 2022 10:55 #11151 by dastan.zhalilov@erg.kz
Excellent!

It works now.
So, what does it mean - InstanceParameters --> NativeClient = False ?
What does it change in application? Please explain it?

Thank you!

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

More
11 Oct 2022 10:11 #11150 by support
Replied by support on topic OPC DA browsing error.
Hello.
Thank you for the version information. We need to gather some more, and try out some things.

Can you please:

1. Check Windows event logs if there are any interesting entries *at the time of the error*? That is, open the Windows Event Viewer, and check the entries that appear after selecting Event Viewer (Local) -> Windows Logs -> Application, and also Event Viewer (Local) -> Windows Logs -> Security and Event Viewer (Local) -> Windows Logs -> System .

2. Use the Connectivity Explorer application that ships with QuickOPC to try to connect to your OPC server. It probably will not work (same issue), but we need it in further steps because it allows to configure various QuickOPC parameters. Assuming that it also does not work, report here whether it gives the *same* error as your previous attempts, or something different (what?).

3. In the Connectivity Explorer, select Tools -> Configure Connectivity, then OPC DA ... -> Instance Parameters -> Enable Native Client. Change its value from True to False, and press OK. Then do File > Exit, start the Connectivity Explorer again, and re-do your test with your OPC server. Does it work now? If not, what are the symptoms?

Regards

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

More
11 Oct 2022 09:34 #11149 by dastan.zhalilov@erg.kz
Support!

We all waiting for your reply? So?
What we gonna do now? Say something...

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

More
11 Oct 2022 08:34 #11148 by dastan.zhalilov@erg.kz
Runtime version of QuickOPC - v4.0.30319
Version - 5.63.246.1 (<-- I think this is it)
Attachments:

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

More
11 Oct 2022 08:29 #11147 by support
Replied by support on topic OPC DA browsing error.
Which QuickOPC version are you using please?

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

Moderators: support
Time to create page: 0.148 seconds