# Equals

This function block compares numeric values and outputs a boolean result indicating whether all provided numbers are equal. It is ideal for exact-match checks, setpoint comparisons, and simple equality-based decisions in your visual flow.

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

`Number` This numeric input (socket) accepts one of the values to compare.\
`Number` This numeric input (socket) accepts another value to compare.\
Note: You can provide two or more numeric inputs by adding extra numeric sockets in the block's UI.

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

`Boolean` This output (socket) is TRUE when all connected numeric inputs are equal, otherwise FALSE.

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

`Add / Remove Input Sockets` Use the block UI to add or remove numeric inputs when you need to compare more than two values.\
There are no additional parameter sliders or dropdowns for this block—its behavior depends only on the connected numeric inputs.

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

When the block runs, it checks whether every numeric input has the same value. If every value matches exactly, the block outputs TRUE on the `Boolean` socket. If any value differs, it outputs FALSE. The block evaluates every time the connected inputs are updated.

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

* Exact equality check across multiple numeric inputs.
* Flexible number of inputs — add more numeric sockets via the UI to compare more values.
* Simple, low-latency logic suitable for setpoint detection and equality gates.

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

* Compare a sensor reading with a fixed setpoint provided by a `Number Input` to trigger actions when they match.
* Compare multiple counters or discrete status values to confirm all systems report the same state.
* Combine with latching logic to hold a condition once equality is reached (see Tips and Tricks).

Examples in plain language:

* Inputs: 5, 5, 5 → Output: TRUE
* Inputs: 5, 5, 4 → Output: FALSE

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

* For human-entered or floating values, exact equality may be fragile due to rounding. To compare with a tolerance, use `Absolute` and `Smaller`: compute the absolute difference between values and check if it is smaller than a tolerance number.
* Use `Number Input` to provide reference or setpoint values for easy testing.
* Combine multiple equality checks with `And` or `Or` to build richer logic conditions.
* Use `All True` to verify a list of boolean results (for example, several `Equals` blocks feeding into it).
* If you want to hold a TRUE result until reset, pair the block with `Set - Reset` or `Data Memory` to implement latching behavior.
* Use `Logic Input` as a manual trigger to enable or disable comparisons during testing or maintenance.

Suggested blocks to combine with `Equals`:\
`Number Input`, `Logic Input`, `And`, `Or`, `Not`, `Greater`, `Smaller`, `Absolute`, `Round`, `All True`, `Set - Reset`, `Data Memory`, `Scope`.

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

* Unexpected FALSE results with floating numbers: try rounding values with `Round` or perform a tolerance-based comparison using `Absolute` + `Smaller`.
* Missing input: ensure every numeric socket you intend to compare is connected or populated with a `Number Input`; an unconnected value can make the comparison invalid.
* Multiple inputs behave unexpectedly: verify all connected inputs represent the same numeric type/scale (e.g., all in the same units).


---

# 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/logic/equals.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.
