# OFF Delay

This function block introduces a delay when the input signal transitions to a False state (0). It holds the state of the output for a specified duration even after the input has transitioned.

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

`Boolean` This input accepts a boolean signal. The function block requires only one input signal to operate.

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

`Boolean` This output provides the delayed boolean signal based on the input.

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

`Delay Time (seconds)` A field where you can specify the delay duration (in seconds) when the input changes to False.

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

`Deferred Signal Response` The output signal remains "True" even after the input goes "False" for a specified duration, allowing for smoother transitions in systems that rely on state management.

`Configurable Delay Time` You can adjust the duration of the delay to fit your specific needs.

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

1. **Connect Input Signal**: Link a boolean signal to the input.
2. **Set Delay Time**: Specify the desired delay duration in seconds in the `Delay Time (seconds)` field.
3. **Evaluate**: Run the block. The output signal will reflect the input for the defined delay duration after it transitions to False.

## 📊 Evaluation <a href="#evaluation" id="evaluation"></a>

When executed, this function block will maintain the output as True for the set duration after the input signal goes False.

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

<details>

<summary>Adjusting Delay Time</summary>

Make sure to adjust the delay time according to your application's requirements. Lengthening the delay may smooth transitions but might also result in delays in responding to critical signals.

</details>

<details>

<summary>Combining with Other Blocks</summary>

Consider using this block in combination with an `AND` block to ensure the output signal stays True based on multiple conditions.

</details>

<details>

<summary>Testing and Debugging</summary>

If you're testing this in a scenario, toggle the input signal and monitor how long it takes for the output to transition to False. This can help you validate the effectiveness of the delay.

</details>

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

<details>

<summary>Output Not Changing as Expected</summary>

Check the configured delay time; if it's too short, you might not see the delay effect as intended. Adjust the delay and test again.

</details>

<details>

<summary>Signals Not Starting</summary>

Ensure that the input control is providing the appropriate boolean signals. If not connected properly, the block cannot function as expected.

</details>
