Add

This function block sums multiple numeric values into a single numeric result. It is ideal for aggregating counters, sensor readings, or calculated numbers from other function blocks.

πŸ“₯ Inputs

Number One or more numeric inputs. Default setup provides two inputs but the total number of inputs can be changed using the control described below. (Each input accepts any numeric value produced by other function blocks.)

πŸ“€ Outputs

Number The sum of all connected numeric inputs.

πŸ•ΉοΈ Controls

Input size A dropdown control to select how many numeric input sockets the block provides. Changing this value will add or remove input sockets so you can sum more or fewer values.

🎨 Features

  • Dynamic input count: easily change how many numeric values you want to sum without adding multiple blocks.

  • Single numeric output: convenient to feed aggregated values into downstream processing, logging, or display blocks.

  • Ignores unconnected inputs: only connected numeric inputs are considered when producing the sum.

πŸ“ Usage Instructions

  1. Use the Input size control to set how many numeric inputs you need.

  2. Connect the numeric outputs from other function blocks to the provided Number inputs.

  3. Read the summed result from the block's Number output and pass it to downstream blocks.

πŸ“Š Evaluation

When run, this block adds together all numeric values currently connected to its inputs and outputs the total as a single numeric value.

πŸ’‘ Tips and Tricks

  • Sum manual values with a Number Input block to create setpoints or offsets before further processing.

  • Combine counts from multiple detectors by feeding their Object Count outputs (for example from Object Detection) into this block to get a total object count.

  • Use with Counter to accumulate events and with Get Batch Size when processing batches to compute totals per batch.

  • Chain with Divide to compute averages (sum Γ· count) or with Round to format numeric results for display/export.

  • Use alongside analysis blocks such as Mean Value of Image or Measure Position Distance to combine measurement results into a single summary value.

πŸ› οΈ Troubleshooting

  • If the output is lower than expected, check that all intended numeric sources are connected to the block.

  • If you change the Input size and don’t see the expected number of sockets, re-open the layout or reselect the Input size option to refresh the displayed sockets.

  • Non-numeric or missing inputs are ignored; ensure upstream blocks produce numeric values before connecting.

Last updated

Was this helpful?