PLC Counters

Counters keep a tally of things.  They come in 3 varieties:

  • Up Counter: Has 1 input that increments a count.
  • Down Counter: Has 1 input that decrements a count.
  • Up Down Counter: Has 2 inputs, One input causes count to increment, the second input causes the count to decrement.
Turnstiles found at stadiums are good examples of Up Counters. Every time a person enters a count increases.  This count may represent the number of tickets redeemed.


If an entrance turnstile was combined with an exit turnstile, they would form an Up Down Counter, and could be used to know how many people were inside the stadium at any given time.

Counters often allow users to set targets that set specified bits when the targets are met.
Example:  The fire department may only allow 10,000 people in your stadium at any given time, so you set a target of 10,000. When the target is met, a bit controlling a light, seen by the turnstile attendants, is set  This tells the attendants that capacity has been reached and that they cannot allow additional patrons to enter.  A lower target of 0 could be set up and used at the end of the event to verify that all patrons have exited the building.

Recapping data used in counters:

  • 1 or 2 inputs that tell counter when to change values
  • Count Value (1 integer)
  • Target Values (0 to 2 integers)
  • 0 to 2 bits signalling that target(s) have been reached