Avatar
Please consider registering
guest
sp_LogInOut Log Insp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSSsp_TopicIcon
Listing existing ALARMS on a node
April 15, 2020
16:57, EEST
Avatar
fabien.le-mentec
Member
Members
Forum Posts: 6
Member Since:
February 26, 2020
sp_UserOfflineSmall Offline

Hi,

when a UA client connects, is it possible to list all the active alarms on a node ? UaExpert does so, how does it does ? Is UaClient.readHistoryEvents the right way ?

Thanks for helping

Cheers

April 16, 2020
10:42, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1045
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

In OPC UA there exists standard Methods for ConditionType named ConditionRefresh (https://reference.opcfoundatio…..rt9/5.5.7/) and ConditionRefresh2 (https://reference.opcfoundatio…..rt9/5.5.8/).

They cause the server to resend events for Conditions (Alarms are Conditions), either on the whole Subscription level (ConditionRefresh) or for a single MonitoredItem (ConditionRefresh2).

You can call them e.g. like this:

try {
client.call(Identifiers.ConditionType, Identifiers.ConditionType_ConditionRefresh,
new Variant[] {new Variant(subscription.getSubscriptionId())});
} catch (Exception e) {
// Handle errors here
}

P.S. Generally I would expect more servers to support ConditionRefresh than ConditionRefresh2, since ConditionRefresh2 is defined in later versions of the specification. Still both do require that the server’s do support them.

April 16, 2020
11:22, EEST
Avatar
fabien.le-mentec
Member
Members
Forum Posts: 6
Member Since:
February 26, 2020
sp_UserOfflineSmall Offline

Hi Bjarne,

thanks a lot for your answer and details, it is exactly what I was looking for.

I understood that readHistoryEvents was not the way to go. After reading the specs, I was looking for a method called ConditionRefresh() in the SDK source code but did not find anything … Don’t you think and would be convenient to wrap the code you provided into a public method in UaClient ?

Cheers,

Fabien.

April 16, 2020
13:28, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1045
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

This is at least the intended way by the specification. In theory you probably could get the same info via reading event history, but basically then you would need to filter that by yourself to know which are e.g. active.

We are aware that a helper method for this could be useful. Probably would be more like Subscription.conditionRefresh() and/or MonitoredEventItem.conditionRefresh() when we actually implement it. Generally speaking we are aware of literally 100s of improvements etc. we could do, it is just a matter of how they are prioritized.

Forum Timezone: Europe/Helsinki
Most Users Ever Online: 1919
Currently Online:
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 90
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 733
Moderators: 8
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1545
Posts: 6516
Newest Members:
basilpullman, Richardmip, mood edibles, LouieWreve, daniellabdx, janessan21, sammiebeak359, gena7127517, thorstenbouldin, Brett.Rollason
Moderators: Jouni Aro: 1029, Pyry: 1, Petri: 1, Bjarne Boström: 1045, Jimmy Ni: 26, Matti Siponen: 353, Lusetti: 0, Elias: 0
Administrators: admin: 1