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.

ConditionRefresh

More
16 Nov 2021 10:01 #10353 by support
Replied by support on topic ConditionRefresh

support wrote: Hello.

Sure, yes. Strictly speaking, strings like "[] Success; Refresh; RefreshComplete" are *not* the events. They are just formatted string representations of the actual event. The event is represented by an object with various properties, and the proper way to deal with the event from inside the program is to use those properties. And, there is a boolean RefreshComplete property, too.

Read this: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...&C%20Notification%20Event.html

I hope it helps. Let me know if you need some more info.

Best regards

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

More
16 Nov 2021 10:01 #10352 by support
Replied by support on topic ConditionRefresh
Hello.

Sure, yes. Strictly speaking, strings like "[] Success; Refresh; RefreshComplete" are *not* the events. They are just formatted string representations of the actual event. The event is represented by an object with various properties, and the proper way to deal with the event from inside the program is to use those properties.

Read this: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...&C%20Notification%20Event.html

I hope it helps. Let me know if you need some more info.

Best regards

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

More
16 Nov 2021 09:45 #10350 by AdiROC
Replied by AdiROC on topic ConditionRefresh
Hello

I have one more question related to this topic.
How is it possible to know, when the Refresh is complete?

The only thing I see is an event with the following context:
[] Success; Refresh; RefreshInitiated
....
[] Success; Refresh; RefreshComplete

Is there a better way to ask for a completed Refresh instead comparing the string "[] Success; Refresh; RefreshComplete"?

Thank you

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

More
14 May 2021 15:28 - 14 May 2021 15:49 #9682 by support
Replied by support on topic ConditionRefresh
Hello.

I do not see doing that as any disadvantage, quite the opposite. You will end up having the data closer to where they are consumed, and your REST client will get them *much* faster compared to a ConditionRefresh from the server.

QuickOPC has certain design ideas baked into itself, and in some areas, it provides higher level API than just what is OPC UA specs.

If this design does not fit your usage, you'd be better off using a different library (but I do not think this is the case with what you have described). Trying to get around the design is highly discouraged and it is possible that it won't even work. For example, you could try to extract subscription Ids from SubscriptionDiagnosticsArray variable in the server, but you may run into problems like a) permissions, b) whether the server supports it or not, c) how to map the subscription Ids to the monitored items/event subscriptions in QuickOPC, d) whether the event from the manually invoked ConditionRefresh will actually be correctly delivered by QuickOPC to you - because QuickOPC does not know about this additional ConditionRefresh - and those are just the issues that came to my mind first.

Best regards
Last edit: 14 May 2021 15:49 by support.

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

More
14 May 2021 13:44 #9681 by AdiROC
Replied by AdiROC on topic ConditionRefresh
Thank you for your fast replies!

This was my emegency plan ;)

Is there no easier way for example by reading all subscription ID's from the server and update them all?

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

More
14 May 2021 10:43 #9679 by support
Replied by support on topic ConditionRefresh
Hello.

The fact that you ConditionRefresh "hidden" from you in QuickOPC is by design and is not going to change.
In your case your code should keep the data from incoming event notifications in memory. If the REST client needs all data, you can provide them from what you have stored.

Best regards

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

More
14 May 2021 09:59 #9678 by AdiROC
Replied by AdiROC on topic ConditionRefresh
Hello

Thank you for your answer.

In my case this wont work, because my OPC UA Client is like a gatway.
The other side from the gatway (REST Webservice) needs to be synchronized, for example after a restart.

Could you provide me with a update?

Or is ther a possibility to fire a RefreshRequiredEventType from the OPC UA client side?

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

More
14 May 2021 04:26 #9677 by support
Replied by support on topic ConditionRefresh
Hello.

In QuickOPC, you cannot get the subscription ID. The ConditionRefresh is called and handled automatically, internally by QuickOPC. For all event subscriptions you make with UAMonitoredItemArguments.AutoConditionRefresh == true, which is the default, QuickOPC will call refresh upon connections and reconnections, and also when the server indicates that the refresh is necessary, using a RefreshRequiredEventType event. To my knowledge, there are no other cases in which ConditionRefresh needs to be called.

QuickOPC also distinguishes, in the event notifications, which notifications belong to the ConditionRefresh and which represent "normal" events.

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

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

More
13 May 2021 21:26 #9675 by AdiROC
ConditionRefresh was created by AdiROC
Hello

I am programming a .NET Framework OPC UA Alarms & Conditions Client. So far so good. :)

The problem I am facing is that I need to provide a refresh functionality.

For that purpose I use the method "ConditionRefresh" in the Namespace "opcfoundation.org/UA/".
I can call the method by the provided example "CallMethod".

To call this method I need to pass a SubscriptionId. This also works fine, but I need to try out for the IDs...

My question now is where can I get the ID to pass?
Or is there a specialized client object to refresh?

Here is my code:

Part of the message is hidden for the guests. Please log in or register to see it.

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

Moderators: support
Time to create page: 0.059 seconds