# ON Delay

This function block delays the activation of a boolean signal. When the input signal switches from False to True, the block waits for a configured amount of time before allowing the output to go True. If the input returns to False before the delay elapses, the output remains False.

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

* `Input` Provide a boolean signal to be delayed.

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

* `Output` Delayed boolean signal. Becomes True only after the configured delay following an input rising edge.

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

* `Delay Time` Text field where you enter the delay duration in seconds. Enter numeric seconds (for example 5 for a five second delay).

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

* The block monitors the provided `Input` signal.
* On a rising edge (when `Input` changes from False to True), the block starts a timer for the number of seconds specified in `Delay Time`.
* While the timer is running the `Output` remains False.
* If the timer completes and the `Input` is still True, the `Output` becomes True.
* If the `Input` returns to False before the timer completes, the timer is cancelled and the `Output` stays False.
* Subsequent rising edges restart the delay process.

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

* Simple configurable delay for rising signals without additional scripting.
* Safe cancellation of the delay when the input falls back to False.
* Works with any boolean-producing blocks or signals in the system.

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

1. Connect a boolean source to the `Input` socket (for example a manual `Logic Input` or an event-producing block).
2. Set `Delay Time` to the number of seconds you want to wait after an input becomes True.
3. Use the `Output` as the delayed control signal for downstream blocks (for example to drive a `Led Output` or start a process).

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

* Pair with `OFF Delay` when you need controlled delay behavior for both rising and falling edges (ON Delay for rise, OFF Delay for fall).
* Use `Rising Edge` if you need to convert a sustained True input into a single delayed pulse or to detect the exact moment a transition occurs before starting other logic.
* For manual testing connect a `Logic Input` block to the `Input` socket so you can toggle and observe behavior interactively.
* Connect the `Output` to `Led Output` to visualize the delayed signal during tuning.
* Combine with `Counter` to increment only after the delayed output becomes True, avoiding counts from short glitches.
* Use logical blocks such as `And` or `Or` to gate the delayed output with other conditions before driving final actuators or logging.

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

* If the output never becomes True after a rising input, verify `Delay Time` contains a valid numeric value and that the input remains True for at least that duration.
* If the output becomes True too early, increase `Delay Time` to match the desired hold period.
* If brief input spikes should be ignored, consider combining a short `Delay Step` or a pre-filtering logic so only sustained rises start the delay.


---

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