Help understanding HistoricalEventFilter|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Help understanding HistoricalEventFilter
Avatar
EG
Member
Members
Forum Posts: 35
Member Since:
12/06/2021
sp_UserOfflineSmall Offline
1
08/14/2022 - 23:48
sp_Permalink sp_Print

I am trying to understand the purpose of the HistoricalEventFilter property of HistoricalEventNodes.

The description states:

“A filter used by the Server to determine which HistoricalEventNode fields are available in history.”

I don’t see how a property exposed by the server could then be used by the server itself to determine anything. It seems tautological. Surely the server is aware of what fields are available, since it is the server.

“It may also include a where clause that indicates the types of Events or restrictions on the Events that are available via the HistoricalEventNode.”

OK, I think I understand this clause.

“The HistoricalEventFilter Property can be used as a guideline for what Event fields the Historian is currently storing. But this field may have no bearing on what Event fields the Historian is capable of storing”

What is meant by “the Historian”? This term is not defined in OPC 10000-11.

Anecdotally I have implemented historical event access between the OPC UA .NET Standard SDK and UaExpert, and it functions identically with or without the HistoricalEventFilter being present (when present, just returning a null value).

Is returning null from this property compliant? What is the value of implementing it?

Thanks

Avatar
Randy Armstrong
Admin
Forum Posts: 1579
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
08/15/2022 - 10:41
sp_Permalink sp_Print

I don’t see how a property exposed by the server could then be used by the server itself to determine anything. It seems tautological. Surely the server is aware of what fields are available, since it is the server.

Anything in the Server address space is for the benefit of the Client. The property tells Clients what the Server used to collected events.

What is meant by “the Historian”? This term is not defined in OPC 10000-11.

Good catch. The well understood meaning is it is software that collects data and events and stores them as a time series for later use.

Is returning null from this property compliant? What is the value of implementing it?

As mentioned: it is for clients not the server and the server merely reports what it used internally.

Avatar
EG
Member
Members
Forum Posts: 35
Member Since:
12/06/2021
sp_UserOfflineSmall Offline
3
08/15/2022 - 12:10
sp_Permalink sp_Print

Hi Randy

I’m still not seeing how your explanation matches the description in the spec:

A filter used by the Server to determine which HistoricalEventNode fields are available in history.

This is the exact same wording used in ReadEventDetails.Filter. I can see how the ReadEventDetails would be used by the server, as it is an input to the server from a client. But if you’re saying the HistoricalEventFilter is for clients not the server, shouldn’t this read “used by the Client“?

Thanks

Avatar
Randy Armstrong
Admin
Forum Posts: 1579
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
08/15/2022 - 14:43
sp_Permalink sp_Print

When it is used by the server but it is not an input – it is an output.

The server will be configured to collect events using some filter. It reports the filter it is configured to use in the property.

Avatar
EG
Member
Members
Forum Posts: 35
Member Since:
12/06/2021
sp_UserOfflineSmall Offline
5
08/15/2022 - 22:00
sp_Permalink sp_Print

What should it report if there are two clients reading the same HistoricalEventNode with different filters?

Avatar
Randy Armstrong
Admin
Forum Posts: 1579
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
6
08/15/2022 - 23:56
sp_Permalink sp_Print

What should it report if there are two clients reading the same HistoricalEventNode with different filters?

It is not clear why you think that is possible. The Server should be returning the same value to every Client.

Avatar
EG
Member
Members
Forum Posts: 35
Member Since:
12/06/2021
sp_UserOfflineSmall Offline
7
08/16/2022 - 03:05
sp_Permalink sp_Print sp_EditHistory

The Client supplies a Filter in the ReadEventDetails structure. I thought the Server was supposed to return historical event data based on the ReadEventDetails Filter.

So I thought when you said “The server will be configured to collect events using some filter” you were referring to the clients requested filter.

Taking a step back, is the HistoricalEventFilter just supposed to show the supported select/where clauses that clients could potentially use?

edit:

I think the source of my confusion is because, I am not using the historical event access to literally store a collection of BaseEventType objects in an array, and then returning them. This wouldn’t be good enough for my use case, because I need to return events after power cycles.

The way the system works is the device records events in an agnostic way – completely separate to OPC UA. The historical event node is then used as an interface to access this database – the BaseEventType objects are generated on-demand for the Clients requested Filter.

So in my use case I am at no point “collecting events” based on the HistoricalEventFilter. The underlying event collection occurs at all times, and it has to because non-OPC UA systems (such as the HMI) have their own use cases that need to be fulfilled.

Saying that the HistoricalEventFilter is “determining” anything just doesn’t make sense to me, when using the feature in this way.

Avatar
Randy Armstrong
Admin
Forum Posts: 1579
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
8
08/16/2022 - 04:16
sp_Permalink sp_Print

The HistoricalEventFilter property is a Node in this AddressSpace that belongs to any Notifier that supports HistoricalEvents.

It is generally read-only.

If is metadata that tells the Client what it may ask for in the ReadEventDetails structure.

If your system does not have an OPC UA filter then you leave the where clause empty or put the types of the UA events that you support as a hint to the client on what event types exist.

IOW – the purpose is to guide the client in building event queries and you should not presume that it must literally match your internal event collection logic.

Avatar
EG
Member
Members
Forum Posts: 35
Member Since:
12/06/2021
sp_UserOfflineSmall Offline
9
08/16/2022 - 04:20
sp_Permalink sp_Print

Got it – thanks

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 34
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1445
Posts: 4889