# Ignition – Creating a Downtime Tag Using Machine Running Status

**URL:** <https://forum.inductiveautomation.com/t/ignition-creating-a-downtime-tag-using-machine-running-status/117742>\
**Category:** Ignition\
**Created:** [November 4, 2026, 6:43pm UTC](https://forum.inductiveautomation.com/t/ignition-creating-a-downtime-tag-using-machine-running-status/117742 "2026-11-04T18:43:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![patricia.danganan](https://avatars.discourse-cdn.com/v4/letter/p/5daacb/32.png) [@patricia.danganan](https://forum.inductiveautomation.com/u/patricia.danganan)\
**Post date:** [November 4, 2026, 6:43pm UTC](https://forum.inductiveautomation.com/t/ignition-creating-a-downtime-tag-using-machine-running-status/117742/1 "2026-11-04T18:43:30Z")

</div>

How can I create a downtime tag in Ignition using an existing Running tag, where 0 indicates the machine is stopped and 1 indicates it is running?

I tried creating a memory tag to track downtime, but I'm running into an issue where the timestamp stays at its original value instead of updating when the machine starts running again. As a result, the downtime continues accumulating rather than resetting each time the machine resumes running.

I'm looking for a way to have the downtime timer start when the Running tag changes to 0 and automatically reset when it changes back to 1, so it accurately tracks how long the machine has been stopped during each downtime occurrence. And also having the time be saved so I can create a report

---

<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:** [November 4, 2026, 6:58pm UTC](https://forum.inductiveautomation.com/t/ignition-creating-a-downtime-tag-using-machine-running-status/117742/2 "2026-11-04T18:58:01Z")

</div>

Typically, you'd make an expression tag named `Down` with the expression `[.]Running = 0` and turn on history.

For reports, use the "DurationOn" aggregate mode on the `Down` tag in a history query.

---

<div class="post-metadata">

**Author:** ![Nol](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@Nol](https://forum.inductiveautomation.com/u/Nol)\
**Post date:** [November 4, 2026, 7:09pm UTC](https://forum.inductiveautomation.com/t/ignition-creating-a-downtime-tag-using-machine-running-status/117742/3 "2026-11-04T19:09:42Z")

</div>

I'd do it with two tags. [.]StoppedAt and [.]Downtime. Add a change script on [.]Running when it transitions to stopped it writes the time into StoppedAt. Then Downtime is a simple expression, if running then 0 otherwise the time between StoppedAt and Now.

---

<div class="post-metadata">

**Author:** ![collin.ernst](https://avatars.discourse-cdn.com/v4/letter/c/45deac/32.png) [@collin.ernst](https://forum.inductiveautomation.com/u/collin.ernst)\
**Post date:** [November 4, 2026, 9:00pm UTC](https://forum.inductiveautomation.com/t/ignition-creating-a-downtime-tag-using-machine-running-status/117742/4 "2026-11-04T21:00:37Z")

</div>

A nice feature that isn't widely discussed is the Timestamp field native to all tags. I have a tag for tracking the current state and then I use this expression to get the # of seconds the machine has been in that current state.

```python
secondsBetween({[.]State.timestamp}, now())

```

---

<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:** [November 4, 2026, 9:13pm UTC](https://forum.inductiveautomation.com/t/ignition-creating-a-downtime-tag-using-machine-running-status/117742/5 "2026-11-04T21:13:25Z")

</div>

> [@collin.ernst](#):
>
> Timestamp field native to all tags

Be aware if the PLC connection blinks, or the gateway restarts, or even just the tag itself restarts, the timestamp will change.

If you really want to be correct, use history. Or some kind of DB table.
