← All exercises

Off Delay

easy

Keep the output high for 2 seconds after the input goes low.

What it teaches

Keep the output on for a set time after the input drops. The mirror image of On Delay — the input turns the output on immediately, but turning it off takes a moment. Useful for things like fan run-on after a heater shuts down.

Inputs and outputs

TagTypeDefaultDescription
In_SignalBOOLTrigger signal
Out_SignalBOOLOff-delayed output signal

Required behavior

  • Output goes high immediately when In_Signal goes high.
  • Output stays high for exactly 2000ms after In_Signal goes low.
  • Output goes low after the 2000ms delay expires.
  • If In_Signal goes high again before Out_Signal drops, Out_Signal stays high and the 2000ms countdown restarts on the next falling edge.