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.

Callback gets fired even when value hasn't changed

More
30 Dec 2022 15:54 #11394 by support
It looks like that you requirements are a bit different from what the OPC specs prescribe. So yes, you can still do that, but with additional processing on your side, as you suggested.

Best regards

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

More
29 Dec 2022 21:12 #11391 by aris
Yes, I already have subscriptions. Well, I just wanted to ask you and them how to avoid getting "old" values on a subscription. I think I will have to handle this in my code then.

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

More
29 Dec 2022 07:43 #11386 by support
Hello.
there are no such terms defined in the OPC spec.

I suppose that when they say they say "polled" mean, they mean the usage of OPC Read calls. That corresponds to IEasyDAClient.ReadXXXX methods.
And when they say "Exception", they mean the OPC subscription mechanism, which corresponds to the usage of EasyDAClient.SubscribeXXXX methods.

But I think that their answer actual does not relate to your question. My understanding is that you are already using subscriptions.

Regards

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

More
29 Dec 2022 04:52 #11385 by aris
I talked to Kepware and they said:

the client (EasyDAClient) can usually request data in either "Polled" or "Exception" modes. In Polled mode the Server response contains the latest value for each item regardless of data change. In Exception mode the Server response contains the latest value of each item only if value has changed. The OpcLabs application would have to have the Exception mode available in order to receive updates on data change.

Is there a way to request data in either "Polled" or "Exception" modes either with EasyDAClient or EasyUAClient?

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

More
22 Nov 2022 07:41 #11226 by support
Hello.

it is incorrect to think of the subscription mechanism as if the library of actively acquiring anything. The subscriptions in EasyDAClient rely on the underlying OPC subscriptions, and the EasyDAClient simply send you whatever the OPC server sends to the EasyDAClient.

So, if you have concerns about how it works, you should look for answers in the OPC specifications and on the server side, but not on the client side.
In general, servers should be sending the updates in the time order.

The library instructs the server to provide the subscription updates, and then it simply "waits" until the server provides something, and it sends it to you - in the same order as it was received from the server. It does not change the order, it does not change the values, it does not change the timestamps, it does not change the qualities, it does not filter anything out. That is by design.

Some servers do not send out notifications if the value has not changed. But some will happily send out a notification with the same value, if they have acquired a new data and the timestamp has changed. OPC "Classic" is not quite consistent in that. OPC UA has it defined somewhat better.

Regards

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

More
22 Nov 2022 07:29 - 22 Nov 2022 07:34 #11225 by aris
  1. It seems that when I call EasyDAClient::SubscribeItem, the callback gets fired with the old (current) value from the OPC server even though the value hasn't changed yet. Is this by design? If yes, is there an option to fire the callback only when the value has truly changed?
  2. If the above is true, consider the following chain of events: 1) I subscribed to an item, 2) the library has acquired the old value and is ready to send it to the user, 3) the item has just changed, 4) the library acquired the new value and is ready to send it to the user. Is it guaranteed that the old value will arrive before the new value?
Last edit: 22 Nov 2022 07:34 by aris.

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

Moderators: support
Time to create page: 0.049 seconds