# Minimum

This function block finds the smallest value from a list of numeric inputs and returns that value together with its position in the list. It is ideal for comparing measurements, scores or any set of numbers to determine the minimum and where it occurred.

## 📥 Inputs <a href="#inputs" id="inputs"></a>

`Values` One or multiple numeric values provided as a list. The number of input sockets is adjustable.

## 📤 Outputs <a href="#outputs" id="outputs"></a>

`Number` The smallest numeric value found among the provided inputs.

`Index` The position (index) of the smallest value within the provided input list.

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

`Input size` Choose how many values you want to compare. The block will automatically add or remove input sockets to match the selected size.

(how to use) To change how many numbers you compare, open the `Input size` dropdown and select the desired number. The block updates its sockets to match.

## 🎯 Features <a href="#features" id="features"></a>

* Dynamic inputs: easily increase or decrease the number of numeric inputs without reconfiguring connections.
* Dual outputs: returns both the minimum value and its index so you can trigger actions or annotate results based on position.
* Safe evaluation: skips unconnected inputs so partial configurations do not break the workflow.

## ⚙️ Running mechanism <a href="#running-mechanism" id="running-mechanism"></a>

When the system evaluates this block, it reads all connected numeric inputs, ignores empty/unconnected sockets, and computes the smallest value and its index. The block then outputs the minimum and the corresponding index for downstream processing.

## 📝 Usage instructions <a href="#usage" id="usage"></a>

1. Set the desired number of inputs with `Input size`.
2. Connect numeric sources to the input sockets (for example, use `Number Input` blocks or numeric outputs from other function blocks).
3. Use the `Number` output where you need the smallest value.
4. Use the `Index` output to identify which input produced that value.

## 💡 Tips and Tricks <a href="#tips-and-tricks" id="tips-and-tricks"></a>

* Combine with `Number Input` to manually feed test values when setting up or debugging a flow.
* Use `Maximum` alongside this block to get both extremes (min and max) of the same set of values.
* If you need to pick a specific item from a batch or list after finding the minimum index, feed the index into `Get Element` to retrieve the associated item.
* For noisy measurements, consider preprocessing numeric data (e.g., smoothing or filtering) before feeding them here using blocks such as `Data Memory` to hold intermediate values or `Round` to normalize precision.
* To visualize trends or live values, send the outputs to `Scope` or log them with `CSV Export` / `Image Logger` for later analysis.
* When working with batched data, use `Debatch` and `Batch Processing` blocks to convert between batch and individual values and ensure the block receives the expected input format.

## 🛠️ Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

* If the block returns unexpected results, verify all intended input sockets are connected and providing numeric values.
* If some inputs should be ignored, leave their sockets disconnected — the block will skip them.
* If the index looks off, double-check the order of connected inputs; the index refers to the position in the input list after any skipped/unconnected sockets are ignored.


---

# 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/minimum.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.
