Cumulative Timer
easy
Turns Out_Done on after In_Enable has been on for 5 seconds in total. Pauses retain the elapsed time.
What it teaches
A retentive timer is a stopwatch with a pause button: it accumulates while the input is on, holds the count while it is off, and only an explicit reset clears it. The opposite of On Delay's reset-on-drop. This is how machines total run time toward a service interval — real presets are hours, scaled to seconds here so you can watch it.
Inputs and outputs
| Tag | Type | Default | Description |
|---|---|---|---|
| In_Enable | BOOL | — | Accumulates time while on |
| In_Reset | BOOL | — | Clears elapsed time and Out_Done |
| Out_Done | BOOL | — | On after 5 accumulated seconds |
Required behavior
- Accumulates elapsed time while In_Enable is 1 and holds the total while In_Enable is 0.
- Out_Done turns on when the accumulated time reaches 5 seconds and stays on, even if In_Enable turns off.
- In_Reset clears the accumulated time and Out_Done.