# Tag Historian. Sample mode. On change

**URL:** <https://forum.inductiveautomation.com/t/tag-historian-sample-mode-on-change/39107>\
**Category:** Ignition\
**Tags:** ignition78, ignition80, database, perspective\
**Created:** [September 28, 2020, 6:32am UTC](https://forum.inductiveautomation.com/t/tag-historian-sample-mode-on-change/39107 "2020-09-28T06:32:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![reaganw](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@reaganw](https://forum.inductiveautomation.com/u/reaganw)\
**Post date:** [September 28, 2020, 6:32am UTC](https://forum.inductiveautomation.com/t/tag-historian-sample-mode-on-change/39107/1 "2020-09-28T06:32:46Z")

</div>

Hey all,

I have a few OPC tags configured with the sample mode set to on change. I’m having an issue where it looks like data is only stored on my SQL server when the ‘Max Time Between Samples’ time has elapsed, despite the instrument value changing state. Config for a bool type attached below, is there something I have done in this configuration that may be causing this issue?

Thanks in Advance.

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

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 28, 2020, 11:53am UTC](https://forum.inductiveautomation.com/t/tag-historian-sample-mode-on-change/39107/2 "2020-09-28T11:53:34Z")

</div>

I suspect your deadband is rounding to ‘1’, since a boolean is treated as an integer for storage. Try ‘0’.

---

<div class="post-metadata">

**Author:** ![reaganw](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@reaganw](https://forum.inductiveautomation.com/u/reaganw)\
**Post date:** [September 28, 2020, 9:52pm UTC](https://forum.inductiveautomation.com/t/tag-historian-sample-mode-on-change/39107/3 "2020-09-28T21:52:26Z")

</div>

Thank you pturnel. That did the trick
