← All exercises

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

TagTypeDefaultDescription
In_EnableBOOLAccumulates time while on
In_ResetBOOLClears elapsed time and Out_Done
Out_DoneBOOLOn after 5 accumulated seconds

Required behavior