Difference between revisions of "Component: Level (DSP)"

From Flowcode Help
Jump to navigationJump to search
 
(13 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| width="50%"
 
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
| [http://www.matrixltd.com Matrix Ltd]
+
| Matrix Ltd
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
 
| 1.2
 
| 1.2
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| DSP
 
| DSP
 
|}
 
|}
  
  
 
+
==Level component==
==[[File:Component Icon e648c3de_ec39_4a3f_bbd9_46e45cce4a63.png|Image]] Level component==
 
 
Allows for detection and collection of peaks, troughs and averages.
 
Allows for detection and collection of peaks, troughs and averages.
  
==Examples==
+
==Component Pack==
  
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.
+
DSP
  
[[File:Level.fcfx]]
+
==Detailed description==
  
  
The values in the buffer are defined using the InputADC component.
 
  
[[File:DSPLevel.jpg]]
 
  
==Downloadable macro reference==
 
  
===<span style="font-weight: normal;"><u><tt>ReadPeakTick</tt></u></span>===
 
Returns the highest value from the last "Decay" number of index locations.
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
 
  
  
'''Return value'''
 
  
:[[Variable Types|UINT]]
 
  
  
===<span style="font-weight: normal;"><u><tt>ReadTrough</tt></u></span>===
 
Returns the lowest value from the last "Decay" number of buffers.
 
  
'''Parameters'''
+
''No detailed description exists yet for this component''
  
:''This macro has no parameters''
+
==Examples==
  
  
'''Return value'''
 
  
:[[Variable Types|UINT]]
 
  
  
===<span style="font-weight: normal;"><u><tt>ReadAverage</tt></u></span>===
 
Returns the average from the last "Decay" number of buffers.
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
 
  
  
'''Return value'''
 
  
:[[Variable Types|UINT]]
 
  
  
===<span style="font-weight: normal;"><u><tt>ReadAverageTick</tt></u></span>===
 
Returns the average from the last "Decay" number of index locations.
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
+
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.
  
 +
{{Fcfile|Level.fcfx|Level}}
  
'''Return value'''
 
  
:[[Variable Types|UINT]]
+
The values in the buffer are defined using the InputADC component.
  
 +
[[File:DSPLevel.jpg]]
  
===<span style="font-weight: normal;"><u><tt>ReadTroughTick</tt></u></span>===
 
Returns the lowest value from the last "Decay" number of index locations.
 
  
'''Parameters'''
+
Min: Minimum (smallest) value read from the buffer.
  
:''This macro has no parameters''
+
Max: Maximum (largest) value read from the buffer.
  
 +
Average: Rolling average calculated from the values inside the buffer.
  
'''Return value'''
+
==Downloadable macro reference==
  
:[[Variable Types|UINT]]
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadTroughArray'''
 +
|-
 +
| colspan="2" | Returns the lowest value from the last "Decay" number of buffers.&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>ReadPeak</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Returns the highest value from the last "Decay" number of buffers.
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadTrough'''
 +
|-
 +
| colspan="2" | Returns the lowest value from the last "Decay" number of index locations.&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
'''Parameters'''
 
  
:''This macro has no parameters''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadAverage'''
 +
|-
 +
| colspan="2" | Returns the average from the last "Decay" number of index locations.&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
  
'''Return value'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadPeakArray'''
 +
|-
 +
| colspan="2" | Returns the highest value from the last "Decay" number of buffers.&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
:[[Variable Types|UINT]]
 
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadAverageArray'''
 +
|-
 +
| colspan="2" | Returns the average from the last "Decay" number of buffers.&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
  
==Simulation macro reference==
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadPeak'''
 +
|-
 +
| colspan="2" | Returns the highest value from the last "Decay" number of index locations.&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
''This component does not contain any simulation macros''
 
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ResetRecords'''
 +
|-
 +
| colspan="2" | Allows the peak and trough to be reset back to default values.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" | ResetPeak
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" | ResetTrough
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
==Property reference==
 
<span style="font-weight: normal;"><u>Buffer Manager</u></span>
 
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''buffer_manager''.
 
  
Reference to DSP system buffer manager component.
 
  
<span style="font-weight: normal;"><u>Input</u></span>
+
==Property reference==
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''input_a''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
Buffer assigned to input channel
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
<span style="font-weight: normal;"><u>Decay</u></span>
+
|-
 
+
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''decay''.
+
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
 
+
| width="90%" | Connect To
Configures how many buffers or values to allow a record to persist
+
|-
 +
| colspan="2" | DSP component with output buffer to collect our data from.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Connect To
 +
|-
 +
| colspan="2" | DSP component with output buffer to collect our data from.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 +
| width="90%" | Decay on Peak/Trough
 +
|-
 +
| colspan="2" | 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.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 +
| width="90%" | Decay
 +
|-
 +
| colspan="2" | Configures how many buffers or values to allow a record to persist&nbsp;
 +
|}

Latest revision as of 17:19, 9 November 2022

Author Matrix Ltd
Version 1.2
Category DSP


Level component

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

Component Pack

DSP

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.

FC6 Icon.png Level


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

DSPLevel.jpg


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.

Downloadable macro reference

Fc9-comp-macro.png ReadTroughArray
Returns the lowest value from the last "Decay" number of buffers. 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png ReadTrough
Returns the lowest value from the last "Decay" number of index locations. 
Fc9-s32-icon.png - LONG Return


Fc9-comp-macro.png ReadAverage
Returns the average from the last "Decay" number of index locations. 
Fc9-s32-icon.png - LONG Return


Fc9-comp-macro.png ReadPeakArray
Returns the highest value from the last "Decay" number of buffers. 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png ReadAverageArray
Returns the average from the last "Decay" number of buffers. 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png ReadPeak
Returns the highest value from the last "Decay" number of index locations. 
Fc9-s32-icon.png - LONG Return


Fc9-comp-macro.png ResetRecords
Allows the peak and trough to be reset back to default values. 
Fc9-bool-icon.png - BOOL ResetPeak
 
Fc9-bool-icon.png - BOOL ResetTrough
 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-17-icon.png Connect To
DSP component with output buffer to collect our data from. 
Fc9-type-16-icon.png Connect To
DSP component with output buffer to collect our data from. 
Fc9-type-7-icon.png 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. 
Fc9-type-14-icon.png Decay
Configures how many buffers or values to allow a record to persist