Flow_Meter: Troubleshooting Sparse Rain Gauge Pulses

Brian Holt3 min read
Data AcquisitionOther ManufacturerPLC Programming
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

A rain gauge with a reed contact produces pulses too slowly for a one-second flow calculation window. With Pulse_Mode = True and Update_Time = T#1s, the F output returns to zero during update windows that contain no pulse. Preserve the last calculated value externally, but mark it stale when the selected hold period expires.

Confirmed signal and configuration

Item Evidence Engineering implication
Contact signal Reed contact closes for approximately 60 ms The PLC input and task must detect a 60 ms pulse reliably.
Observed pulse spacing Estimated at 2-20 s; 15 s is also reported Many one-second update windows contain no pulse.
Block configuration Pulse_Mode = True, Update_Time = T#1s F is available only briefly when a pulse contributes to the calculation.
Proposed hold period Approximately 30 s A separate sample-and-hold can retain the last nonzero result.
Pulse calibration 0.67704 L/m² per pulse from laboratory measurements Treat this as provisional until checked against a graduated manual collector.

Why changing Update_Time does not solve the display problem

A one-second update period is shorter than the reported 2-20 s pulse interval. Therefore, pulse-free windows are expected. Extending the update period may collect more pulses, but it also changes the averaging window and cannot guarantee a continuously updated result when rainfall stops or pulse spacing exceeds that window.

The evidence does not establish whether Flow_Meter contains a configurable internal hold function or whether its F output is valid only in another mode. Keep those points as product-documentation checks rather than assuming undocumented block behavior.

Hold the last valid flow value externally

  1. Detect each reed-contact pulse and verify that the PLC registers the approximately 60 ms closure once, without duplicate counts.
  2. When F produces a new valid value, copy it into a retained display variable and restart a 30 s hold timer.
  3. While the timer is active, display the retained value instead of the momentary F value.
  4. When the timer expires without another valid update, set the displayed rate to zero or flag it as stale. Do not present the held value as a new measurement.

This approach separates measurement from presentation: the block continues processing pulses, while the display layer prevents a useful value from disappearing between sparse events.

Calculate rainfall rate from pulse spacing

If the provisional calibration is correct, one pulse represents 0.67704 L/m², which is dimensionally equivalent to 0.67704 mm of rainfall. For two consecutive pulses separated by measured time Δt in seconds, calculate the interval-based rainfall intensity as:

Rainfall_intensity_mm_per_h = 0.67704 * 3600 / Δt
                            = 2437.344 / Δt

Do not calculate a rate from the first pulse because no preceding interval exists. Timestamp each accepted pulse, calculate the rate at the next pulse, and invalidate or zero the result after the chosen 30 s no-pulse timeout. Verify the 0.67704 L/m² calibration by comparing accumulated pulse-derived rainfall with a graduated manual collector.

FAQ

Why does Flow_Meter F return to zero between rain-gauge pulses?

With Update_Time = T#1s and pulse intervals of approximately 2-20 s, most update windows contain no pulse. Retain the last valid value externally if the display must remain stable.

How long should I hold the last rain-gauge flow value?

The stated requirement is approximately 30 s. Restart that timeout on every valid update, then set the displayed rate to zero or stale if no new pulse arrives.

How do I calculate rainfall intensity from this pulse input?

Using the provisional calibration, divide 2437.344 by the measured seconds between consecutive pulses to obtain mm/h. Confirm the underlying 0.67704 L/m²-per-pulse calibration with a graduated manual collector before relying on the result.

Back to blog