A smaller register value does not by itself prove that a water meter reset. A counter that wraps after 65,535 can move from 65,530 to 14 after twenty pulses. Subtracting the displayed values without accounting for the wrap would turn genuine consumption into a large negative result.

For an Australian irrigation telemetry installation, establish what the field device actually transmits before repairing a historian calculation. Beckhoff’s integer-type documentation gives a 16-bit unsigned range of 0–65,535. Its operator documentation also warns that intermediate arithmetic depends on the target hardware. A type’s range alone is not evidence that a particular meter implements a wrapping totaliser.

Recover the increment in a wider integer

Assume a device is documented to count upward modulo 65,536, has not reset and cannot advance by a full modulus between observations. If the new value is at least the old value, the increment is new minus old. Otherwise it is 65,536 minus old plus new. Perform these operations in a sufficiently wide type rather than relying on overflow in a small variable.

With an old value of 65,530 and a new value of 14, the increment is 65,536 − 65,530 + 14 = 20 pulses. At an illustrative ten litres per pulse, that represents 200 litres. The table follows the same counter through two ordinary intervals and one wrap. The raw register value and accumulated interval usage are different columns with different meanings.

Illustrative 16-bit counter samples cross the 65,535 boundary. Separate panels show the raw register and the recovered positive increments. Ten litres per pulse is assumed.
Figure 1. Illustrative 16-bit counter samples cross the 65,535 boundary. Separate panels show the raw register and the recovered positive increments. Ten litres per pulse is assumed. Original figure by Industry Applied Editorial.

Worked data

Sample

Raw counter (pulses)

Increment since prior sample (pulses)

Interval volume (L)

A

65520

Not applicable

Not applicable

B

65530

10

100

C

14

20

200

D

34

20

200

Download the worked data and units (CSV)

Find the interval in which recovery becomes ambiguous

At a maximum 100 pulses per second, 65,536 pulses take 655.36 seconds. A polling interval must be shorter than that to exclude a complete additional wrap under the assumed maximum rate. Allow for missed polls and outages: a nominal one-minute schedule is no protection if communications disappear for twenty minutes.

After 1,310.72 seconds at that rate, two full wraps could return the counter to exactly the same value. The two endpoint readings then contain no evidence of the intervening consumption. Faster polling, a wider native totaliser or a retained device-side event history can resolve information that the two endpoints cannot.

Keep resets out of the consumption calculation

Log boot identifiers, reset flags, device uptime and configuration changes where available. A replacement meter or a manual reset can resemble a wrap. Do not quietly convert every negative difference into positive usage; preserve an invalid interval when the reset history is uncertain.

Commission the complete chain with a simulated boundary sequence, a real restart and a deliberately missed poll. Compare the raw payload, decoded type and final engineering quantity. Confirm pulse scaling independently of register width, and retain the quality flag in exports. A result of 200 litres is defensible only while the documented wrap behaviour, rate bound and no-reset assumption hold.

Practical checks

  • Confirm the device’s actual modulus and reset behaviour.

  • Calculate differences in a wider integer type.

  • Bound the longest gap using the maximum possible pulse rate.

  • Flag ambiguous reset or multi-wrap intervals instead of inventing consumption.

Sources and calculation method

Beckhoff — integer data types

Beckhoff — intermediate arithmetic and overflow

Sources checked 1 December 2026. Numerical examples are illustrative calculations, not measured customer or factory results.

Cover: original AI-generated editorial illustration commissioned for this article; not a photograph or evidence of a site visit.

Related reading

Corrections and source questions: info@industryapplied.com