Run Hours
medium
Totals a machine's run time as hours, minutes, and seconds, retaining the total through stops, with a manual reset.
What it teaches
The real hour meter: run one retentive timer continuously and bank a second each time its accumulator passes a moving 1000 ms target, then cascade the rollovers — seconds into minutes, minutes into hours. Self-resetting timers lose a little time at every rollover on real controllers; the free-running meter with a moving target is the drift-free production pattern.
Parameters
| Tag | Direction | Type | Default | Description |
|---|---|---|---|---|
| In_Run | Input | BOOL | 0 | Signal to track run time |
| In_Reset | Input | BOOL | 0 | Clears the accumulated total |
| Out_Seconds | Output | DINT | 0 | Seconds portion of the total, 0-59 |
| Out_Minutes | Output | DINT | 0 | Minutes portion of the total, 0-59 |
| Out_Hours | Output | DINT | 0 | Whole hours of accumulated run time |
Required behavior
- Accumulates run time while In_Run is 1 and holds the total — including any partial second — while In_Run is 0.
- Every full 1000 ms of accumulated run time advances the display by exactly one second — the meter never drifts.
- Out_Seconds and Out_Minutes roll over at 60.
- In_Reset clears the total to 0:00:00, including any partial second.