Jump to content

Component: Level (DSP Outputs): Difference between revisions

From Flowcode Help
No edit summary
No edit summary
Line 91: Line 91:


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




Line 96: Line 98:
==Macro reference==
==Macro reference==


===ReadTroughArray===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 109: Line 112:




===ReadTrough===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 122: Line 126:




===ReadAverage===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 135: Line 140:




===ReadPeakArray===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 148: Line 154:




===ReadAverageArray===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 161: Line 168:




===ReadPeak===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 174: Line 182:




===ResetRecords===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-

Revision as of 11:49, 3 February 2023

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

ReadTroughArray

ReadTroughArray
Returns the lowest 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


ReadAverage

ReadAverage
Returns the average 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


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


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