Jump to content

Component: Level (DSP Outputs): Difference between revisions

From Flowcode Help
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable""
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;" align="center"" to "width="10%" align="center" class="mtx-class-macrohead""
Line 111: Line 111:
{| class="mtx-class-macrotable wikitable"
{| 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;" | '''ReadAverage'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadAverage'''
|-
|-
Line 125: Line 125:
{| class="mtx-class-macrotable wikitable"
{| 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;" | '''ReadAverageArray'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadAverageArray'''
|-
|-
Line 139: Line 139:
{| class="mtx-class-macrotable wikitable"
{| 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;" | '''ReadPeak'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadPeak'''
|-
|-
Line 153: Line 153:
{| class="mtx-class-macrotable wikitable"
{| 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;" | '''ReadPeakArray'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadPeakArray'''
|-
|-
Line 167: Line 167:
{| class="mtx-class-macrotable wikitable"
{| 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;" | '''ReadTrough'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadTrough'''
|-
|-
Line 181: Line 181:
{| class="mtx-class-macrotable wikitable"
{| 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;" | '''ReadTroughArray'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadTroughArray'''
|-
|-
Line 195: Line 195:
{| class="mtx-class-macrotable wikitable"
{| 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;" | '''ResetRecords'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ResetRecords'''
|-
|-

Revision as of 14:17, 13 July 2026

Author Matrix Ltd
Version 1.2
Category DSP Outputs


Level component

Allows for detection and collection of peaks, troughs and averages.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

Here is a basic example of the Level component. The example collects the max, min and average readings from the buffer and displays them on the LCD display.

Level


The values in the buffer are defined using the InputADC component.


Min: Minimum (smallest) value read from the buffer.

Max: Maximum (largest) value read from the buffer.

Average: Rolling average calculated from the values inside the buffer.








Macro reference

ReadAverage

ReadAverage
Returns the average from the last "Decay" number of index locations. 
- LONG Return


ReadAverageArray

ReadAverageArray
Returns the average from the last "Decay" number of buffers. 
- UINT Return


ReadPeak

ReadPeak
Returns the highest value from the last "Decay" number of index locations. 
- LONG Return


ReadPeakArray

ReadPeakArray
Returns the highest value from the last "Decay" number of buffers. 
- UINT Return


ReadTrough

ReadTrough
Returns the lowest value from the last "Decay" number of index locations. 
- LONG Return


ReadTroughArray

ReadTroughArray
Returns the lowest value from the last "Decay" number of buffers. 
- UINT Return


ResetRecords

ResetRecords
Allows the peak and trough to be reset back to default values. 
- BOOL ResetPeak
 
- BOOL ResetTrough
 
- VOID Return


Property reference

Properties
Connect To
DSP component with output buffer to collect our data from. 
Decay on Peak/Trough
Yes - The Peak and Trough value will only be maintained for the decay number of buffers. No - The record Peak and Trough values will be maintained until reset. 
Decay
Configures how many buffers or values to allow a record to persist