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 items are ery often read with quality UncertainNonspecific LimitOk (64)

More
27 Dec 2023 13:39 #12502 by support
Hello.
From your description, I was under impression that you get a steady stream of updates for each item, and many of them have uncertain quality.

When the server does not have the value right away, it is perfectly OK for it to send the initial bad quality (but with an uncertain quality, there should normally be a value). Also, you may not even notice that behavior with interactive OPC clients; but the code-based will notice, of course.

It looks like that what you are actually looking for are the WaitForMultipleXXXX methods. See opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...ng%20for%20OPC-DA%20Items.html .

Best regards

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

More
27 Dec 2023 11:17 #12501 by mut9bu
Hello

I think I got the problem. First of all short explanation to my use case for better understanding:

With my app I am connecting to a remote OPC DA server (CNC machines) and reading out some infos from the machine just for one time (Version, Hardwaretype, existing CNC axis ...) All these are datas that are not changing dynamically. So normally I would use "Read multiple items" for that instead of "Subscribe to multiple items".

But in the previous discussions I had told you that with read item, I get response from the OPC DA Server quite late (30-40 seconds) .
You suggested me to use subscribe instead of. Really when I used "Subscribe to multiple items" I get response from the OPC DA server in a few seconds.

In my code I have used subscribe items as said just for 1x reading of the values.(values that I am reading are not dynamic values). So in the "item changed" method I just counted the amount of item changes, and if the count was equal to requested item number then I finished the subscription.

In this case 30-40% of the values came with quality "Uncertain". When I run the same code manually for a longer subscription time, i noticed that 30-40% of the first item changes were with quality "uncertain" but the following item changes of the same items were always "good". That means, when subscription is started just the first data changes have mostly quality "uncertain". I don't know why but this is reality. So I have added in my code a check mechanism, that the subscription is just then finished when for all requested items a "good" quality change was detected. Here one more remark: Although the subscription update rate is choosen in my case as 5000 ms, I get immediatly after the first "uncertain" quality value, the second "good" quality value for the same item. Therefore the "uncertain" values are not increasing my reading reaction time.

Just wanted to share with you as feedback.

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

More
26 Dec 2023 18:32 #12499 by support
Thank you, I understand now.
There is nothing wrong with your code.

Furthermore, we have a design rule in QuickOPC that (besides necessary data type conversions) we never modify the contents of the Value-Timestamp-Quality triple (or inject anything into it). This means that with almost 100% certainty, the quality value you are seeing must have come from the server itself.

It is not clear why it works with some other OPC client. Due to how to OPC specification have evolved (1.0, 2.0x, 3.0), however, there are usually multiple ways how to do the same thing, from the client side. So, for example, QuickOPC might have chosen to use OPC DA 2.0 instead of OPC DA 1.0, if the server supports both, and then if the server behaves differently on these two interfaces, different clients may get different results.

If you want to investigate, I can provide you with so-called OPC Analyzer, for analyzing the communication. You would then capture it in both cases (the "good" and the "bad" one), and we will compare the captures and try to determine the culprit. Some work involved. Let me know if you are willing to go this route.

Best regards

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

More
26 Dec 2023 12:25 #12498 by mut9bu
Hello
I mean I have tried the code on several machines (with the same type of OPC DA Server ==> OPC.IwSCP.1)
Bu t when I use for the same machines a different OPC DA Client, it can subscribe quite normal to the items, without bad or unspecified quality.

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

More
26 Dec 2023 08:14 #12497 by support
Hello.

Please explain what you mean by " I have also tried on different OPC DA servers, but result was the same.". Are you talking about other instances of the same server software (with ProgID "OPC.IwSCP.1"), or do you mean a completely different server software? If so, which servers have you tried?

Regards

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

More
26 Dec 2023 06:56 - 26 Dec 2023 08:12 #12496 by mut9bu
Hello
In my .NET Framework 4.7.2 project I am subscribing to multiple OPC DA Classic items (just few 3-4 items for test) with the following sample code, below. The code works fine but surprisingly the data is read very often as value null with quality "UncertainNonspecific LimitOk (64)". I can say that min 30-40% of the total data changes are read with this quality code. I have also tried on different OPC DA servers, but result was the same.
For comparing I have subscribed to the same items with the OPC DA test client. But in this case I always get good quality 192. Is it possible that there is a problem with the code I am using?
public static void Main1()
        {
            // Instantiate the client object.
            using (var client = new EasyDAClient())
            {
                client.ItemChanged += client_Main1_ItemChanged;
 
                Console.WriteLine("Subscribing item changes...");
                client.SubscribeMultipleItems(
                    new[] {
                            new DAItemGroupArguments(ipaddress, "OPC.IwSCP.1", "!BSTR,IndraMotion_MTX_P60,Firmware.DeviceFirmware", 1000, null), 
                            new DAItemGroupArguments(ipaddress, "OPC.IwSCP.1", "!BSTR,IndraMotion_MTX_P60,System.HardwareDescription", 1000, null), 
                            new DAItemGroupArguments(ipaddress, "OPC.IwSCP.1", "!BSTR,IndraMotion_MTX_P60,NC.MacodaParameter,100100001", 1000, null)                             
                            });
 
                Console.WriteLine("Processing item changed events for 1 minute...");
                Thread.Sleep(60 * 1000);
 
                Console.WriteLine("Unsubscribing item changes...");
            }
 
            Console.WriteLine("Finished.");
        }
 
        // Item changed event handler
        static void client_Main1_ItemChanged(object sender, EasyDAItemChangedEventArgs e)
        {
            if (e.Succeeded)
                Console.WriteLine($"{e.Arguments.ItemDescriptor.ItemId}: {e.Vtq}");
            else
                Console.WriteLine($"{e.Arguments.ItemDescriptor.ItemId} *** Failure: {e.ErrorMessageBrief}");
        }
Last edit: 26 Dec 2023 08:12 by support.

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

Moderators: support
Time to create page: 0.064 seconds