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
MonitoredDataItem Listener always returns serverTimestamp=null
October 25, 2022
23:24, EEST
Avatar
hbrackel
Member
Members
Forum Posts: 135
Member Since:
February 21, 2014
sp_UserOfflineSmall Offline

Hello,

when subscribing to dataChanges using an OPC UA client based on the SDK 4.8.0, the returned dataValues in the listener always return “null” for the ServerTimestamp. Other clients return a non-null value. Is there a configuration to choose the timestamps or is this the intended behavior?

Thanks,
Hans-Uwe

October 26, 2022
9:43, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

Yes, Subscription.setTimestampsToReturn(TimestampsToReturn.Both), with default value being TimestampsToReturn.Source.

It is not item-specific parameter: https://reference.opcfoundation.org/Core/Part4/5.12.2/#5.12.2.2, or well, there is multiple ways to think it, but at least it must be the same for a single bulk-createmonitoreditems, thus probably why it was made like this (changing it before adding items would cause items to use that one; though on a reconnect if the subscription was redone every item would use the setting of that time, thus in practice this value should be only set once before adding any items to the subscription).

October 26, 2022
15:40, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1010
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

And to continue. Typically, ServerTimestamp is not very useful, when you monitor data changes. You probably want to know when the value changed (SourceTimestamp) and not when the server was last checking it (ServerTimestamp). That’s why the default configuration is to leave it out from the communication and save bandwidth for more useful data 🙂

But as said, you can enable it, if you need it.

October 27, 2022
15:45, EEST
Avatar
hbrackel
Member
Members
Forum Posts: 135
Member Since:
February 21, 2014
sp_UserOfflineSmall Offline

Thank you very much for your replies. I agree that the value added by the ServerTimestamps is limited, but for debugging and comparing the dataChanges to those from other clients it may be helpful.

-HU

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
10 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

TimK: 41

Member Stats:

Guest Posters: 0

Members: 683

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

Reallywo, digitechroshni, LouieWreve, Kickbiche, karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1