Math Operations
This function block performs arithmetic on a selectable number of numeric inputs. Use it to combine measurements, compute ratios, totals, products or differences in simple visual workflows β no programming required.
π₯ Inputs
Number One or more numeric input sockets. The block starts with two numeric inputs by default and can be expanded up to 20 inputs using the control below.
Note: Unconnected input sockets are ignored when the block runs. Only connected numeric values are used in the calculation.
π€ Outputs
Number The numeric result of the selected arithmetic operation applied to the provided inputs.
πΉοΈ Controls
Input size Choose how many numeric input sockets are available (2β20). The block will add or remove input sockets to match this setting.
Select a method Choose the arithmetic method to apply across provided inputs. Available methods: ADD, SUBTRACT, MULTIPLY, DIVIDE.
βοΈ Running mechanism
The block reads all connected numeric inputs when it runs.
It applies the chosen method across those values:
ADD: sums all inputs.
SUBTRACT: subtracts the sum of all following inputs from the first input.
MULTIPLY: multiplies all inputs together.
DIVIDE: performs sequential division starting from the first input by each following input.
The computed single numeric result is presented on the output socket.
This block skips empty/unconnected sockets automatically so you can change how many inputs to use without reconfiguring connections.
π― Features
Expandable input count (2β20) for flexible calculations.
Simple UI controls to switch arithmetic method instantly.
Ignores unconnected inputs to avoid errors when wiring dynamic systems.
Designed for visual assembly with other measurement and logic blocks.
π Usage guide
Set
Input sizeto the number of values you want to combine.Connect numeric-producing blocks (sensors, counters, measurement outputs, manual inputs) to the numeric input sockets.
Choose the desired operation with
Select a method.Read the result from the output
Numberand feed it into downstream blocks (logging, thresholds, or actuators).
π‘ Tips and Tricks
Combine with
Number Inputwhen you need a manual value to be part of the calculation (for offsets or thresholds).Use with
CounterorGet Batch Sizeto compute averages, rates, or ratios from counted values.Feed outputs from measurement blocks like
Measure Position DistanceorImage Resolution and Channel Valueinto this block to derive derived metrics (e.g., distance per pixel, normalized sizes).After a math operation, use
RoundorAbsoluteto format the result before display or logging.To compute element-wise or aggregated values from lists, pair with
Get Elementor batch-control blocks to extract individual numbers first.
π οΈ Troubleshooting
If the output is unexpected, check that all required inputs are connected and contain numeric values (use
Number Inputor debug blocks to verify).For division, ensure none of the divisor inputs are zero to avoid invalid results.
If you change
Input sizeand get unexpected wiring, re-check connections β adding/removing sockets may shift input order.
Use this block to keep arithmetic simple and visual when building measurement or decision pipelines.
Last updated
Was this helpful?