Timers and counters
What you'll learn
Use TON done bits and CTU counts — the difference between a delay, a count, and a bit that just follows.
"Wait three seconds, then start the conveyor." "Count twelve bottles, then index the case." Plants run on delays and counts — and in ladder logic both are boxes with a number inside.
TON: the on-delay timer
A TON starts accumulating time while its rung is true, and sets its done bit (DN) when the accumulator reaches the preset:
- Rung true → the accumulator climbs: 0.0, 0.1, 0.2 … up to the preset.
- Accumulator = preset → T1.DN turns ON, and stays on while the rung holds.
- Rung false → the accumulator resets to zero. A TON has no memory of half-finished timing — interrupt it at 4.9 of 5.0 seconds and it starts over from nothing.
The done bit is just a bit: other rungs examine it with an ordinary -| |- contact. "Warn horn for 5 s, then run" is two rungs: switch → TON, and T1.DN → conveyor.
CTU: the count-up counter
A CTU adds one every time its rung goes from false to true — it counts edges, not time spent on:
- Photo-eye blocked → one count. Held blocked for a minute → still one count. Edges, not duration.
- Accumulator reaches preset → C1.DN turns ON.
- Unlike a timer, a counter keeps its count when the rung drops — that is its job. It only goes back to zero when a RES (reset) instruction fires.
See both run
The ladder logic simulator has both circuits live: watch the TON accumulator climb in real time, and pulse the photo-eye to walk the counter to its preset — then reset it for the next batch.
Why this matters
Contacts, coils, a seal-in, a timer, a counter: that's the working vocabulary of most ladder programs you'll ever open. The rest is the same five ideas, repeated with more wires.
Check your understanding
Question 1 of 2
A TON timer is at 4.9 of 5.0 seconds when its rung goes false for an instant. When the rung comes back: