# Ignition (Perspective Timer)

**URL:** <https://forum.inductiveautomation.com/t/ignition-perspective-timer/64135>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 15, 2022, 7:27pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-timer/64135 "2022-09-15T19:27:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amir\_Farmanbar](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Amir\_Farmanbar](https://forum.inductiveautomation.com/u/Amir_Farmanbar)\
**Post date:** [September 15, 2022, 7:27pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-timer/64135/1 "2022-09-15T19:27:58Z")

</div>

Is there any timer component in ignition Perspective to assign it a PLC tag?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [September 15, 2022, 7:28pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-timer/64135/2 "2022-09-15T19:28:55Z")

</div>

What exactly are you trying to achieve and why are you not implementing the timer in the PLC?

---

<div class="post-metadata">

**Author:** ![Amir\_Farmanbar](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Amir\_Farmanbar](https://forum.inductiveautomation.com/u/Amir_Farmanbar)\
**Post date:** [September 15, 2022, 7:34pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-timer/64135/3 "2022-09-15T19:34:31Z")

</div>

I can do it in PLC side if there is no way in ignition side. I need a timer to change its value after specific time as PLC does. I am not sure Ignition has this ability or not. otherwise, I should add it to all PLCs units.

---

<div class="post-metadata">

**Author:** ![Amir\_Farmanbar](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Amir\_Farmanbar](https://forum.inductiveautomation.com/u/Amir_Farmanbar)\
**Post date:** [September 15, 2022, 7:37pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-timer/64135/4 "2022-09-15T19:37:46Z")

</div>

I need this time just for monitoring and report specific time of downtime event.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [September 15, 2022, 7:38pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-timer/64135/5 "2022-09-15T19:38:15Z")

</div>

I would not necessarily do this directly in perspective as then it will execute **per** client you have open. Seems more appropriate in a gateway timer script/tag change script (where the tags determine the right time) depending on your version of Ignition.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [September 15, 2022, 7:48pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-timer/64135/6 "2022-09-15T19:48:44Z")

</div>

Here’s a simple way but others a may point out some good reasons why it’s not a good idea.

- Tag1 is the tag being monitored.
- Tag1Delay will turn on 2000 ms after Tag1.
- Tag1Delay will turn off immediately Tag1 is false.

Setup:

- Create Tag1Delay as an expression tag.
- Set the expression to,  
`{[~]Tag1} && ((now() - {[~]Tag1.Timestamp}) > 2000)`

This is using the trick that OPC only (usually) updates the timestamp when the value changes so we can use that to calculate how long it has been in the current state.

Note that the timestamp most likely will update if the gateway is restarted and that would turn Tag1Delay off for 2000 ms. This may or may not be acceptable in your application.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 15, 2022, 8:56pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-timer/64135/7 "2022-09-15T20:56:19Z")

</div>

I would not use this approach, despite the simplicity, since the change in the Timestamp is not guaranteed.

Better(IMO) options include:

- Tag History
- Transaction Groups (requires SQL Bridge Module)
- Gateway Tag Change Script
