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

(EN)

Preset

?

(DN)

Accum

?

Retentive on-delay timer. Like TON, but the accumulator survives rung transitions. Must be cleared explicitly with RES.

Operands

NameType
timerTIMER

How It Works

Rung state.EN.TT.ACC.DN
True, .ACC < .PRE11counting up0
True, .ACC.PRE10stops at its current value1
False00retainedretained

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

(EN)

Preset

28800000

(DN)

Accum

0

1

RunHours.DN

MaintAlert

2

ResetMaint

RunHours

RES

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 = 1 forever after it finishes.
  • Writing 0 to .ACC instead of using RES.DN remains 1, so the timer does not restart while its rung stays true.
  • Confusing RTO with TONTON resets automatically; RTO does not.
  • Timers overview — members, units, shared behaviour
  • TON — non-retentive counterpart
  • RES — clears the accumulator
  • Counters overview — retentive accumulators for counts instead of time

On this page