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

From Flowcode Help
Jump to navigationJump to search
 
(2 intermediate revisions by the same user not shown)
Line 14: Line 14:
 
==Math component==
 
==Math component==
 
Component to combine together two DSP buffers into one an index at a time. Functions include: Add, Average, Difference, Max, Min, Subtract
 
Component to combine together two DSP buffers into one an index at a time. Functions include: Add, Average, Difference, Max, Min, Subtract
 +
 +
==Component Pack==
 +
 +
DSP
  
 
==Detailed description==
 
==Detailed description==
 +
 +
 +
 +
 +
 +
  
  
Line 24: Line 34:
  
 
==Examples==
 
==Examples==
 +
 +
 +
 +
 +
 +
  
  
Line 99: Line 115:
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Connect To A
 
| width="90%" | Connect To A
 
|-
 
|-
| colspan="2" | DSP component with output buffer to collect our A data from. 
+
| colspan="2" | DSP component with output buffer to collect our data from. 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Connect To B
 
| width="90%" | Connect To B
 
|-
 
|-
| colspan="2" | DSP component with output buffer to collect our B data from. 
+
| colspan="2" | DSP component with output buffer to collect our data from. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
Line 118: Line 134:
 
|-
 
|-
 
| colspan="2" | Sets the buffer data type. 
 
| colspan="2" | Sets the buffer data type. 
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Calculation
 +
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
Line 123: Line 143:
 
|-
 
|-
 
| colspan="2" | Defines the type of calculation performed on the two input buffers to obtain the output value. Data shown in brackets indicates operation  ? = a decision followed by the true value and then the false value seperated with a colon.  
 
| colspan="2" | Defines the type of calculation performed on the two input buffers to obtain the output value. Data shown in brackets indicates operation  ? = a decision followed by the true value and then the false value seperated with a colon.  
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
 
|-
 
 
|}
 
|}

Latest revision as of 17:19, 9 November 2022

Author Matrix Ltd
Version 1.2
Category DSP


Math component

Component to combine together two DSP buffers into one an index at a time. Functions include: Add, Average, Difference, Max, Min, Subtract

Component Pack

DSP

Detailed description

No detailed description exists yet for this component

Examples

Here is a example file which generates a sine wave and a triangle wave and then uses the DSP sum component to merge together the two signals. FC6 Icon.png DSPSum Here is the kind of waveform you can expect to see using the scope window when adding the two signals together.

DSPSum.jpg


Here is the kind of waveform you can expect to see using the scope window when subtracting the two readings.

DSPSum3.jpg


Here is the kind of waveform you can expect to see using the scope window when taking the maximum of the two signals.

DSPSum2.jpg


Here is the kind of waveform you can expect to see using the scope window when taking the minimum of the two signals.

DSPSum4.jpg


Here is the kind of waveform you can expect to see using the scope window when taking the average between the two signals.

DSPSum5.jpg


Here is the kind of waveform you can expect to see using the scope window when taking the difference between the two signals.

DSPSum6.jpg

Downloadable macro reference

Fc9-comp-macro.png Calculate
Performs a single calculation on the two input buffers and provides a result into the output buffer 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png CalculateArray
Performs a single calculation on the two input buffers and provides a result into the output buffer 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Connect To A
DSP component with output buffer to collect our data from. 
Fc9-type-16-icon.png Connect To B
DSP component with output buffer to collect our data from. 
Fc9-type-21-icon.png Buffer Size
Number of individual elements the buffer can store, default 1. 
Fc9-type-16-icon.png Buffer Type
Sets the buffer data type. 
Fc9-conn-icon.png Calculation
Fc9-type-16-icon.png Sum Type
Defines the type of calculation performed on the two input buffers to obtain the output value. Data shown in brackets indicates operation ? = a decision followed by the true value and then the false value seperated with a colon.