eeros_architecture:control_system:available_blocks:generic
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
eeros_architecture:control_system:available_blocks:generic [2021/07/08 19:09] – created ursgraf | eeros_architecture:control_system:available_blocks:generic [2021/07/08 19:14] – ursgraf | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
+ | |||
+ | This is the basic block from which all other blocks inherit. | ||
A generic block simply runs a predefined algorithm which can be passed to the constructor of the block. Such an algorithm could theoretically calculate any output from a given set of inputs. It can be especially valuable for cases like the following. A signal value must be applied with an offset and a scale. How to achieve this? | A generic block simply runs a predefined algorithm which can be passed to the constructor of the block. Such an algorithm could theoretically calculate any output from a given set of inputs. It can be especially valuable for cases like the following. A signal value must be applied with an offset and a scale. How to achieve this? | ||
- | - Use a constant block delivering the offset together with a sum block which adds the offset to the signal. Finally, a gain block applies the desired scale. All in all, you will use three blocks. | + | - Use a constant block delivering the offset together with a sum block which adds the offset to the signal. Finally, a gain block applies the desired scale. All in all, you will use three different |
- Use a generic block and define the necessary algorithm as follows <code cpp> | - Use a generic block and define the necessary algorithm as follows <code cpp> | ||
gen.getOut(0).getSignal().setValue(gen.getIn(0).getSignal().getValue() + 0.1) * 1.1); | gen.getOut(0).getSignal().setValue(gen.getIn(0).getSignal().getValue() + 0.1) * 1.1); |
eeros_architecture/control_system/available_blocks/generic.txt · Last modified: 2021/07/08 19:30 by ursgraf