Avatar

Please consider registering
guest

sp_LogInOut Log In sp_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 RSS sp_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: 508
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

In OPC UA there exists standard Methods for ConditionType named ConditionRefresh (https://reference.opcfoundation.org/v104/Core/docs/Part9/5.5.7/) and ConditionRefresh2 (https://reference.opcfoundation.org/v104/Core/docs/Part9/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: 508
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: 267

Currently Online:
11 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 100

pramanj: 86

ibrahim: 69

kapsl: 57

gjevremovic: 49

TimK: 41

Fransua33: 39

fred: 36

Rainer Versteeg: 32

Thomas Reuther: 26

Member Stats:

Guest Posters: 0

Members: 1037

Moderators: 14

Admins: 1

Forum Stats:

Groups: 3

Forums: 14

Topics: 968

Posts: 4078

Newest Members:

NilsonChalie, markblue523, savannah3880, darrenyo, pokapoka95, roscoedomingo7, kathrinrohde588, aleidamott69222, mp, corinapzx0505

Moderators: Jouni Aro: 845, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 508, Heikki Tahvanainen: 402, Jukka Asikainen: 1, Teppo Uimonen: 20, Markus Johansson: 15, Matti Siponen: 18, Lusetti: 0

Administrators: admin: 0