Is tag timestamp when the value last changed or when it was last written to?

Kind of a basic question, but I was not able to find a solid answer in any of the docs I read.

I need to get an average of a value from the tag historian over the last 24 hours or from the current time to when the order was changed (if that is more recent). Planning to get the max time between 24hrs ago and the last time the order number (opc tag) was changed.

I would like to know if the timestamp of the OrderNumber tag would be the last time the value changed OR the last time the tag received a value (regardless of the value changing)?

If it is the latter, my thought was just to add a Value Changed script to the OrderNumber tag that writes the current timestamp to another tag.

This is something I'd recommend testing and verifying on the particular tag of interest.

By default the timestamp on the OPC tags would only be updating when changes occur to the value or quality, but there is a Tag Group Property "Include Timestamp-Only Changes" that would alter that behavior.

Check the OPC UA properties in your tag group.

1 Like

Thanks for the response! Just checked that setting on the Tag Group and it is set to false which, from what I can gather, indicates that the timestamp on any tags in that group will, in fact, be the time the value or quality last changed.

So, using the tag's timestamp as I described above should work properly.

I will run with that assumption for now, and if anything is off I will report back.

Watch out for OPC server or gateway restarts too. I think they'll update the timestamp.

3 Likes