I have configured a statistical data point function to set Voltage 2 to be the average value of Voltage 2 Raw over the last 5 seconds.
I was surprised to see that the dp_function sets the time stamp of the averaged value to the beginning of the 5 second period being averaged, even with the delay parameter set to 0, so that it effectively represents the average over the next 5 seconds rather than the last 5 seconds.
That gives the impression that the average function is looking into the future, which doesn't really make sense to me.
I hope that loading an attachment works, then this can be seen in the attached trend.
Is this behavior intentional? I couldn't find anything in the help document describing it.
I saw that delay, is defined as an integer, so I though I would try changing its value to -5 to compensate.
That blocked up the event manager completely and I had to restart the whole project to get it running again, so that did not have the desired effect.
What I really wanted to report is that the statistical function creates an event at every interval even if the value does not change.
I actually want to avoid that, and thought that I could use the removeDoneCB() function to do that,
but to do that I would need to know the actual value of the datapoint and I cannot access that in its dp function.
Does anyone know I can suppress the events generated by dp_fct statistical functions if there are no value changes?