Professional OPC
Development Tools


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.

When EasyDAItemChangedEventArgs.Succeeded can be false?

31 Oct 2022 06:08 #11180 by support

1. Calling ReadItemXXXX from inside the data change handler is one the worst ideas possible. If the server had the value for you, it would have sent it to you. It=f it does not, calling ReadItemXXX is not going to give it to you. When the server obtain the value, it will send it to you. As I wrote before, there is no need to interfere with the mechanisms that already exist.

2. This is server dependent. Ask on the server side if that is a concern. OPC communications are not hard real-time, i.e. the timing is not fully deterministic. If the server "is not able to obtain the value", it should send the client (via subscription) a Bad quality or an error.

3. I wrote "The EasyDAClient.SubscribeItem indicates a permanent intent to subscribe and stay subscribed. ". This means - until you Unsubscribe, without time/count limitation. But note that it does not always mean that QuickOPC actively tries to do something. It depends on the situation. If the problem is, for example, that the OPC client side has lost the connection to the OPC server, then yes, QuickOPC will repeatedly try to reconnect to the server and reestablish the subscription. But if the connection and subscription are well alive, QuickOPC isn't actually doing anything besides waiting for an update from the server; and the server will send it when there is a new value of a change in the status (quality/error).

The bottom line is: If you subscribe, the software does everything possible to keep you up-to-date with either the newest values, or the newest error/quality indications. It is pointless, and in fact, harmful, to try to achieve anything beyond that.


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

30 Oct 2022 23:51 #11179 by aris
  1. So, if there is Bad Quality (in DAVtq) I can try to read the value with ReadItemValue, right?
  2. What do you mean by "OPC communication can wait a little"? How long it will wait? If it waits too long and won't be able to obtain the value, will this result in error (Succeeded=false)?
  3. "will result in QuickOPC re-trying to deliver you the data." How many times will it try? Does it mean it will call my callback only after it re-tried X times or it will call the callback on each re-try?

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

30 Oct 2022 15:29 #11178 by support

in the event handler EasyDAClient.SubscribeItem , in most cases, the Succeeded=false indicates a problem between the OPC client and the OPC server , and not "inside" the OPC server. If the server is having problems obtaining the value, it is expected to indicate it using a Bad Quality (in DAVtq) - but that still counts as Succeeded=true.

The OPC servers handle the synchronization between device access and OPC client access, and simultaneous access is not treated as an error, but instead the access is serialized (for example, the OPC communication can wait a little). So there will be no error (Succeeded will be true), and not even a bad quality. Just some timing shift.

With this, your second question becomes kind of pointless. But in general case, any error indicates by Succeeded=false will result in QuickOPC re-trying to deliver you the data. The EasyDAClient.SubscribeItem indicates a permanent intent to subscribe and stay subscribed. Your code need not and should not interfere with QuickOPC mechanism, by trying to "enforce" some retry.

See also:


Best regards

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

29 Oct 2022 20:06 - 29 Oct 2022 20:07 #11177 by aris
I use EasyDAClient.SubscribeItem to subscribe to an OPC item. The callback returns EasyDAItemChangedEventArgs (args)
  1. What are the potential cases, besides connection issues, when args.Succeeded=false? If both EasyDAClient and the device try to access (read/write) the same OPC item on the OPC server simultaneously, I assume that the OPC server has some kind of locking mechanism - it will allow access to one thread while the other will wait. Am I right in my assumption? Will this scenario result in args.Succeeded=false if the device got the access first?
  2. If the above is true, what happens when e.Succeeded=false, will EasyDAClient try again or do I have manually call ReadItemValue to get the value now?
Last edit: 29 Oct 2022 20:07 by aris.

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

Moderators: support
Time to create page: 0.074 seconds