{"id":3592,"date":"2026-10-25T17:00:00","date_gmt":"2026-10-25T09:00:00","guid":{"rendered":"https:\/\/cnbygele.com\/?p=3592"},"modified":"2026-10-24T19:13:33","modified_gmt":"2026-10-24T11:13:33","slug":"power-meter-energy-counter-rollover","status":"publish","type":"post","link":"https:\/\/cnbygele.com\/th\/blog\/power-meter-energy-counter-rollover\/","title":{"rendered":"\u0e01\u0e32\u0e23\u0e27\u0e19\u0e01\u0e25\u0e31\u0e1a\u0e02\u0e2d\u0e07\u0e15\u0e31\u0e27\u0e19\u0e31\u0e1a\u0e21\u0e34\u0e40\u0e15\u0e2d\u0e23\u0e4c\u0e1e\u0e25\u0e31\u0e07\u0e07\u0e32\u0e19: \u0e02\u0e35\u0e14\u0e08\u0e33\u0e01\u0e31\u0e14\u0e23\u0e35\u0e08\u0e34\u0e2a\u0e40\u0e15\u0e2d\u0e23\u0e4c \u0e01\u0e32\u0e23\u0e1b\u0e23\u0e31\u0e1a\u0e2a\u0e40\u0e01\u0e25 \u0e41\u0e25\u0e30\u0e01\u0e32\u0e23\u0e01\u0e39\u0e49\u0e04\u0e37\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25"},"content":{"rendered":"<p>An energy meter counter rollover occurs when a cumulative register reaches its documented limit and returns to the start of its counting range. It can make a normal interval appear to contain negative consumption if software simply subtracts the earlier reading from the later one. Correct handling requires the register&#8217;s actual range, units, scale and reset behavior, together with enough observations to distinguish one wrap from a reset, replacement or decoding error. Preserve the original readings before applying any correction. This guide explains a defensible data workflow without assuming a particular CNBYG register width or rollover value.<\/p>\n<h2>Identify which counter changed<\/h2>\n<p>A meter installation may expose several cumulative quantities: import active energy, export active energy, reactive energy, tariff totals, pulse counts and values accumulated by a gateway. They may have different limits and reset rules. An event in one counter does not prove that every energy register in the instrument has rolled over.<\/p>\n<p>Record the instrument identity, register name, address where applicable, data type, engineering unit and scale. Establish whether the counter originates in the meter, a pulse input module, a gateway or a software calculation. The location matters because restarting a collector may reset its own running total while leaving the physical meter&#8217;s cumulative energy unchanged.<\/p>\n<p>For the register direction and boundary, consult the <a href=\"https:\/\/cnbygele.com\/blog\/power-meter-import-export-energy\/\">import and export energy guide<\/a>. Treat import and export as separate documented quantities unless the instrument explicitly supplies a net register. A signed net-energy decrease can be legitimate and should not automatically trigger an unsigned rollover correction.<\/p>\n<p>For the wider instrument selection context, see the <a href=\"https:\/\/cnbygele.com\/blog\/3-phase-electric-power-meters\/\">three-phase electric power meter guide<\/a>.<\/p>\n<h2>Obtain the range from the actual documentation<\/h2>\n<p>Ask for the register definition for the exact model and firmware. Determine the minimum value, maximum value, increment, decimal scale, sign convention and behavior at the limit. Some counters wrap, some saturate, some reset under defined actions, and some use a representation with a range that differs from the front-panel display.<\/p>\n<p>Do not infer the communication register limit from the number of visible display digits. A display may change resolution, show a suffix or present only part of a larger internal value. Conversely, a gateway might store a smaller integer than the instrument provides. The narrowest representation in the data path can become the practical failure point.<\/p>\n<p>The <a href=\"https:\/\/cnbygele.com\/blog\/power-meter-modbus-communication-setup\/\">Modbus setup guide<\/a> addresses decoding, units and word ordering. Confirm those first. A signed\/unsigned error or an inconsistent read across multiple words can resemble a wrap without representing a real energy-counter event.<\/p>\n<p><figure><img decoding=\"async\" alt=\"Disconnected CNBYG BY194 reference instrument beside energy-record continuity review materials \u2014 inspection\" class=\"wp-image-3590\" height=\"1024\" loading=\"lazy\" src=\"https:\/\/cnbygele.com\/wp-content\/uploads\/2026\/10\/power-meter-energy-counter-rollover-inspection-20261024.png\" style=\"max-width:100%;height:auto\" width=\"1536\" srcset=\"https:\/\/cnbygele.com\/wp-content\/uploads\/2026\/10\/power-meter-energy-counter-rollover-inspection-20261024.png 1536w, https:\/\/cnbygele.com\/wp-content\/uploads\/2026\/10\/power-meter-energy-counter-rollover-inspection-20261024-300x200.png 300w, https:\/\/cnbygele.com\/wp-content\/uploads\/2026\/10\/power-meter-energy-counter-rollover-inspection-20261024-1024x683.png 1024w, https:\/\/cnbygele.com\/wp-content\/uploads\/2026\/10\/power-meter-energy-counter-rollover-inspection-20261024-768x512.png 768w, https:\/\/cnbygele.com\/wp-content\/uploads\/2026\/10\/power-meter-energy-counter-rollover-inspection-20261024-18x12.png 18w, https:\/\/cnbygele.com\/wp-content\/uploads\/2026\/10\/power-meter-energy-counter-rollover-inspection-20261024-600x400.png 600w\" sizes=\"auto, (max-width: 1536px) 100vw, 1536px\" \/><figcaption>Product-reference illustration of the disconnected BY194 exterior. Surrounding materials illustrate energy-record continuity review. This image does not establish voltage inputs, phase diagnostics, energy functions or a specific model rating.<\/figcaption><\/figure>\n<\/p>\n<h2>Use modular subtraction only under explicit conditions<\/h2>\n<p>For a documented zero-based counter with a known modulus M, let C\u2081 be the earlier raw count and C\u2082 the later raw count. If no wrap occurred, the count difference is C\u2082 \u2212 C\u2081. If exactly one wrap occurred, the difference is:<\/p>\n<p><strong>\u0394C = (M \u2212 C\u2081) + C\u2082<\/strong><\/p>\n<p>The modulus is the number of discrete count states, not always the highest displayed value. A hypothetical integer counter that runs from 0 through 999,999 has M = 1,000,000. If it moves from 999,980 to 25 with exactly one confirmed wrap, the difference is 45 counts. At an illustrative scale of 0.1 kWh per count, that equals 4.5 kWh.<\/p>\n<p>Those values are arithmetic examples, not BY194 specifications. If documentation supplies a maximum engineering value rather than a raw-count range, also obtain the increment and reset endpoint. A floating-point energy register cannot automatically be treated as a fixed-width unsigned integer counter.<\/p>\n<p>The formula becomes unsafe when the event could be a reset or when multiple wraps are possible. Adding one modulus may produce a positive number while still substantially undercounting the true interval. A plausible result is insufficient evidence that the selected explanation is correct.<\/p>\n<h2>Distinguish wrap, reset and replacement<\/h2>\n<p>A wrap normally has evidence compatible with the documented limit: the earlier reading is near the upper end, the next is near the start, and the resulting interval is consistent with known operating conditions. Even that pattern should be checked against settings changes, event logs and device identity.<\/p>\n<p>A reset may follow an authorized command, commissioning action or a software restart. A replacement changes the physical instrument or data source. A communication error may produce zero, a stale value or a sentinel. Each requires different treatment. Never convert every negative difference into a wrap merely to keep a chart nonnegative.<\/p>\n<p>The <a href=\"https:\/\/prometheus.io\/docs\/prometheus\/latest\/querying\/functions\/\" rel=\"noopener nofollow\" target=\"_blank\">Prometheus documentation on counter functions<\/a> describes handling counter decreases as resets in its software monitoring model. That illustrates why a data system needs explicit counter semantics. Its reset interpretation does not establish the modulus or physical behavior of an industrial electricity meter; a documented meter wrap requires its own treatment.<\/p>\n<h2>Build an event classification table<\/h2>\n<p>Use the table as an investigation framework. Acceptance depends on the actual register documentation and retained evidence.<\/p>\n<div style=\"overflow-x:auto;max-width:100%\">\n<table style=\"border-collapse:collapse;width:100%;min-width:560px\">\n<thead>\n<tr>\n<th style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Observed change<\/th>\n<th style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Evidence needed<\/th>\n<th style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Treatment before reporting consumption<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">High value followed by low value<\/td>\n<td style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Documented modulus, timestamps and operating bound<\/td>\n<td style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Apply one-wrap arithmetic only when the assumptions hold<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Value becomes zero after maintenance<\/td>\n<td style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Change log, reset command and meter identity<\/td>\n<td style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Segment the record at the confirmed reset<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Serial number or data-source identity changes<\/td>\n<td style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Replacement and mapping records<\/td>\n<td style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Start a new counter segment with a documented opening value<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">One impossible sample between normal readings<\/td>\n<td style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Raw response and communication status<\/td>\n<td style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Quarantine the suspect sample and investigate decoding<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Negative net-energy change<\/td>\n<td style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Signed register definition and power direction<\/td>\n<td style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Interpret the documented net quantity rather than assuming a wrap<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Long gap followed by a lower value<\/td>\n<td style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Maximum plausible energy and counter range<\/td>\n<td style=\"border:1px solid #d1d5db;padding:10px;text-align:left;vertical-align:top\">Retain an unresolved interval when wrap count is ambiguous<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2>Choose a reading interval that limits ambiguity<\/h2>\n<p>A cumulative counter does not preserve the number of times it has wrapped unless the device supplies additional information. Bound the possible energy between observations using a defensible maximum for the measurement point. If that bound is comparable to or greater than the counter&#8217;s energy span, more than one wrap may be possible and two endpoint readings are insufficient.<\/p>\n<p>For a constant upper-bound power Pmax in kW and an elapsed time t in hours, the maximum energy bound is Pmax \u00d7 t in kWh. Use consistent units and justify the bound from the installation. A nameplate total that excludes generation, bidirectional flow or a changed feeder arrangement may not support the intended assumption.<\/p>\n<p>An illustrative 100 kW bound over two hours gives no more than 200 kWh of accumulated energy in a unidirectional counter under those assumptions. This is a planning check, not a prescribed polling interval. Select a practical interval with margin, account for communication outages, and verify that the collector retains original timestamps and quality flags.<\/p>\n<h2>Reconcile with an independent record when available<\/h2>\n<p>Useful corroboration may include the instrument&#8217;s local cumulative reading, a documented interval log, another meter at an appropriate boundary or a compatible pulse count. Each comparison has limitations. Two meters at different feeder boundaries can legitimately disagree because they include different loads or losses.<\/p>\n<p><a href=\"https:\/\/docs.openenergymonitor.org\/electricity-monitoring\/pulse-counting\/introduction-to-pulse-counting.html\" rel=\"noopener nofollow\" target=\"_blank\">OpenEnergyMonitor&#8217;s pulse-counting explanation<\/a> describes the relationship between a defined pulse quantity and accumulated energy. Use the actual instrument&#8217;s documented pulse constant when comparing records; do not copy another meter&#8217;s example constant. Confirm whether transformer ratios are already included and whether the pulse collector itself reset or missed events.<\/p>\n<p>The separate <a href=\"https:\/\/cnbygele.com\/blog\/power-meter-pulse-output\/\">meter pulse-output guide<\/a> explains that interface and its verification. Agreement supports the interpretation only when boundaries, units, time windows and scaling match. An independent record with the same undocumented multiplier error is weak corroboration.<\/p>\n<h2>Preserve raw and corrected data separately<\/h2>\n<p>Keep the original timestamp, raw value, decoded engineering value, device identity, configuration revision and communication quality. Store the derived interval energy with its event classification and the rule used. If an operator resolves an ambiguous event, retain the supporting evidence and the date of that decision.<\/p>\n<p>Do not overwrite historical raw samples with an adjusted cumulative number. A later discovery about scale, resets or replacement may require recalculation. A separate continuous reporting total can be useful, but it should remain traceable to individual counter segments and explicit corrections.<\/p>\n<p>For gaps that cannot be resolved, mark the interval as uncertain. If the business needs an estimate, keep it visibly separate from measured energy and record the estimation method and approval. A smooth chart should not conceal that the available readings cannot establish an exact total.<\/p>\n<p><figure><img decoding=\"async\" alt=\"Disconnected CNBYG BY194 reference instrument beside energy-record continuity review materials \u2014 records\" class=\"wp-image-3591\" height=\"1024\" loading=\"lazy\" src=\"https:\/\/cnbygele.com\/wp-content\/uploads\/2026\/10\/power-meter-energy-counter-rollover-records-20261024.png\" style=\"max-width:100%;height:auto\" width=\"1536\" srcset=\"https:\/\/cnbygele.com\/wp-content\/uploads\/2026\/10\/power-meter-energy-counter-rollover-records-20261024.png 1536w, https:\/\/cnbygele.com\/wp-content\/uploads\/2026\/10\/power-meter-energy-counter-rollover-records-20261024-300x200.png 300w, https:\/\/cnbygele.com\/wp-content\/uploads\/2026\/10\/power-meter-energy-counter-rollover-records-20261024-1024x683.png 1024w, https:\/\/cnbygele.com\/wp-content\/uploads\/2026\/10\/power-meter-energy-counter-rollover-records-20261024-768x512.png 768w, https:\/\/cnbygele.com\/wp-content\/uploads\/2026\/10\/power-meter-energy-counter-rollover-records-20261024-18x12.png 18w, https:\/\/cnbygele.com\/wp-content\/uploads\/2026\/10\/power-meter-energy-counter-rollover-records-20261024-600x400.png 600w\" sizes=\"auto, (max-width: 1536px) 100vw, 1536px\" \/><figcaption>Product-reference illustration of the disconnected BY194 exterior. Surrounding materials illustrate energy-record continuity review. This image does not establish voltage inputs, phase diagnostics, energy functions or a specific model rating.<\/figcaption><\/figure>\n<\/p>\n<h2>Test the reporting rule before relying on it<\/h2>\n<p>Use recorded or simulated input data in an isolated reporting test. Include ordinary increase, one confirmed wrap, a reset, replacement, duplicate timestamps, an invalid sample and a gap long enough to make wrap count ambiguous. Check the calculated quantity, quality flag and event record for each case.<\/p>\n<p>This software exercise does not require deliberately rolling over or resetting a production electricity meter. Avoid changing operational counters to create test data. When an actual instrument test is necessary, obtain the approved procedure and authorization, preserve its starting state and understand the consequences for cumulative records.<\/p>\n<p>The <a href=\"https:\/\/cnbygele.com\/product\/by194-series-multifunctional-power-instruments\/\">CNBYG BY194 product-family page<\/a> supports a product enquiry, but does not by itself establish any variant&#8217;s register width, modulus, nonvolatile retention or reset permissions. Request those details and a sample register definition for the exact supplied unit before approving an integration.<\/p>\n<h2>Further learning<\/h2>\n<p>The neutral computing lesson below explains why a finite digital number can overflow. It supports the counting concept, while the meter manual determines the actual register behavior.<\/p>\n<div style=\"position:relative;padding-bottom:56.25%;height:0;overflow:hidden\"><iframe allowfullscreen=\"\" loading=\"lazy\" src=\"https:\/\/www.youtube-nocookie.com\/embed\/WN8i5cwjkSE\" style=\"position:absolute;top:0;left:0;width:100%;height:100%;border:0\" title=\"Binary Addition &amp; Overflow - Computerphile\"><\/iframe><\/div>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=WN8i5cwjkSE\" rel=\"noopener nofollow\" target=\"_blank\">Watch the educational lesson<\/a><\/p>\n<h2>Frequently asked questions<\/h2>\n<h3>Is every negative energy difference a rollover?<\/h3>\n<p>No. Resets, replacements, decoding faults and legitimate signed net-energy changes can also produce a decrease. Classify the event from the register definition and retained evidence before correcting it.<\/p>\n<h3>Is the modulus equal to the highest counter value?<\/h3>\n<p>For a zero-based integer range, it is usually the number of discrete states: the highest value plus one count. Confirm the actual range and increment instead of assuming a display limit is a raw modulus.<\/p>\n<h3>Can two readings reveal several rollovers?<\/h3>\n<p>Usually not without additional information. A justified energy bound, intervening samples, event records or another compatible measurement is needed to establish how many wraps occurred.<\/p>\n<h3>Does the BY194 family have one universal rollover value?<\/h3>\n<p>Do not assume a universal value. Obtain the exact variant&#8217;s register map, firmware details, scale and counter behavior. A product-family description or photograph cannot establish those properties.<\/p>\n<p><script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"Is every negative energy difference a rollover?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"No. Resets, replacements, decoding faults and legitimate signed net-energy changes can also produce a decrease. Classify the event from the register definition and retained evidence before correcting it.\"}}, {\"@type\": \"Question\", \"name\": \"Is the modulus equal to the highest counter value?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"For a zero-based integer range, it is usually the number of discrete states: the highest value plus one count. Confirm the actual range and increment instead of assuming a display limit is a raw modulus.\"}}, {\"@type\": \"Question\", \"name\": \"Can two readings reveal several rollovers?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Usually not without additional information. A justified energy bound, intervening samples, event records or another compatible measurement is needed to establish how many wraps occurred.\"}}, {\"@type\": \"Question\", \"name\": \"Does the BY194 family have one universal rollover value?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Do not assume a universal value. Obtain the exact variant's register map, firmware details, scale and counter behavior. A product-family description or photograph cannot establish those properties.\"}}]}<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0e08\u0e31\u0e14\u0e01\u0e32\u0e23\u0e01\u0e32\u0e23\u0e2b\u0e21\u0e38\u0e19\u0e01\u0e25\u0e31\u0e1a\u0e02\u0e2d\u0e07\u0e15\u0e31\u0e27\u0e19\u0e31\u0e1a\u0e21\u0e34\u0e40\u0e15\u0e2d\u0e23\u0e4c\u0e1e\u0e25\u0e31\u0e07\u0e07\u0e32\u0e19\u0e42\u0e14\u0e22\u0e43\u0e0a\u0e49\u0e02\u0e35\u0e14\u0e08\u0e33\u0e01\u0e31\u0e14\u0e02\u0e2d\u0e07\u0e23\u0e35\u0e08\u0e34\u0e2a\u0e40\u0e15\u0e2d\u0e23\u0e4c\u0e17\u0e35\u0e48\u0e21\u0e35\u0e01\u0e32\u0e23\u0e23\u0e30\u0e1a\u0e38\u0e44\u0e27\u0e49 \u0e41\u0e22\u0e01\u0e41\u0e22\u0e30\u0e01\u0e32\u0e23\u0e23\u0e35\u0e40\u0e0b\u0e47\u0e15 \u0e41\u0e25\u0e30\u0e23\u0e31\u0e01\u0e29\u0e32\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e1e\u0e25\u0e31\u0e07\u0e07\u0e32\u0e19\u0e43\u0e2b\u0e49\u0e21\u0e35\u0e04\u0e27\u0e32\u0e21\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07\u0e41\u0e25\u0e30\u0e40\u0e0a\u0e37\u0e48\u0e2d\u0e16\u0e37\u0e2d\u0e44\u0e14\u0e49.<\/p>","protected":false},"author":4,"featured_media":3589,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_gspb_post_css":"","footnotes":""},"categories":[1],"tags":[231],"class_list":["post-3592","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-power-factor-correction"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"acf":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/cnbygele.com\/th\/wp-json\/wp\/v2\/posts\/3592","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cnbygele.com\/th\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cnbygele.com\/th\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cnbygele.com\/th\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/cnbygele.com\/th\/wp-json\/wp\/v2\/comments?post=3592"}],"version-history":[{"count":1,"href":"https:\/\/cnbygele.com\/th\/wp-json\/wp\/v2\/posts\/3592\/revisions"}],"predecessor-version":[{"id":3593,"href":"https:\/\/cnbygele.com\/th\/wp-json\/wp\/v2\/posts\/3592\/revisions\/3593"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cnbygele.com\/th\/wp-json\/wp\/v2\/media\/3589"}],"wp:attachment":[{"href":"https:\/\/cnbygele.com\/th\/wp-json\/wp\/v2\/media?parent=3592"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cnbygele.com\/th\/wp-json\/wp\/v2\/categories?post=3592"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cnbygele.com\/th\/wp-json\/wp\/v2\/tags?post=3592"}],"curies":[{"name":"\u0e14\u0e35\u0e21\u0e32\u0e01","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}