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: 130
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: 970
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: 1007
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: 130
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:
13 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 130

pramanj: 86

Francesco Zambon: 78

ibrahim: 75

rocket science: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 731

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1450

Posts: 6201

Newest Members:

jadadibdin6, DiianaZof, antoniettakarn, Tor, Arktistync, floybateson9, inilarythikibia, celinamcguire5, helenblodo

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

Administrators: admin: 1