Component: Level (DSP Outputs): Difference between revisions
Appearance
No edit summary |
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead"" |
||
| (9 intermediate revisions by 2 users not shown) | |||
| 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 108: | ||
==Macro reference== | ==Macro reference== | ||
{| class="wikitable | ===ReadAverage=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadAverage''' | ||
|- | |- | ||
| colspan="2" | Returns the | | colspan="2" | Returns the average from the last "Decay" number of index locations. | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s32-icon.png]] - LONG | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
{| class="wikitable | ===ReadAverageArray=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadAverageArray''' | ||
|- | |- | ||
| colspan="2" | Returns the | | colspan="2" | Returns the average from the last "Decay" number of buffers. | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
{| class="wikitable | ===ReadPeak=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadPeak''' | ||
|- | |- | ||
| colspan="2" | Returns the | | colspan="2" | Returns the highest value from the last "Decay" number of index locations. | ||
|- | |- | ||
|- | |- | ||
| Line 135: | Line 150: | ||
{| class="wikitable | ===ReadPeakArray=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadPeakArray''' | ||
|- | |- | ||
| colspan="2" | Returns the highest value from the last "Decay" number of buffers. | | colspan="2" | Returns the highest value from the last "Decay" number of buffers. | ||
| Line 148: | Line 164: | ||
{| class="wikitable | ===ReadTrough=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadTrough''' | ||
|- | |- | ||
| colspan="2" | Returns the | | colspan="2" | Returns the lowest value from the last "Decay" number of index locations. | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s32-icon.png]] - LONG | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
{| class="wikitable | ===ReadTroughArray=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadTroughArray''' | ||
|- | |- | ||
| colspan="2" | Returns the | | colspan="2" | Returns the lowest value from the last "Decay" number of buffers. | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
{| class="wikitable | ===ResetRecords=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ResetRecords''' | ||
|- | |- | ||
| colspan="2" | Allows the peak and trough to be reset back to default values. | | colspan="2" | Allows the peak and trough to be reset back to default values. | ||
| Line 195: | Line 214: | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:22, 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.
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. | |
| Return | |
ReadAverageArray
| ReadAverageArray | |
| Returns the average from the last "Decay" number of buffers. | |
| Return | |
ReadPeak
| ReadPeak | |
| Returns the highest value from the last "Decay" number of index locations. | |
| Return | |
ReadPeakArray
| ReadPeakArray | |
| Returns the highest value from the last "Decay" number of buffers. | |
| Return | |
ReadTrough
| ReadTrough | |
| Returns the lowest value from the last "Decay" number of index locations. | |
| Return | |
ReadTroughArray
| ReadTroughArray | |
| Returns the lowest value from the last "Decay" number of buffers. | |
| Return | |
ResetRecords
| ResetRecords | |
| Allows the peak and trough to be reset back to default values. | |
| ResetPeak | |
| ResetTrough | |
| Return | |
