====LAG==== ===Parameters=== ^Order^Name^Type^Desc^ |1|a|[[map|map]]|A map containing parameters for [[fGETHISTORY]] | |2|b|[[const]]|A number of seconds to 'bump' the requested range| ===Returns=== Places an updated version of the [[map|map]] on the stack ===Description=== This function is used to adjust the times in the parameters to a [[fGETHISTORY]] command by the given number of seconds. Positive amounts will move the start/end/range of the query **back**, while negative amounts will move the results **forward** in time. This function is normally used when you are using user-selected time-frames and want to adjust for a //time lag// between assets. This function is often used along-side [[fUNLAG]], which moves the time-stamps in the history of a set of [[point list|points]]. ===Example=== We want to query 15 minutes of data. But we don't want to include the **last two minutes**. We can do this by pushing our start and end times back by 120 seconds. 'Wind Turbine #1' [[fASSET]] 'Power' [[fPROPERTY]] {"range": "15 minutes"} 120 LAG [[fGETHISTORY]] If you're trying to synchronise multiple channels of data from different sources, you might want to use [[fUNLAG]] to adjust the timestamps returned by GETHISTORY. ===See Also=== [[fUNLAG]]