Engineering Hub

๐Ÿ”™ Back to Ladder Logic Functions

Counter Function Symbol Counter Function Symbol

Counter

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.

Using a Counter

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:

Counter Reset Example

Behavior Table

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
CV: 0 / 5  |  Q: OFF
L (Power) N NO (I0.0) CTU C1 CU R Q PV = 5 CV = 0 NO (I0.1) Output Coil (Q0.2)
CV: 5 / 5  |  Q: OFF
L (Power) N NO (I0.2) CTD C2 CD LD Q PV = 5 CV = 5 NO (I0.3) Output Coil (Q0.3)

๐Ÿ”™ Back to Ladder Logic Functions