wirenerd
← All Lessons
Lesson 26 · Motor Control

Counters

Count events and act on the total. Where a timer triggers on elapsed time, a counter triggers on how many times something happened.

Counting events

A counter does for events what a timer does for time: it watches its input and counts each pulse. When the count reaches a preset value, it turns its output on. It’s how a control circuit acts on "how many" instead of "how long."

How it counts

A counter is edge-triggered — it adds one each time its input goes from off to on (a rising edge), not continuously while the input is held. So a part passing a sensor, a button press, or a machine cycle each adds exactly one to the count. Hold the input on and it still only counts once; it has to release and re-trigger to count again.

Where you use it

Timers vs. counters: reach for a timer when the trigger is elapsed time ("after 5 seconds"), and a counter when the trigger is a number of events ("after 10 parts"). They’re the two ways a control circuit reacts to something other than a simple on/off condition — and they pair beautifully (count parts, then time a sealing cycle).

How it works in a circuit

Like a timer or coil, a counter gets a letter, and contacts with that letter follow its output — so when the count hits the preset, those contacts switch and drive the next action (stop the conveyor, light a "full" lamp, start the sealer). Wire something to its reset to clear it and go again.

What to take away

A counter counts rising edges of its input and energizes its letter when the count reaches the preset; a reset clears it. Use it when the trigger is a quantity of events rather than elapsed time. With timers and counters, your control circuits can react to time and count — the basis of real sequencing and batching.

Now build it yourself

In the Sandbox, wire a Push Button (or a switch) into a Counter (set preset to 3, letter "C"), and a Light controlled by a NO Contact assigned to "C". Energize, press the button three times, and the light comes on. Wire another switch to the counter\u2019s RST terminal to reset the count.

Open the Sandbox →