This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

24h Temperature average
#5
(18.09.2022, 18:23)Hi SteffenThanks a lot, this looks like a neat solution. I shall try it this weekend and report.Cheers!Martinpioneersteffen Wrote: Hi Martin,

I made the moving average in my solution as following:

1. Create object / group address for the average value (example: 49/0/1)
2. Create time triggered script with 5min cycle time
3. Use the following code inside the script and adjust the value group address:



Code:
average=grp.getvalue('49/0/1')
value=grp.getvalue('49/0/2') —- value that should be averaged
average = (average *((24*60/5)-1) + value)/(24*60/5)
grp.checkwrite('49/0/1', average)

I hope this is working for you!

Best Regards 
Steffen
Reply


Messages In This Thread
24h Temperature average - by kropfm - 17.09.2022, 09:21
RE: 24h Temperature average - by kropfm - 21.09.2022, 18:23
RE: 24h Temperature average - by Daniel - 19.09.2022, 07:28
RE: 24h Temperature average - by kropfm - 22.09.2022, 03:49
RE: 24h Temperature average - by admin - 19.09.2022, 08:15

Forum Jump: