๐ Back to Ladder Logic Functions
Counters are used in PLC ladder logic to count events, objects, or operations. There are two primary types of counters: Up Counters (CTU) and Down Counters (CTD). An Up Counter increments its count value each time it receives a trigger signal, while a Down Counter decrements its count value with each trigger.
A trigger signal is typically generated by a rising edge (transition from OFF to ON) of an input condition, such as a sensor or a push button. The current count value is stored in a designated memory location within the PLC, and it can be compared against preset values to control other operations in the ladder logic.
Counters will allow a signal to pass through (i.e., energize their output) when the current count value reaches a predefined preset value. This makes them useful for applications such as counting items on a conveyor belt, tracking machine cycles, or managing batch processes.
There are three main values associated with a counter:
Without a reset signal, the counter will continue to energize its output once the preset value is reached, until it is reset or the PLC is powered down.
A reset signal can be provided like so:
![]()
The below table summarizes the behavior of an Output Coil:
| Input Condition | Counter State | Output State |
|---|---|---|
| CV < PV | Counting | De-energized |
| CV = PV | Reached Preset | Energized |
| Reset Activated | Resetting | De-energized |