Write the same value again (changing Source Timestamp)

Questions regarding the use of the UaExpert.

Moderator: uaexpert

Post Reply
Danh
Jr. Member
Jr. Member
Posts: 2
Joined: 01 Sep 2023, 08:54

Write the same value again (changing Source Timestamp)

Post by Danh »

How can I with UaExpert write to a variable without changing its value (i.e. change its Source Timestamp)?

I could not achieve it in the Data Access View or Attributes panels. My application is as follows: I want to know if the result of a measurement is more often True or False. The measurement is not performed periodically. I read the result by subscribing with DataChangeTrigger = StatusValueTimestamp, so I get it also if its value remained unchanged. But with UaExpert I am unable to write it to the server if the value remains unchanged.

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re: Write the same value again (changing Source Timestamp)

Post by Support Team »

Hi,

no you can't. The UaExpert is writing the value only, but not the timestamp.

If the value is "identical" as before, the Server may decide "no change of value", hence no change of time stamp (it is still the same as before). Most UA servers do "not allow" to write the Timestamp (in order to have one singe source of truth, which is the server).

There are mechnaizm in OPC UA technology to ensure that you do not miss any data, specially when data is not changing periodically (e.g. Monitoring mode, StatusValueTimestamp, Subscription, ValueQueue, QueueOverflow, Deadband, ScanRate, PublishInterval and Keep Alive), which -when configured correctly- ensure that you can not miss any data. All this mechanizm are designed for one only reason: to prevent you form periodically reading and from occasionally writing without changing anything. In other words the OPC UA built in mechanizm should prevent you from wasting bandwith and processing power, but still ensuring data.

What you did "subscribing to timestamp changes (in addition to value changes) is the best approach, but writing identical value in good hope of a source stamp change, is bad idea.
Best regards
Unified Automation Support Team

Danh
Jr. Member
Jr. Member
Posts: 2
Joined: 01 Sep 2023, 08:54

Re: Write the same value again (changing Source Timestamp)

Post by Danh »

Thank you for the answer.
no you can't. The UaExpert is writing the value only, but not the timestamp.
This may explain why with another client (LabView) I can, because it sends the timestamp, even in default configuration.

Since the whole purpose of subscribing with StatusValueTimestamp is to receive notifications of writings with unchanged value, I think it would be nice if UaExpert could (optionally) write the source timestamp along with the value. UaExpert could then be used to test StatusValueTimestamp subscriptions.

A byway question: if UaExpert does not send the source timestamp, is it the server who puts the source timestamp, if the value is different?

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re: Write the same value again (changing Source Timestamp)

Post by Support Team »

Hi,
Since the whole purpose of subscribing with StatusValueTimestamp is to receive notifications of writings with unchanged value
no, this is not the purpose, at least not the only one. In OPC UA the "Server" owns the data (represents the data source), therefore it is in his own discretion to change value (when process value in the source has changed) or to change the status, even when the value has no changed (e.g. lost connection to underlying source) or change the timestamp (e.g. when the source got updated, but without value change but probably with status change, hence you get to know when the status has changed). However the "Client", in most cases is just the consumer of the data, some server allow writing the value, but very many do not allow writing the timestamp or status (because this is just "additional information" regarding the value). But again it's in the discretion of the server.

It is aggreed that "for testing" if a server allows writing TimeStamp or not, it would be cool feature in UaExpert to "writeVQT" (which is the term from classic OPC, where this feature was already present, but also optional and not much used), however UaExpert writes "value" only, and (most) servers allow just that.
Best regards
Unified Automation Support Team

Post Reply