# Absolute

This function block returns the absolute value of a numeric input. It is useful whenever you need the magnitude of a number regardless of its sign (for example, distances, error magnitudes, or differences).

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

`Number` — A single numeric value (positive, negative, or zero).

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

`Number` — The absolute value of the input (non-negative).

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

This function block has no interactive controls.

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

When the block runs, it reads the value provided on the `Number` input and outputs its magnitude on the `Number` output. If the input is negative, the output becomes its positive counterpart; otherwise the value is passed through unchanged.

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

* Simple and deterministic: always produces a non-negative numeric result.
* Lightweight: suitable to use in real-time or low-latency setups.
* Safe to chain: works reliably with single numeric values or results from other mathematical blocks.

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

* Connect any numeric-producing block (sensor readings, calculations, counters) to the `Number` input.
* Use the output value wherever you need a magnitude without sign (e.g., comparison, formatting, logging).

Common examples:

* Compute the absolute difference between two values by using the `Subtract` block followed by this block.
* Convert a signed error value into a magnitude for threshold checks or alerts.

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

* Combine with `Subtract` to get the magnitude of a difference (e.g., measurement vs. reference).
* Use together with `Greater` or `Smaller` to compare magnitudes against thresholds.
* Pipe the result into `Round` for human-friendly numeric displays or into `CSV Export` / `Data Write Global` for logging.
* For flows that produce lists or batches of numbers, consider `Batch Processing` / `Debatch` to handle values before applying the absolute block.

(hint: available related blocks you can combine with: `Add`, `Subtract`, `Multiply`, `Divide`, `Round`, `Square Root`, `Maximum`, `Minimum`, `Greater`, `Smaller`, `CSV Export`)

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

* If the output is unexpected, check the upstream block to ensure it is sending a numeric value (not empty or None).
* Use `Is None` or `Data Type Converter` blocks upstream to validate or transform inputs into numeric form before applying the absolute operation.


---

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