Home / Knowledge Base / Data Acquisition

SCADA Missing Pulses? The Modbus Pulse Counter Solution

TROUBLESHOOTING GUIDE Protocol: Modbus TCP / RTU  |  Applies to: Flow Meters, SCADA

A central SCADA system should be able to accept a high speed pulse output flow meter or electricity meter without much difficulty. Automation engineers, however, often get frustrated with an anomaly where the physical meter reading at the remote site is always higher than the total in the central SCADA database.

If your system is losing data, it is seldom a software bug or a broken wire. This is a basic conflict between the physics of a physical pulse and the architecture of industrial networking.

Logic Analyzer View: Asynchronous Polling Time Resolution: 50ms/div
1. Physical Meter (50ms pulses) 2. SCADA Polling (1000ms interval) MISSED MISSED CAPTURED MISSED
Diagnostic Quick Reference
  • Symptom: SCADA accumulated totals are lower than the physical dial. Random pulses are permanently dropped.
  • Status Codes: Data Mismatch or Missing Pulses.
  • Root Cause: Asynchronous polling. SCADA polling intervals (e.g., 1000ms) are too slow to capture brief mechanical pulse widths (e.g., 50ms).
The Problem in Plain English
Threat 1:
Missing Pulses
The “Blink” Effect: Your flow meter generates a pulse that lasts only 50ms. Your SCADA asks for data every 1000ms. If the pulse happens while SCADA isn’t looking, the data is completely lost. 💡 Analogy: SCADA is like a security guard who only opens his eyes every 1 second. The pulse is a thief that only appears for 50ms. If the thief slips by while the guard is blinking, the system misses it permanently.
Threat 2:
Phantom Pulses
Mechanical Jitter: When physical contacts close, they microscopically bounce. SCADA might misread a single 10-gallon pulse as a rapid burst of 5 fake spikes. 💡 Analogy: It’s like a gust of wind making the guard mistake 1 thief’s shadow for 10 thieves, causing your SCADA to record fake data spikes.

The Root Cause: The SCADA Polling Trap & Contact Bounce

The fundamental cause of missed pulses is the physical limitations of network sampling, which are described by similar rules to the Nyquist–Shannon sampling theorem. You cannot record a physical event unless your network is “looking” at it at the time it happens.

A high-speed spinning flow meter produces fast, transient pulses. For example, a standard dry contact pulse might only be “closed” (active) for 50 milliseconds, then open again.

Standard SCADA systems communicate using Modbus TCP by “polling” the remote node. A typical Modbus poll rate on a LAN or Cellular network is 1000 milliseconds (1 second). If the SCADA asks the gateway “Is the contact closed?” every 1000ms, but the physical pulse only lasts 50ms, the SCADA is statistically blind to the vast majority of the fluid flowing through the pipe. It only picks up random pulses that happen to coincide with the precise millisecond the network query arrives.

The Secondary Threat: Phantom Pulses (Contact Bounce)

While the network misses pulses, mechanical issues often create false ones. When a physical flow meter relay closes, the metal contacts microscopically “bounce” against each other. This mechanical jitter can cause a single 10-gallon pulse to be misread as 10 rapid electrical spikes, severely distorting data. A robust solution must solve both the network latency and the physical noise.

Asynchronous Pulse Loss Calculator

Enter your physical meter pulse width and your SCADA network polling rate to reveal why your data is inaccurate.

Why “Just Polling Faster” Will Crash Your Network

It might seem logical to simply reduce the Modbus polling interval from 1000ms down to 10ms to “catch” the fast pulses. Do not do this. Forcing a SCADA server to bombard a remote node with TCP requests every 10 milliseconds will cause severe network congestion. The remote gateway’s CPU will max out, Modbus timeout errors will cascade across your HMI, and your entire automation network will crash.

Evaluating Your Options: 3 Realistic Paths to Fix Pulse Loss

To fix the data loss permanently, you must decouple the physical speed of the water meter from the network speed of your SCADA system. In industrial automation, engineers typically evaluate three architectures depending on budget and site layout:

Path 1: Signal Conditioning (Pulse Stretching)

The “Band-Aid” Fix

Installing a cheap pulse-stretching relay between the meter and the gateway to artificially lengthen the 50ms pulse to 1500ms, ensuring the SCADA poll “sees” it.

Pros: Very low hardware cost. No programming required.
The Fatal Flaw: Fails completely at high flow rates. If pulses occur too quickly, the “stretched” pulses will overlap and merge into one continuous signal, causing you to lose data all over again.

Path 2: PLC High-Speed Counter (HSC)

The Local Standard

Wiring the meter directly into a specialized high-speed counter module mounted on your main PLC backplane.

Pros: Extremely reliable. Native integration with local PLC logic.
The Catch: Distance limitation. Pulling long copper wires from a remote meter back to the main PLC cabinet is expensive and highly susceptible to Electromagnetic Interference (EMI) noise.

3 Critical Features to Look for in a Modbus Pulse Counter

Some Ethernet I/O modules do not support edge counting. To avoid future failures, when specifying hardware for pulse accumulation, make sure that the spec sheet explicitly lists these three mandatory capabilities:

1. 32-Bit Counting Capacity (Avoid Overflow)

