# OFF Delay

This function block holds a boolean signal high for a configurable time when the input changes from True to False. Use it to prevent brief false pulses from immediately turning an output off.

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

`Input Signal` A boolean signal that controls the block. Provide `True`/`False` values (or connect a boolean-producing function block).

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

`Output Signal` The resulting boolean after the off-delay logic. When the input falls from True to False, this output remains True until the configured delay elapses.

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

`Delay Time (seconds)` Set how long the output stays True after the input goes False. Enter the delay duration in seconds (supports decimal values).

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

* The block monitors the incoming boolean signal and remembers its recent state.
* When the input transitions from True to False, an internal timer starts and the block keeps the `Output Signal` as True.
* If the configured delay time passes without the input returning to True, the block then sets the `Output Signal` to False.
* If the input returns to True before the delay finishes, the delay is canceled and the output follows the input immediately.
* On initial start the block waits for the first input change to begin normal operation.

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

* Prevents short-lived false pulses from toggling downstream logic.
* Simple numeric control for delay length in seconds.
* Works with any boolean-producing blocks or signals in your scenario.
* Stateless on removal — releases internal timers when removed from the flow.

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

1. Connect a boolean source (for example a manual switch or a logic-producing block) to the `Input Signal`.
2. Set `Delay Time (seconds)` to the duration you want the output to remain True after a falling edge.
3. Use the `Output Signal` to drive downstream logic or indicators.

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

* For manual testing, use the `Logic Input` block as a controllable boolean source.
* To add a delay on the rising edge as well, pair this block with the `ON Delay` block for symmetric behaviour.
* Detect single transitions then delay the fall by combining with the `Rising Edge` block upstream.
* Use logical combinations like `And`, `Or`, or `Set - Reset` with this block to create more advanced control flows (for example, require multiple conditions to be True before the delay behavior is allowed).
* Connect the output to `Led Output` or `Scope` to visualize or indicate the delayed state in the UI.

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

* If the output never goes False: check the value entered in `Delay Time (seconds)` and confirm the input actually transitions to False.
* If the output drops immediately: verify the input truly went from True to False and that no upstream blocks (like a pulse generator) are briefly forcing the input low.
* If you need to ignore spurious signals, consider adding a short `ON Delay` before this block or pre-filtering with logical conditions.


---

# 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/signal-operators/off-delay.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.
