Component: Level (DSP Outputs)
From Flowcode Help
Jump to navigationJump to searchAuthor | Matrix Ltd |
Version | 1.2 |
Category | DSP Outputs |
Contents
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.
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 |