← Timers

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

An hour meter must stay exact for hours, whatever the scan time. A timer that restarts itself each second loses one scan at every restart: after 10 s at 100 ms scans it shows 9 s. Some tests scan once a second while the simulation scans every 100 ms, so logic that works in the simulation can still fall behind, or stop counting, in the tests.

Parameters

TagDirectionTypeDefaultDescription
In_RunInputBOOL0Signal to track run time
In_ResetInputBOOL0Clears the accumulated total
Out_SecondsOutputDINT0Seconds portion of the total, 0-59
Out_MinutesOutputDINT0Minutes portion of the total, 0-59
Out_HoursOutputDINT0Whole hours of accumulated run time

Required behavior