# 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 <a href="#inputs" id="inputs"></a>

`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 <a href="#outputs" id="outputs"></a>

`Number` The sum of all connected numeric inputs.

## 🕹️ Controls <a href="#controls" id="controls"></a>

`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 <a href="#features" id="features"></a>

* 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 <a href="#usage" id="usage"></a>

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 <a href="#evaluation" id="evaluation"></a>

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 <a href="#tips-and-tricks" id="tips-and-tricks"></a>

* 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 <a href="#troubleshooting" id="troubleshooting"></a>

* 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.augelab.com/function-blocks/data-logic/mathmetical-operations/add.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
