A typical application of the Multiply / Divide object is power measurement. When you measure the voltage over a load and the current through it, you can calculate the power by multiplying both measurements.
Properties
To control the behavior of the Multiply / Divide I/O, several properties are available.
These can be accessed through a popup menu which is shown when the I/O is right clicked in the Object screen.
The properties can also be accessed through its settings window which is shown when the I/O is double clicked in the Object screen.
To open the Object screen, click the
Show object screen button.
By default, the settings window only shows the most used settings. When Advanced is ticked, the extended window with all settings is shown. See also the program settings.
Mask
The Mask determines which sources are in the nominator (default) and which sources are in the denominator. This mask contains a '*' or '/' character for every connected source. By default, the mask consists of '*'-es only and all sources are multiplied. To divide by a source, set its corresponding mask character to '/'.
Some examples of */ masks are shown in the table below:
| Sources | Mask | Result |
|---|---|---|
| 1 | / | 1 / src1 |
| 2 | ** | src1 * src2 |
| 2 | */ | src1 / src2 |
| 2 | /* | src2 / src1 |
| 2 | // | 1 / (src1 * src2) |
| 3 | *// | src1 / (src2 * src3) |
| 6 | */*//* | (src1 * src3 * src6) / (src2 * src4 * src5) |
Overlapping data only
When Multiplying or dividing two or more signals with different time bases and Overlapping data only switched off, the resulting signal will have a time base that spans all time bases of all sources. Sample positions that are not present in a signal, but are present in one of the other signals are treated as 1 (one), when multiplying or dividing.
When switching Overlapping data only on, the result will contain only those samples with sample times that appear in all sources.
The image below shows four signals:
- The top signal, green, is the first of the two source signals that need to be multiplied / divided
- The second signal, light blue, is the second of the two source signals that need to be multiplied / divided
- The third signal, orange, is the result of adding the two source signals together, with overlapping data only enabled.
- The fourth signal, pink, is the result of adding the two source signals together, with overlapping data only not enabled.