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.

How to know if the item did not change or broken?

More
10 Apr 2017 09:18 #5091 by support
The subscriptions are mainly independent - that is, it is efficient to make four at once, but from that moment on, their changes are reported individually.

Here are in general the situations that can happen - it depends on what you mean by "broken":

a) The OPC server detects a problem when obtaining the value, and it reports it using the Quality field in the VTQ (Value/Timestamp/Quality) triple, using the normal subscription mechanism. In this case, you will receive an ItemChanged notification with the quality that tells you about the problem.

b) The OPC server detects a problem when obtaining the value, and it reports it using the item-wise error (HRESULT), using the normal subscription mechanism. In this case, you will receive an ItemChanged notification with non-null Exception property that tells you about the problem.

c) The OPC server goes down, stops responding, or the communication (network etc.) between the OPC client (QuickOPC+your code) and the OPC server breaks. In this case, similarly to the case above, you will receive an ItemChanged notification with non-null Exception property that tells you about the problem.

All in all, you should always be notified when there is a problem.
I hope this helps.

Note: There is an issue in OPC DA (but not in newer OPC UA, where multiple options exist), related to your question, but not precisely the same thing. The issue is with items that do not change their value, but are newly retrieved and therefore change their timestamp. A compliant OPC server is supposed *not* to notify the client with each such new timestamp, which is usually OK for some purposes (HMI) but not OK for purposes like trending, where one would like to know about each new timestamp.

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

More
07 Apr 2017 16:43 - 10 Apr 2017 09:11 #5090 by Li
I subscribed 4 items code as follows:
using (var easyDAClient = new EasyDAClient())
                {
                    easyDAClient.ItemChanged += easyDAClient_ItemChanged;
 
                    easyDAClient.SubscribeMultipleItems(
                        new[] {
                            new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Random", 1000, null), 
                            new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Trends.Ramp (1 min)", 1000, null), 
                            new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Trends.Sine (1 min)", 1000, null),  
                            new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Register_I4", 1000, null)
                        });
 
                    Console.WriteLine("Processing item changed events for 1 minute...");
                    Thread.Sleep(60 * 1000);
                }
 
if 4 items(A,B,C,D) value changed, I will retrieve 4 value. But if only 3 changed (A,B,C), I can only retrieved 3 values.

I did not retrieve value of D.

I dont konw if the D is broken or value didn't change.

I retrieve data from 4 PLC, so some items broken are possible.

How could distinguish "broken" and "no new value"?

thx
Last edit: 10 Apr 2017 09:11 by support.

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

Moderators: support
Time to create page: 0.043 seconds