# Timer reset to zero

**URL:** <https://forum.inductiveautomation.com/t/timer-reset-to-zero/85273>\
**Category:** Ignition\
**Tags:** vision, scripting\
**Created:** [February 6, 2024, 7:21am UTC](https://forum.inductiveautomation.com/t/timer-reset-to-zero/85273 "2024-02-06T07:21:06Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Evans](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@Alex\_Evans](https://forum.inductiveautomation.com/u/Alex_Evans)\
**Post date:** [February 6, 2024, 7:21am UTC](https://forum.inductiveautomation.com/t/timer-reset-to-zero/85273/1 "2024-02-06T07:21:06Z")

</div>

Hi,  
I am trying to get the timer to reset to zero at a specific time, I am using a gateway script schedule to change a tag called reset to value 1 which is resetting a counter but I cant figure out how to get this to zero the timer value?

Thanks,  
Alex

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [February 6, 2024, 9:48am UTC](https://forum.inductiveautomation.com/t/timer-reset-to-zero/85273/2 "2024-02-06T09:48:53Z")

</div>

What timer ? You need to be a bit more accurate, we don't know your system and we can't just guess what you're talking about.

That said, it seems like you want a tag change to trigger something. There are 2 different kind of tag change scripts: On the tag itself, or in the gateway events. You can use one of those (probably the gateway event in your case) to script whatever you want.

---

<div class="post-metadata">

**Author:** ![Alex\_Evans](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@Alex\_Evans](https://forum.inductiveautomation.com/u/Alex_Evans)\
**Post date:** [February 6, 2024, 2:48pm UTC](https://forum.inductiveautomation.com/t/timer-reset-to-zero/85273/3 "2024-02-06T14:48:24Z")

</div>

Sorry, I am using the timer in vision and I want it to reset the value on the timer property to 0 when the reset tag = 1, I am using the gateway event to set the reset tag value to 1 but don't know how to link this across to a property to set the timer value to 0.  
Hope that makes more sense

Thanks

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 6, 2024, 2:49pm UTC](https://forum.inductiveautomation.com/t/timer-reset-to-zero/85273/4 "2024-02-06T14:49:58Z")

</div>

Create a custom property on the timer component and bind that reset tag to it. Then use a propertyChange event to monitor the custom property and perform the reset.

---

<div class="post-metadata">

**Author:** ![Alex\_Evans](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@Alex\_Evans](https://forum.inductiveautomation.com/u/Alex_Evans)\
**Post date:** [February 6, 2024, 2:51pm UTC](https://forum.inductiveautomation.com/t/timer-reset-to-zero/85273/5 "2024-02-06T14:51:28Z")

</div>

Hi Phil, I didn't think you could create a custom property on a timer in vision? could I creating a custom property elsewhere and do the same thing?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 6, 2024, 2:52pm UTC](https://forum.inductiveautomation.com/t/timer-reset-to-zero/85273/6 "2024-02-06T14:52:23Z")

</div>

Yeah, if any given component doesn't have the ability to use custom props, I just use its container.

---

<div class="post-metadata">

**Author:** ![Alex\_Evans](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@Alex\_Evans](https://forum.inductiveautomation.com/u/Alex_Evans)\
**Post date:** [February 6, 2024, 3:01pm UTC](https://forum.inductiveautomation.com/t/timer-reset-to-zero/85273/7 "2024-02-06T15:01:36Z")

</div>

once I have the property made on the root container called reset and assigned to the reset tag to it, how do I go about scripting on the timer for the set value to 0 sorry?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 6, 2024, 3:16pm UTC](https://forum.inductiveautomation.com/t/timer-reset-to-zero/85273/8 "2024-02-06T15:16:50Z")

</div>

So, you would create a property change event on the root container that looked something like this:

```auto
if event.propertyName == 'reset':
	if event.newValue:
		timer = event.source.getComponent("Timer")
		timer.value = 0

```

---

<div class="post-metadata">

**Author:** ![Alex\_Evans](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@Alex\_Evans](https://forum.inductiveautomation.com/u/Alex_Evans)\
**Post date:** [February 6, 2024, 3:27pm UTC](https://forum.inductiveautomation.com/t/timer-reset-to-zero/85273/9 "2024-02-06T15:27:22Z")

</div>

Sorry @pturmel I am new to the scripting side of ignition, I have followed the steps but cant get it to work have I made an error somewhere?  
 ![Screenshot 2024-02-06 152505](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/d/ada8b1e56a30743b2e1d662f3f49f2c2d34d5fb3.png)  
 ![Screenshot 2024-02-06 152522](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/a/ca166966c50093188d1ef23e00b623c0690e1571.png)

 ![Screenshot 2024-02-06 152608](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/8/f8c06956a66030aa71da1a6211f48178fb40cdc0.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 6, 2024, 3:36pm UTC](https://forum.inductiveautomation.com/t/timer-reset-to-zero/85273/10 "2024-02-06T15:36:18Z")

</div>

Your custom property has a capital `R`. Match that in line #1 of the script. Pretty much everything in scripting is case sensitive.

---

<div class="post-metadata">

**Author:** ![Alex\_Evans](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@Alex\_Evans](https://forum.inductiveautomation.com/u/Alex_Evans)\
**Post date:** [February 6, 2024, 3:40pm UTC](https://forum.inductiveautomation.com/t/timer-reset-to-zero/85273/11 "2024-02-06T15:40:48Z")

</div>

Thank you very much for your help that has worked now!

---

<div class="post-metadata">

**Author:** ![Dwayne\_Schwartz](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@Dwayne\_Schwartz](https://forum.inductiveautomation.com/u/Dwayne_Schwartz)\
**Post date:** [June 17, 2025, 2:41pm UTC](https://forum.inductiveautomation.com/t/timer-reset-to-zero/85273/12 "2025-06-17T14:41:30Z")

</div>

Does anyone have a breakdown on how to get this to work? I have tried to do this and another one several times and it doesn't reset to 0.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [June 25, 2025, 1:13am UTC](https://forum.inductiveautomation.com/t/timer-reset-to-zero/85273/13 "2025-06-25T01:13:29Z")

</div>

> [@Dwayne\_Schwartz](#):
>
> how to get this to work

It's trivial. Just set running to False and value to 0.

```python
timer = # get the timer component relative to the reset component or property

# Can be ommited if the goal is to simply reset to zero without actually stopping the timer
timer.running = False

# Reset the timer value to zero
timer.value = 0

```

If this isn't working, show your code and setup. It's probably a typo or something simple.
