Run Hours
medium
Accumulate the run time of a BOOL input in seconds with a manual reset.
What it teaches
Accumulate elapsed time while an input stays on, hold the running total when it drops, and clear it on reset. Teaches retentive timing, accumulating elapsed seconds across scans, and reset semantics — the basis of any run-hour or duty-cycle meter.
Inputs and outputs
| Tag | Type | Default | Description |
|---|---|---|---|
| In_Run | BOOL | — | Signal to track run time |
| In_Reset | BOOL | — | Resets the accumulated time to 0 |
| Out_RunSeconds | DINT | — | Total accumulated run time in seconds |
Required behavior
- Accumulates elapsed time in seconds while In_Run is true.
- Retains the accumulated time when In_Run goes false.
- Resets the accumulated time to 0 when In_Reset is true.