# History function is not working

**URL:** <https://forum.inductiveautomation.com/t/history-function-is-not-working/74280>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [May 30, 2023, 8:15am UTC](https://forum.inductiveautomation.com/t/history-function-is-not-working/74280 "2023-05-30T08:15:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inken\_Kestler](https://avatars.discourse-cdn.com/v4/letter/i/bcef8e/32.png) [@Inken\_Kestler](https://forum.inductiveautomation.com/u/Inken_Kestler)\
**Post date:** [May 30, 2023, 8:15am UTC](https://forum.inductiveautomation.com/t/history-function-is-not-working/74280/1 "2023-05-30T08:15:46Z")

</div>

Hi together,

I created an expression tag and enabled the history function.  
Sometimes it writes to the database, but sometimes not and I don't know why.  
(I'm using Ignition 8.1.17)

Here is a screenshot, where you can see what I mean:  
The tag "rob1\_2InDifferentStations" has the value 0 with the t\_stamp "Fri May 26 15:22:27 CEST 2023".  
But at the table on the right side, which has a binding with the tag history of this tag,you see a "-1" as last value. How is this possible?

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

I already changed the "minimal time between samples" for the history function to 100ms, because I thought that maybe the changes are so to quick for the standard time of 1 second:

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

But as you see, the difference of timestamp of the last stored -1 and the timestamp of the actual value 0 is 9 minutes !!

Has anybody an idea, what is wrong with my history function?

Kind regards,  
Inken

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [May 30, 2023, 8:30am UTC](https://forum.inductiveautomation.com/t/history-function-is-not-working/74280/2 "2023-05-30T08:30:48Z")

</div>

Could you show a picture of binding of the table?  
Your **Max Time Between Samples** is 0, I don't understand why the data in your picture like this.

---

<div class="post-metadata">

**Author:** ![Inken\_Kestler](https://avatars.discourse-cdn.com/v4/letter/i/bcef8e/32.png) [@Inken\_Kestler](https://forum.inductiveautomation.com/u/Inken_Kestler)\
**Post date:** [May 30, 2023, 8:57am UTC](https://forum.inductiveautomation.com/t/history-function-is-not-working/74280/3 "2023-05-30T08:57:25Z")

</div>

I changed the Min Time Between Samples, not the Max Time.

Here is the table binding:

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

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [May 30, 2023, 9:12am UTC](https://forum.inductiveautomation.com/t/history-function-is-not-working/74280/4 "2023-05-30T09:12:49Z")

</div>

I've only encountered this once.  
That database was deployed on a hard disk drive with extremely poor performance, so that a lot of data was abandoned.  
If this tag is the single one which lost history data, There is not a database matter.

---

<div class="post-metadata">

**Author:** ![Inken\_Kestler](https://avatars.discourse-cdn.com/v4/letter/i/bcef8e/32.png) [@Inken\_Kestler](https://forum.inductiveautomation.com/u/Inken_Kestler)\
**Post date:** [May 30, 2023, 10:43am UTC](https://forum.inductiveautomation.com/t/history-function-is-not-working/74280/5 "2023-05-30T10:43:37Z")

</div>

It is not the only tag.  
If the data would change really quick, I could understand that maybe the performance of the database is to bad.  
But my two values are several minutes apart. That shouldn't be a problem. I can proof this with several other tags, I store at my database. Sometimes with only a few seconds or even milliseconds between entries.
