TON — On-Delay Timer
TON in rungs.dev is the on-delay timer — starts timing when the rung goes true, sets the .DN bit when .ACC reaches .PRE, and resets when the rung goes false.
TON
Timer
timer
Preset
?
Accum
?
On-delay timer. Starts timing when the rung goes true; sets .DN when .ACC reaches .PRE. Resets the moment the rung goes false.
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 | reset to 0 | 0 |
Going false at any point resets the timer. TON is not retentive — use RTO if you need the accumulator to survive interruptions. 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 — Delayed Alarm
Turn on an alarm five seconds after a fault appears.
0
Fault
TON
Timer
FaultTimer
Preset
5000
Accum
0
1
FaultTimer.DN
Alarm
- Rung 1 runs the timer while
Faultis active. - Rung 2 energizes
AlarmonceFaultTimer.DNis set.
Practice
Try TON in the On Delay exercise — switch an output on a set time after its input.
Common Mistakes
- Referencing
FaultTimerinstead ofFaultTimer.DNon a contact — the whole structure is not aBOOL. - Expecting the accumulator to survive a dropped rung —
TONresets to zero. UseRTOfor retentive timing. - Writing
0to.ACCto restart a finished timer —.DNstays1while the rung remains true. Let the rung go false or useRESto clear and re-arm the timer.
Related
- Timers overview — members, units, and shared behaviour
- TOF — off-delay counterpart
- RTO — retentive timer
Timers Overview
Reference for Ladder Logic timer instructions in rungs.dev — TON, TOF, RTO, and RES — and the TIMER tag structure with preset, accumulator, and status bits.
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.