Difference between revisions of "Component: Math (DSP Operators)"
Line 16: | Line 16: | ||
==Component Source Code== | ==Component Source Code== | ||
+ | |||
+ | Please click here to download the component source project: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_DSP_Math.fcfx FC_Comp_Source_DSP_Math.fcfx] | ||
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_DSP_Math.fcfx FC_Comp_Source_DSP_Math.fcfx] | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_DSP_Math.fcfx FC_Comp_Source_DSP_Math.fcfx] | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 40: | Line 44: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 90: | Line 96: | ||
==Macro reference== | ==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;" | '''Calculate''' | ||
+ | |- | ||
+ | | colspan="2" | Performs a single calculation on the two input buffers and provides a result into the output buffer | ||
+ | |- | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| 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;" | '''CalculateArray''' | ||
+ | |- | ||
+ | | colspan="2" | Performs a single calculation on the two input buffers and provides a result into the output buffer | ||
+ | |- | ||
+ | |- | ||
+ | | 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== | ||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Connect To A | ||
+ | |- | ||
+ | | colspan="2" | DSP component with output buffer to collect our data from. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Connect To B | ||
+ | |- | ||
+ | | colspan="2" | DSP component with output buffer to collect our data from. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | ||
+ | | width="90%" | Buffer Size | ||
+ | |- | ||
+ | | colspan="2" | Number of individual elements the buffer can store, default 1. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Buffer Type | ||
+ | |- | ||
+ | | colspan="2" | Sets the buffer data type. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Direction | ||
+ | |- | ||
+ | | colspan="2" | Sets the data direction flow of the component | ||
+ | |- | ||
+ | | 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="90%" | Sum Type | ||
+ | |- | ||
+ | | 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. | ||
+ | |}==Macro reference== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
Revision as of 15:20, 20 January 2023
Author | Matrix Ltd |
Version | 1.2 |
Category | DSP Operators |
Contents
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 Source Code
Please click here to download the component source project: FC_Comp_Source_DSP_Math.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_DSP_Math.fcfx
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. DSPSum Here is the kind of waveform you can expect to see using the scope window when adding the two signals together.
Here is the kind of waveform you can expect to see using the scope window when subtracting the two readings.
Here is the kind of waveform you can expect to see using the scope window when taking the maximum of the two signals.
Here is the kind of waveform you can expect to see using the scope window when taking the minimum of the two signals.
Here is the kind of waveform you can expect to see using the scope window when taking the average between the two signals.
Here is the kind of waveform you can expect to see using the scope window when taking the difference between the two signals.
Macro reference
Calculate | |
Performs a single calculation on the two input buffers and provides a result into the output buffer | |
- VOID | Return |
CalculateArray | |
Performs a single calculation on the two input buffers and provides a result into the output buffer | |
- VOID | Return |
Property reference
==Macro reference==
Calculate | |
Performs a single calculation on the two input buffers and provides a result into the output buffer | |
- VOID | Return |
CalculateArray | |
Performs a single calculation on the two input buffers and provides a result into the output buffer | |
- VOID | Return |
Property reference
==Macro reference==
Calculate | |
Performs a single calculation on the two input buffers and provides a result into the output buffer | |
- VOID | Return |
CalculateArray | |
Performs a single calculation on the two input buffers and provides a result into the output buffer | |
- VOID | Return |