What is the counting frequency?

What is counting frequency? Sensor speed and pulse counting
Counting frequency can describe the number of recurring input pulses per second or the maximum pulse rate a device can accept. It is expressed in hertz, Hz. When each event produces one pulse and one edge is counted per pulse, 100 Hz means 100 pulses per second. The underlying frequency concept is the same, but a datasheet rating must be read in the context of the device and counting mode.
A fast sensor alone does not guarantee correct counting. The sensor output, connection, input circuit and counting method must work together. If a PLC or counter cannot capture the pulses, the total can be too low even when the sensor detects the targets.
Is switching frequency the same as counter input frequency?
A sensor's switching frequency describes how quickly it can detect successive targets and change its output under specified test conditions. Target size, material, distance and spacing can affect the result. A maximum frequency rating does not mean that the sensor continuously generates pulses at that rate; the actual pulse rate depends on passing targets.
A counter's maximum input frequency is the pulse rate its input can accept at the specified signal levels and in the selected counting mode. The PLC input module, channel, filter and counting mode can affect that limit. Response time, on/off delay and output edge time may also be separate specifications, so check how the manufacturer defines each one.
A measuring sensor's measurement update rate is another specification. For example, the rate at which an analog signal updates does not, by itself, establish how quickly a switching output can count objects. Compare ratings that describe the same function and counting convention.
How do frequency, period and pulse width relate?
For a regularly repeating signal, f = 1 / T, where f is frequency and T is the duration of one complete cycle in seconds. In milliseconds, the relationship becomes T = 1000 / f. A 100 Hz signal therefore has a period of 10 ms.
The period is the sum of the high-level duration and low-level duration. Pulse width describes only one of these intervals. The following examples assume a 50% duty cycle, with equal high and low durations.
| Pulse frequency | Full period | High duration | Low duration |
|---|---|---|---|
| 100 Hz | 10 ms | 5 ms | 5 ms |
| 500 Hz | 2 ms | 1 ms | 1 ms |
| 1 kHz | 1 ms | 0.5 ms | 0.5 ms |
The rising and falling edges of a pulse are two separate transitions. If each object produces one pulse, counting both edges can double the reported quantity unless the appropriate conversion is applied. Define the edge to count and the expected number of pulses per object.
Conveyor example: why can pulses be missed at a low frequency?
Suppose a conveyor runs at 1 m/s and the target centres are 50 mm, or 0.05 m, apart. If each target produces one pulse, the required frequency is f = v / p = 1 / 0.05 = 20 Hz. Here, p is the pitch: the distance from one target's centre to the next, rather than just the clear gap.
Assuming an effective detection width of 2 mm, the detection duration is approximately t = 0.002 / 1 = 2 ms. This 20 Hz signal can therefore have a 2 ms high duration and approximately 48 ms low duration. An input requiring at least 3 ms at the high level cannot accept that pulse. A low frequency does not guarantee a sufficiently wide pulse.
This calculation is an initial estimate. Actual pulse width depends on the light spot or sensing field, target geometry and sensor delays. Check alignment and surface effects for photoelectric sensors, spot size for laser sensors, and measurement and switching rates for ultrasonic sensors.
Calculating RPM and the pulse rate from a toothed wheel
If a shaft produces z detected targets per revolution at a speed of n RPM, the pulse frequency is f = n × z / 60. RPM means revolutions per minute. For a 12-tooth wheel rotating at 1800 RPM, with one pulse per tooth, the required rate is f = 1800 × 12 / 60 = 360 Hz.
A suitable inductive sensor can detect a metal toothed wheel, provided the tooth and gap geometry allows distinct pulses. To calculate speed from frequency, use n = 60 × f / z. If the signal chain can accept 1000 Hz, the theoretical limit for 12 targets per revolution is 5000 RPM. This calculation is not an operating-speed recommendation until mounting and pulse-width conditions have been verified.
Encoder channel frequency versus ×4 counting
An encoder's resolution directly affects the required frequency. An incremental encoder producing 1024 complete pulse cycles per revolution on channel A generates 1024 × 1500 / 60 = 25,600 Hz, or 25.6 kHz, at 1500 RPM.
With ×4 quadrature decoding, the rising and falling edges of both A and B are evaluated. The counter processes 102,400 counts per second in this example, while the A-channel frequency remains 25.6 kHz. Check whether a datasheet limit specifies channel frequency or total count rate. Read PPR/CPR terminology according to the manufacturer's definition as well.
The encoder output type must match the input interface. TTL, HTL, open-collector and differential outputs have different signal levels and connection requirements. Similarly, PNP/NPN compatibility and NO/NC behaviour affect the sensor-to-counter connection and edge selection.
PLC counting, input filtering and practical verification
If counting relies on detecting input edges in the normal program scan, a short pulse can begin and end between two readings and be missed. A high-speed counter, HSC, counts pulses at a suitable hardware input independently of the program scan; the program can read the accumulated count. Select the correct channel and counting mode for the HSC.
An input filter rejects short interference pulses, but an excessively long setting can also reject valid pulses. Both the minimum high duration and minimum low duration must satisfy the input requirements. Assess filtering together with the actual waveform and electromagnetic interference. Include delays introduced by an intermediate relay or signal converter.
Cable and connector selection, connection quality and cable routing affect the signal reaching the input. If counts are correct at low speed but too low at high speed, compare the sensor output with the counter input. An oscilloscope shows pulse width, signal levels and edge shape; an illuminated sensor LED alone does not establish that the input counted the pulse.
Select equipment for the highest expected line or shaft speed. Allow appropriate capacity headroom for speed increases, changing target spacing and operating conditions. For final verification, pass a known number of targets at low and high speeds and compare the actual quantity with the recorded count. If pulse stretching is used, check that pulses from closely spaced targets do not merge.