# Rising Edge

This function block generates a boolean rising-edge signal after a configured delay. It can operate either in time-based mode (seconds) or in sample-based mode (number of iterations). Use the `Reset` input to restart the timing/counting and clear the triggered state.

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

`Reset` Provide a boolean signal to reset the block's internal timer/counter and clear the triggered state.\
(Shown as a socket under inputs)

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

`Boolean` A boolean output that becomes TRUE when the configured delay/count is reached and remains TRUE until a reset is provided.\
(Shown as a socket under outputs)

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

`Rising Time (s | #)` Set the delay amount. Interpreted as seconds when mode is `Seconds` and as number of samples when mode is `Samples`.\
`Mode` Toggle between `Seconds` and `Samples` operation. The control shows `Seconds` when time-based and `Samples` when sample-based.

## ⚙️ How it works <a href="#how-it-works" id="how-it-works"></a>

* On first activation the block starts counting automatically.
* In `Seconds` mode the block measures real elapsed time and switches the output to TRUE once the elapsed time reaches the value set in `Rising Time (s | #)`.
* In `Samples` mode the block counts each evaluation cycle and switches the output to TRUE once the configured sample count is reached.
* After the output becomes TRUE it stays TRUE until a TRUE is supplied to the `Reset` input, which restarts the internal timer/counter and returns the output to FALSE.

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

1. Choose operation mode with the `Mode` control (`Seconds` or `Samples`).
2. Enter the desired delay/count into `Rising Time (s | #)`.
3. Supply a TRUE signal to `Reset` whenever you need to restart the delay/count.
4. Use the block's boolean output as a trigger for downstream blocks when the delay/count completes.

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

* Simple time- or sample-based trigger generation.
* Persistent triggered state until explicit reset, making it suitable as a latch for one-shot events.
* Compact interface with an editable numeric field and a clear mode switch.

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

* To capture an image after a short delay, use this block with `Camera USB` and then connect its output to `Image Logger` or `Image Write` to save the captured frame when the rising edge becomes TRUE.
* Start and stop video recordings by linking the output to `Record Video` (use the rising edge to start and a separate logic sequence to stop).
* Use `Delay Step` together with this block to create delayed pulses or to shape the trigger timing in multi-step flows.
* Combine with `Logic Input` to provide a manual reset or timed start conditions.
* Visualize the trigger activity by routing the boolean to `Scope` or log events with `CSV Export` for long-term monitoring.
* Use `Counter` downstream to count how many times the rising edge has been reached in a run.

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

* If the output never becomes TRUE, verify the `Mode` setting and confirm the value in `Rising Time (s | #)` is appropriate (not set too large).
* If the output immediately stays TRUE, check whether a reset is being held active or whether the configured time/count is zero or very small.
* For timing issues, ensure the system running the flow is not paused or blocked, since sample-based counting depends on evaluation cycles while time-based counting depends on real elapsed time.


---

# 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/input-output/data-inputs/rising-edge.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.
