# Revival of repeated topic- Tag History OnChange using PLC timestamp

**URL:** <https://forum.inductiveautomation.com/t/revival-of-repeated-topic-tag-history-onchange-using-plc-timestamp/79420>\
**Category:** Ignition\
**Created:** [September 20, 2023, 8:34pm UTC](https://forum.inductiveautomation.com/t/revival-of-repeated-topic-tag-history-onchange-using-plc-timestamp/79420 "2023-09-20T20:34:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![NorthPoint](https://avatars.discourse-cdn.com/v4/letter/n/a88e4f/32.png) [@NorthPoint](https://forum.inductiveautomation.com/u/NorthPoint)\
**Post date:** [September 20, 2023, 8:34pm UTC](https://forum.inductiveautomation.com/t/revival-of-repeated-topic-tag-history-onchange-using-plc-timestamp/79420/1 "2023-09-20T20:34:11Z")

</div>

Reference back to [OPC UA tag history "on change" not working - #19 by SBL\_MC](https://forum.inductiveautomation.com/t/opc-ua-tag-history-on-change-not-working/48859/19) and many other similar posts.

Tag history OnChange (default) sample mode will use a timestamp from the PLC or third party OPC server to store in the database. Cycle/tag group use the Ignition server timestamp. In some cases, time synching PLCs is outside of our control- the PLCs are just not going to get time synched, period. So they can be badly off in my most recent case, history samples in the future, which caused massive confusion in the trending systems and subsequently to the observing users. The only option is to which from OnChange to use periodic/tag group sampling, which removes most of the advantages OnChange gave us.

- Can we restore an option to use the SERVER timestamp with OnChange, in the case that the PLC timestamp is irreparably wrong. Make it an override choice.
- Through observation with the same tag using OnChange, I have seen a MIXTURE of samples with the bad time stamp and samples with correct server timestamps. I suspect that the "Max Time Between" override mechanism IS using the server timestamp, while at the same time a change is getting the PLC timestamp. So it is the worst case- not just collecting samples in the future, but they are not ALL consistently in the future, they are some in the future and some correct......the interpolation system had no idea what to do wiith that and was causing VERY strange behavior.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 20, 2023, 8:40pm UTC](https://forum.inductiveautomation.com/t/revival-of-repeated-topic-tag-history-onchange-using-plc-timestamp/79420/2 "2023-09-20T20:40:40Z")

</div>

When you talk about a "PLC timestamp" are you talking about a PLC with an embedded OPC UA server, or a specific protocol that actually includes timestamps like DNP3?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [September 20, 2023, 9:02pm UTC](https://forum.inductiveautomation.com/t/revival-of-repeated-topic-tag-history-onchange-using-plc-timestamp/79420/3 "2023-09-20T21:02:18Z")

</div>

I'm not familiar with the problem but if I understand the situation is:

- The PLC timeclock is wrong and you can't change it.
- You're using the PLC's OPC server to provide tag data (and timestamp).
- Tag history timestamps are wrong as a result.

If I had to sort it out I might try this:

- Remove the history binding from each of the OPC tags but let them run as normal.
- Create an expression tag for each of the OPC tags and have its expression point to the OPC tag.
- Enable tag history on the expression tags.

I would expect the expression tag to have the value of the OPC tag but the timestamp of the Ignition gateway.

I don't have any way to test the theory!

---

<div class="post-metadata">

**Author:** ![CFCode](https://avatars.discourse-cdn.com/v4/letter/c/dc4da7/32.png) [@CFCode](https://forum.inductiveautomation.com/u/CFCode)\
**Post date:** [February 13, 2025, 7:14pm UTC](https://forum.inductiveautomation.com/t/revival-of-repeated-topic-tag-history-onchange-using-plc-timestamp/79420/4 "2025-02-13T19:14:54Z")

</div>

This worked for me! Thanks for the idea!

I wish Ignition allowed changing the source of the timestamp for "On change" events, but this will do for now.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 13, 2025, 8:21pm UTC](https://forum.inductiveautomation.com/t/revival-of-repeated-topic-tag-history-onchange-using-plc-timestamp/79420/5 "2025-02-13T20:21:22Z")

</div>

Don't forget to mark an answer as the Solution!

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [February 13, 2025, 8:30pm UTC](https://forum.inductiveautomation.com/t/revival-of-repeated-topic-tag-history-onchange-using-plc-timestamp/79420/6 "2025-02-13T20:30:21Z")

</div>

> [@Transistor](#):
>
> Don't forget

Umm....Not the OP?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 13, 2025, 8:40pm UTC](https://forum.inductiveautomation.com/t/revival-of-repeated-topic-tag-history-onchange-using-plc-timestamp/79420/7 "2025-02-13T20:40:10Z")

</div>

Ha! Thanks.
