# Detect a change gap on a value

**URL:** <https://forum.inductiveautomation.com/t/detect-a-change-gap-on-a-value/28566>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [September 26, 2019, 7:19am UTC](https://forum.inductiveautomation.com/t/detect-a-change-gap-on-a-value/28566 "2019-09-26T07:19:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joel.golinucci](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/joel.golinucci/32/9927_2.png) [@joel.golinucci](https://forum.inductiveautomation.com/u/joel.golinucci)\
**Post date:** [September 26, 2019, 7:19am UTC](https://forum.inductiveautomation.com/t/detect-a-change-gap-on-a-value/28566/1 "2019-09-26T07:19:58Z")

</div>

Hi,

I'm having values being historized, and I would like to be able to create an alarm when the value has exceeded a certain gap change over a given period of time.

For example, if the current value is more than 10% higher than the value one minute ago.

I'm using a Vision Client to make some tests:

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

I'm trying to use the script function `system.tag.queryTagHistory`  
And I'm expecting to get the current value and the value one minute ago:

> dateFin = system.date.now()  
> dateDebut = system.date.addMinutes(dateFin, -intervalleTemps)
> 
> results = system.tag.queryTagHistory(paths=[tagPath],  
> startDate=dateDebut,  
> intervalMinutes=intervalleTemps,  
> noInterpolation=True,   
> includeBoundingValues=True)
> 
> results = system.dataset.toPyDataSet(results)
> 
> event.source.parent.getComponent('txtAncienneDate').text = str(results[0][0])  
> event.source.parent.getComponent('txtNouvelleDate').text = str(results[1][0])
> 
> event.source.parent.getComponent('numAncienneValeur').floatValue = results[0][1]  
> event.source.parent.getComponent('numNouvelleValeur').floatValue = results[1][1]

The issue is, even though I set `noInterpolation=True`, the value from one minute ago still grows with time (it's being time-interpolated).

How can I get the exact history value from a certain amount of time in the past without interpolation ?

Thanks !
