Jump to content

Component: Running Average Float (Calculation): Difference between revisions

From Flowcode Help
Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix TSL |- | width="20%" style="color:gray;" | Version | 1.0 |- | width="20%" style="color:gray..."
 
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(3 intermediate revisions by the same user not shown)
Line 26: Line 26:


===Filter===
===Filter===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Filter'''
| width="90%" class="mtx-class-macrohead" | '''Filter'''
|-
|-
| colspan="2" | Performs the filtering function, passing in the latest sampled value and outputting the latest filtered value. 
| colspan="2" | Performs the filtering function, passing in the latest sampled value and outputting the latest filtered value. 
Line 45: Line 45:


===SetFilterRatio===
===SetFilterRatio===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetFilterRatio'''
| width="90%" class="mtx-class-macrohead" | '''SetFilterRatio'''
|-
|-
| colspan="2" | Sets the amount of input that makes it into each output. 0.25 would be 25% new and 75% old. 
| colspan="2" | Sets the amount of input that makes it into each output. 0.25 would be 25% new and 75% old. 
Line 64: Line 64:


===SetFilterValue===
===SetFilterValue===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetFilterValue'''
| width="90%" class="mtx-class-macrohead" | '''SetFilterValue'''
|-
|-
| colspan="2" | Sets the absolute value of the filter value i.e. for setting the initial state. 
| colspan="2" | Sets the absolute value of the filter value i.e. for setting the initial state. 
Line 84: Line 84:
==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|}
|}

Latest revision as of 14:23, 13 July 2026

Author Matrix TSL
Version 1.0
Category Calculation


Running Average Float component

Allows a value from a sensor to be averaged out filtering out high frequencies and removing noise. Running average means we have a variable that we maintain that on each pass will be 10% new value + 90% old value for example at a ratio of 0.1.

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

Macro reference

Filter

Filter
Performs the filtering function, passing in the latest sampled value and outputting the latest filtered value. 
- FLOAT Value
 
- FLOAT Return


SetFilterRatio

SetFilterRatio
Sets the amount of input that makes it into each output. 0.25 would be 25% new and 75% old. 
- FLOAT Ratio
Range: 0.0 to 1.0 
- VOID Return


SetFilterValue

SetFilterValue
Sets the absolute value of the filter value i.e. for setting the initial state. 
- FLOAT Value
 
- VOID Return


Property reference

Properties

Component Source Code

Please click here to download the component source project: FC_Comp_Source_RunningAverageFloat.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_RunningAverageFloat.fcfx