You are not logged in.
Pages: 1
Topic closed
It calculates the time series average of previous N samples. What is the incremental time between samples? Is that the same as the REX master clock tick? Some of the blocks allow their own ticks but the moving average does not specify that. We are interested in calculating one week average, and want to specify N accordingly.
Offline
Hello sudhir,
thank you for your question. Sample period is the same as the sample period of the task where the "AVG" function block is placed.
Maximum number of samples (N) is internally set to 10 000 for now. You can set "n" higher then "N" however it will be trimmed to 10 000 samples anyway.
1 week = 10080 minutes
If you want to keep the sampling period as fast as possible and also calculate moving average over one week (exactly one week without 80 minutes because of 10 000 samples limitation) you need to set the task sampling period to 1 minute and set "n" to 10 000 samples.
If you insist on entire one week you can use sampling period for example 90 s and set "n" to 6 720 samples.
In a new version of REX you will be allowed to set the maximum number of samples "N" (of course with some limitations of allocated memory according to actual target platform).
Regards, Tomas
Last edited by tomáš čechura (2016-04-26 10:04:17)
Offline
Pages: 1
Topic closed