RTO — Retentive Timer On
RTO in rungs.dev is the retentive on-delay timer — like TON, but the .ACC accumulator survives rung transitions and must be cleared explicitly with RES.
RTO
Timer
timer
Preset
?
Accum
?
Retentive on-delay timer. Like TON, but the accumulator survives rung transitions. Must be cleared explicitly with RES.
Operands
| Name | Type |
|---|---|
timer | TIMER |
How It Works
| Rung state | .EN | .TT | .ACC | .DN |
|---|---|---|---|---|
True, .ACC < .PRE | 1 | 1 | counting up | 0 |
True, .ACC ≥ .PRE | 1 | 0 | stops at its current value | 1 |
| False | 0 | 0 | retained | retained |
A RES on the timer tag clears .ACC, .EN, .TT, and .DN back to 0. The timer checks for completion only when the instruction runs. This means .ACC can pass .PRE before stopping; it is not forced back to .PRE.
Example — Maintenance Hour Counter
Accumulate run-time across many start/stop cycles. Alert the operator once the machine has run for eight hours total.
0
MachineRunning
RTO
Timer
RunHours
Preset
28800000
Accum
0
1
RunHours.DN
MaintAlert
2
ResetMaint
RunHours
The timer keeps counting only while MachineRunning is true, but never resets on its own. Pressing ResetMaint clears it back to zero.
When to Use
- Run-time accumulators, maintenance counters, total elapsed fault time.
- Any situation where timing must survive power cycles or intermittent triggers.
Common Mistakes
- Forgetting the
RES— the timer will stay.DN = 1forever after it finishes. - Writing
0to.ACCinstead of usingRES—.DNremains1, so the timer does not restart while its rung stays true. - Confusing
RTOwithTON—TONresets automatically;RTOdoes not.
Related
- Timers overview — members, units, shared behaviour
- TON — non-retentive counterpart
- RES — clears the accumulator
- Counters overview — retentive accumulators for counts instead of time
TOF — Off-Delay Timer
TOF in rungs.dev is the off-delay timer — starts timing when the rung goes false and holds the .DN bit at 1 for the preset duration after the rung drops.
Counters Overview
Reference for Ladder Logic counter instructions in rungs.dev — CTU, CTD, and RES — and the COUNTER tag with preset, accumulator, and done/up/down status bits.