PLC Sim Lab
PLC basics

PLC timers and counters

Timers and counters turn simple on/off logic into real machine sequences: wait 3 seconds before starting the conveyor, keep the fan running 30 seconds after stop, stop the line after 12 parts.

2 min read · Updated 2026-10-02

On-delay timer (TON)

When its input turns on, a TON starts counting. When the elapsed time reaches the preset, the done output turns on. If the input turns off at any time, the timer resets to zero.

Input  ___|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|____
Done   ________|‾‾‾‾‾‾‾‾‾‾|____
          |<- PT ->|

Uses: start delay, debouncing a sensor, "sensor blocked for more than 5 s = jam alarm".

Off-delay timer (TOF)

The output turns on immediately with the input, and stays on for the preset time after the input turns off.

Input  ___|‾‾‾‾‾‾|_____________
Done   ___|‾‾‾‾‾‾‾‾‾‾‾‾‾|______
                 |<- PT ->|

Uses: run a cooling fan after a motor stops, keep a conveyor running until the last part clears.

Pulse timer (TP)

A rising edge on the input gives an output pulse of fixed length, however long the input stays on. Uses: a fixed glue shot, a 1-second horn blast.

How each brand writes timers

BrandExampleNotes
SiemensTON, PT := T#3sIEC timers with instance data; outputs Q and ET
MitsubishiOUT T0 K30K30 = 30 × 100 ms = 3 s; contact T0 is the done bit
Allen-BradleyTON T4:0 preset 3000, base 0.001bits .EN, .TT, .DN
TOYOPUCTMR T000contact T000 is the time-up bit

Up counter (CTU)

A CTU adds one on every rising edge of its count input. When the count reaches the preset, the done bit turns on. A separate reset input sets the count back to zero. Counters keep their value when the input turns off; that is the difference from a timer.

Example: a photo-eye counts boxes; at 12 the counter's done bit stops the conveyor and lights "carton full"; the operator's reset button clears it.

Down counter (CTD) and up/down (CTUD)

A CTD counts down from a preset to zero; a CTUD has both count inputs, for example parts entering and leaving a buffer.

Common mistakes

Try the traffic light and part counter examples in the PLC Sim Lab Playground to watch timers and counters run live.

Try it yourself. Wire sensors, contactors and a PLC, write ladder logic and press RUN in the free PLC Sim Lab Playground. Nothing to install.

Open the Playground →Guided lessons →