# Hour Meter resets to zero

**URL:** <https://forum.inductiveautomation.com/t/hour-meter-resets-to-zero/4419>\
**Category:** Ignition\
**Created:** [May 7, 2012, 12:39pm UTC](https://forum.inductiveautomation.com/t/hour-meter-resets-to-zero/4419 "2012-05-07T12:39:00Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ruslan](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@Ruslan](https://forum.inductiveautomation.com/u/Ruslan)\
**Post date:** [May 7, 2012, 12:39pm UTC](https://forum.inductiveautomation.com/t/hour-meter-resets-to-zero/4419/1 "2012-05-07T12:39:00Z")

</div>

Hello! I have noticed, that Hour Meter resets to zero each time I restart SQL Bridge module. Is there any way to save previous values? SQL Bridge version used: 5.3.3 (b117).

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [May 7, 2012, 3:27pm UTC](https://forum.inductiveautomation.com/t/hour-meter-resets-to-zero/4419/2 "2012-05-07T15:27:48Z")

</div>

Yes, you have to set the hour meter item to “Bi-Directional DB Wins” mode so when Ignition restarts it using the database value first.

---

<div class="post-metadata">

**Author:** ![Ruslan](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@Ruslan](https://forum.inductiveautomation.com/u/Ruslan)\
**Post date:** [May 20, 2012, 9:31pm UTC](https://forum.inductiveautomation.com/t/hour-meter-resets-to-zero/4419/3 "2012-05-20T21:31:47Z")

</div>

Did it as you adviced, but it didn’t help. Problem still remains: each time transaction group or bridge restarted, zero is written to DB table.

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [May 21, 2012, 3:58pm UTC](https://forum.inductiveautomation.com/t/hour-meter-resets-to-zero/4419/4 "2012-05-21T15:58:46Z")

</div>

It worked for me. Can you post a screenshot of the hour meter? Or possibly export the group so we can see it?

---

<div class="post-metadata">

**Author:** ![Ruslan](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@Ruslan](https://forum.inductiveautomation.com/u/Ruslan)\
**Post date:** [May 21, 2012, 8:10pm UTC](https://forum.inductiveautomation.com/t/hour-meter-resets-to-zero/4419/5 "2012-05-21T20:10:38Z")

</div>

Here I got screenshot of my instance, you can see timer reset in DB browser caused by stop/start of the transaction group.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/c/cfa4c08c2ec9ad3ab6ef441b4c0d93905151ae80.png)

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [May 21, 2012, 8:29pm UTC](https://forum.inductiveautomation.com/t/hour-meter-resets-to-zero/4419/6 "2012-05-21T20:29:38Z")

</div>

Ok, I see. You are using a historical group which always inserts new rows. It never looks at the row to get initial values. I don’t think there is a way to preserve that value right now. I thought you were updating a record in the database. In this case it always resets the hour meter to 0. I can add a ticket in to preserve the hour meter value in memory.

---

<div class="post-metadata">

**Author:** ![michael.biggers](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@michael.biggers](https://forum.inductiveautomation.com/u/michael.biggers)\
**Post date:** [July 24, 2017, 2:52pm UTC](https://forum.inductiveautomation.com/t/hour-meter-resets-to-zero/4419/7 "2017-07-24T14:52:46Z")

</div>

Hi, I was wondering if anything was changed since this post to let hour meter values be preserved in memory. I was having an issue where a server reset caused a running hour meter in one of my transaction groups to be reset to zero when it’s supposed to be running indefinitely. We’re currently running ignition 7.8–is there a fix for this problem for us?  
Thanks!

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [August 4, 2017, 4:29pm UTC](https://forum.inductiveautomation.com/t/hour-meter-resets-to-zero/4419/8 "2017-08-04T16:29:56Z")

</div>

Unfortunately, nothing has changed. That problem still persists.I will have to put a ticket in our system for that.

---

<div class="post-metadata">

**Author:** ![IgnitionNewbie](https://avatars.discourse-cdn.com/v4/letter/i/94ad74/32.png) [@IgnitionNewbie](https://forum.inductiveautomation.com/u/IgnitionNewbie)\
**Post date:** [December 7, 2022, 3:46pm UTC](https://forum.inductiveautomation.com/t/hour-meter-resets-to-zero/4419/9 "2022-12-07T15:46:05Z")

</div>

I just had a server reset wipe all our hourmeters that were set to bidirectional DB wins, what would i have to do to fix this?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [December 29, 2022, 10:12pm UTC](https://forum.inductiveautomation.com/t/hour-meter-resets-to-zero/4419/10 "2022-12-29T22:12:17Z")

</div>

The best thing is to build an hour meter UDT that handles it outside of the transaction group so it can be persistent. I have uploaded one you can play around with.

[tags.json](https://forum.inductiveautomation.com/uploads/short-url/yW1GA8Oj6CugCKj3YPPyoQDHtoq.json) (2.0 KB)
