sys::Obj sys::Virtual sys::Component control::Avg10
public class Avg10
[niagaraIcon="module://icons/x16/control/math/average.png"]
Avg Running Average math object
out = (sum last 10 value)/10
Samples current value again if value has not changed in maxTime msec. For first ten samples, averages only the samples recd.
public property float in
input value to be averaged
public property int maxTime [config, unit="millisecond"]
if maxTime == 0, then average every scan if maxTime > 0, then average a new sample every maxTime milliseconds
or every scan, whichever is greater.
public property float out [readonly]
averaged output
public override void changed(Slot slot)
Behavior to execute when a property is changed externally
public virtual override void execute()
Execute is called once every scan.
public virtual override void start()
Callback when component is first started in an app, before the first call to propagateLinksTo() or execute().