Hi all,
I currently have a tag producing values every minute. My goal is to creat a performance equation that will sum the readings every 15 minutes. So when a source tag with a timestamp of ##:15, ##:30, ##:45 or ##:00 is recieved, a sum of the last 15 values is caulculated.
Heres what I have so far:
if minute(PrevEvent('TagName', '*')) = 14 then TagTot('TagName', '*-15minutes', '*')*1440 else if minute(PrevEvent('TagName', '*')) = 29 then TagTot('TagName', '*-15minutes', '*')*1440 else if minute(PrevEvent('TagName', '*')) = 44 then TagTot('TagName', '*-15minutes', '*')*1440 else if minute(PrevEvent('TagName', '*')) = 59 then TagTot('TagName', '*-15minutes', '*')*1440 else noOutput()
Currently the above equation is almost producing the correct results, but is marginally off. For example, when it producing a sum of whole numbers it gives me a decimal number. Could there be some interpolation going on? If so how can this be switched off. Any other suggestions are greatly appreciated.
Regards,
Steve