# Memory Tag - Back Timestamping delayed data

**URL:** <https://forum.inductiveautomation.com/t/memory-tag-back-timestamping-delayed-data/71906>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [March 31, 2023, 3:34pm UTC](https://forum.inductiveautomation.com/t/memory-tag-back-timestamping-delayed-data/71906 "2023-03-31T15:34:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JR\_NP](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@JR\_NP](https://forum.inductiveautomation.com/u/JR_NP)\
**Post date:** [March 31, 2023, 3:34pm UTC](https://forum.inductiveautomation.com/t/memory-tag-back-timestamping-delayed-data/71906/1 "2023-03-31T15:34:06Z")

</div>

Hello,

I am trying to write to various memory tags with slightly delayed data (10-30 minutes) that is also sometimes out of order. Consider the following example:

**Example Tag Current Value:**  
**last value: 10**  
**last timestamp: 12:00**

**Now the delayed data comes in at 12:30:**  
**Delayed Data:**  
**value:15**  
**timestamp: 12:10**

If I write the new datapoint via system.tag.writeblocking, I see the value and timestamp enter the tag's value/timestamp fields correctly. However, when plotted or viewed in the tag history the timestamp is when the tag was written which is incorrect.

If I try to write the new datapoint via system.tag.storetaghistory, I don't see it show up anywhere.

There is also the case where data comes in out of order. For example I may receive the 12:20 data before the 12:10 data. Any tips on how to approach this issue?

---

<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:** [March 31, 2023, 3:44pm UTC](https://forum.inductiveautomation.com/t/memory-tag-back-timestamping-delayed-data/71906/2 "2023-03-31T15:44:29Z")

</div>

Tag Provider's have an "Allow Backfill" setting that defaults to false. Try setting it to true and see if the behavior changes.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/b/7b5f8f020d3436ac8eb10c46d5fe93e4acdd74f5.png)

---

<div class="post-metadata">

**Author:** ![Marek\_Uhlir](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@Marek\_Uhlir](https://forum.inductiveautomation.com/u/Marek_Uhlir)\
**Post date:** [June 14, 2023, 12:56pm UTC](https://forum.inductiveautomation.com/t/memory-tag-back-timestamping-delayed-data/71906/3 "2023-06-14T12:56:29Z")

</div>

Hi,  
I left the Back-fill in the default setting and use this:

```auto
from com.inductiveautomation.ignition.common.model.values import BasicQualifiedValue, QualityCode
tagpath = yourTagpath
qval = BasicQualifiedValue(value = yourValue , quality=QualityCode.Good, timestamp = yourTimestamp)
system.tag.writeBlocking([tagpath], [qval])

```
