High-Speed Counters (HSCs) are specialized hardware modules or PLC functions designed to count fast digital pulses often from encoders, sensors, or rotating machinery independently of the PLC’s scan cycle. Unlike standard counters, which rely on software polling, HSCs use dedicated interrupt-based logic to capture every pulse in real time.
Why Standard PLC
Logic Isn’t Enough
Typical scan time: 5–30 ms
Pulse frequency from encoders: Often >1 kHz
Problem: PLC may miss pulses between scans
Solution: HSCs operate asynchronously, capturing every edge
(rising/falling) without delay
How HSC Works in
PLCs
Key Components:
Dedicated high-speed input terminals
Edge detection logic (rising, falling, or both)
Internal registers to store count values
Interrupt routines or cyclic OBs (e.g., OB40 in
Siemens)
Modes of
Operation:
|
Mode |
Description |
|
Simple Count |
Counts pulses from a single input |
|
Quadrature Count |
Uses two inputs (A/B) for direction and
position |
|
Frequency Measurement |
Calculates speed from pulse rate |
|
Length Measurement |
Converts pulses to linear distance |
Practical
Example: Encoder-Based Length Measurement
Let’s say you have an encoder that generates 1000
pulses per meter. You can use HSC logic to track the number of pulses and
calculate the total length:
pascal
// SCL logic example
Length_mm := HSC_Count * 1.0; // Each pulse = 1 mm
- HSC_Count → Real-time pulse count from encoder
- Length_mm → Total measured length in millimeters
This logic is ideal for cut-to-length machines,
conveyor tracking, and roll unwinding systems.
Applications in
Indian Industry
Common Use Cases:
Textile mills: Yarn length measurement
Packaging lines: Product counting and sorting
Automotive: Shaft rotation and speed feedback
Pharma: Bottle filling and labelling synchronization
Hardware Integration:
Siemens S7-1200/1500: HSC via dedicated DI modules
Allen-Bradley Micro800: HSC via high-speed inputs
Delta, Mitsubishi, Omron: Built-in HSC channels with encoder
support
Configuration
Tips
Use shielded cables for encoder signals to avoid
noise.
Debounce filters may be needed for mechanical sensors.
Set correct edge detection (rising/falling) based on
sensor type.
Use OB40 or OB35 in Siemens for cyclic updates.
Retain count values during power loss using
non-volatile memory.
Challenges and
Solutions
|
Challenge |
Solution |
|
Missed pulses |
Use dedicated HSC inputs, not standard
DI |
|
Electrical noise |
Use opto-isolated inputs and shielded
cables |
|
Overflows |
Monitor count limits and reset logic |
|
Direction ambiguity |
Use quadrature encoders with A/B
channels |
Performance
Benefits
Accuracy: Captures every pulse, even at high speeds
Speed: Operates independently of scan cycle
Reliability: Reduces errors in length, speed, and position
tracking
Scalability: Supports multiple counters for complex systems
Teaching Analogy
Imagine trying to count cars passing a toll booth with
a camera that takes one picture every second. You’ll miss the fast ones. But if
you use a laser beam that triggers instantly, you’ll never miss a car. That’s
the difference between standard counters and high-speed counters.
Conclusion
High-Speed Counter logic is a must-have tool in any automation engineer’s arsenal. It enables precise, real-time counting of fast pulses critical for motion control, length tracking, and speed feedback. With proper configuration and integration, HSCs ensure that your PLC doesn’t just control the process it keeps up with it.