The cheap commercial I/O modules do the counting in 16 bit registers. A 16-bit register can only count to 65,535 before it overflows and resets to zero. A fast flow meter will send 65,000 pulses in a few days and your SCADA calculations will break. You need to specify a module with 32-bit hardware counters. A 32 bit register can safely accumulate 4.29 billion pulses . You can accumulate them for more than a decade before you have to reset it manually .

2. Non-Volatile Memory (NVRAM / Power-Off Save)

This is the most common pitfall. If your pump station loses power, standard gateways will reboot and their internal pulse counts will wipe to zero. The SCADA will lose all historical totals. Industrial-grade edge nodes feature a Power-off Save function. They continuously write the 32-bit count into physical NVRAM. When the power returns, the module resumes counting exactly where it left off.

3. Hardware Debounce Filters

As mentioned earlier, mechanical relays “bounce”. Look for modules equipped with a built-in 10ms hardware debounce filter. This ensures that rapid electrical spikes caused by physical jitter are rejected, and only clean mechanical closures are recorded.

Implementation: Mapping 32-Bit Pulses to SCADA Registers

DI count read in the IO controller dialog

DI count read in the IO controller dialog (Source: Valtoris Hardware Manual)

Deploying a hardware pulse counter requires zero PLC ladder logic programming. For passive dry contact pulse meters, simply wire the meter directly across the DI and GND terminals on the Valtoris module to establish the physical connection.

Because a 32-bit number is too large to fit into a single standard Modbus register, compliant edge I/O modules automatically split the cumulative total across two consecutive 16-bit Holding Registers.

To read the exact pulse count, your SCADA system simply reads these addresses using Modbus Function Code 03 (Read Holding Registers):

TerminalModbus Address (Dec)Register Data TypeDescription
DI 140257 (0x0100 Hex)16-bit Unsigned INTPulse Count (High Word): The upper 16 bits of the cumulative total.
DI 140258 (0x0101 Hex)16-bit Unsigned INTPulse Count (Low Word): The lower 16 bits of the cumulative total.
// SCADA Integration Note:
In your SCADA software (Ignition, Kepware, etc.) set the tag data type to 32-bit Unsigned Integer (DWord) and address 40257. The software will automatically combine the High and Low words to show the total absolute flow.

Troubleshooting Tip: If the SCADA displays an unusually large or random astronomical number, simply swap the Word Order / Endianness (e.g., Big-Endian to Little-Endian) in your SCADA driver settings.

Stop Losing Data. Start Counting at the Edge.

The Valtoris Remote I/O Series is built for absolute data integrity. Featuring native 32-bit hardware counters on every DI channel, built-in 10ms debounce filters, and built-in NVRAM for power-loss recovery, it ensures your SCADA totals are perfectly accurate, every time.

Frequently Asked Questions (FAQ)

Should I use a dedicated edge node or a high speed counter module for my PLC?
Should your flow meter be situated next to your main PLC cabinet, a fantastic solution would be to install a proprietary high speed counter module (HSC) directly into the PLC backplane. However, if the flow meter is hundreds of meters away at a remote pump station, it is expensive—and susceptible to EMI noise—to pull long copper wires back to the main PLC’s HSC module. For such remote applications, a distributed edge Modbus pulse counter near the meter and transmitting accumulated data back via Ethernet or Cellular is much more reliable and economical.
What happens when a 32-bit pulse counter reaches its maximum limit?
A 32-bit unsigned integer maxes out at 4,294,967,295. If your flow meter generates 10 pulses per second, it would take over 13 years of continuous operation to reach this limit. When it does, the hardware counter simply “rolls over” back to zero. Most modern SCADA systems have built-in “Rollover” handling logic for meter tags, allowing them to calculate the correct delta even when a reset occurs.
How do I manually reset the pulse counter to zero for a new batch process?
While edge counters continuously accumulate totals, you can reset the value remotely via SCADA or configuration software. For Valtoris modules, you can clear the saved count by setting the 32bit DI count save parameter to 0, which restarts the count for the next batch.
What if my flow meter outputs an active pulse (NPN/PNP) instead of a dry contact?
While passive dry contacts wire directly across the DI and GND terminals, Valtoris remote I/O modules also support active voltage pulses. For NPN (Sinking) outputs, connect the signal wire to the DI terminal and ensure the flow meter’s power supply shares a common ground (GND) with the I/O module. Check the specific voltage thresholds in your hardware manual to ensure compatibility with the module’s logical high/low levels.
If my SCADA network goes offline for 3 days, will I lose my pulse data?
No. This is the exact reason edge accumulation is the industry standard. Because the Valtoris module counts and stores the pulses locally in its NVRAM independently of the network, a SCADA outage has zero impact on the physical count. When the network is restored 3 days later, SCADA will simply poll the module and instantly receive the perfectly accurate, up-to-date accumulated total.
How do I convert the raw 32-bit pulse count into Gallons, Liters, or kWh in SCADA?
The edge module gives the absolute number of physical pulses, i.e. 50,000 pulses. To display engineering units on your HMI you will need to apply the K-Factor (Pulse Weight) of the meter in your SCADA tag scaling properties. For example, if your water meter spec sheet says “1 Pulse = 10 Gallons” you would simply multiply the Modbus register value by 10 in your SCADA software and it would show 500,000 Gallons.