# Is there no momentary button in Perspective?

**URL:** <https://forum.inductiveautomation.com/t/is-there-no-momentary-button-in-perspective/87665>\
**Category:** Ignition\
**Tags:** vision, perspective\
**Created:** [March 20, 2024, 9:03pm UTC](https://forum.inductiveautomation.com/t/is-there-no-momentary-button-in-perspective/87665 "2024-03-20T21:03:50Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![prashants](https://avatars.discourse-cdn.com/v4/letter/p/a87d85/32.png) [@prashants](https://forum.inductiveautomation.com/u/prashants)\
**Post date:** [March 20, 2024, 9:03pm UTC](https://forum.inductiveautomation.com/t/is-there-no-momentary-button-in-perspective/87665/1 "2024-03-20T21:03:50Z")

</div>

Why are so many components removed from vision in perspective?

---

<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:** [March 20, 2024, 9:07pm UTC](https://forum.inductiveautomation.com/t/is-there-no-momentary-button-in-perspective/87665/2 "2024-03-20T21:07:43Z")

</div>

Because it is based on different technology.  
Vision runs on the client PC.  
Perspective runs on the gateway and the client is a web browser. There are all sorts of technical issues that have to be addressed for this reason, including security and reliability.

The momentary button question has been discussed many times on the forum and good reasons given why you shouldn't attempt it with Perspective. Here's one: [How to create the momentary Button in Perspective - #7 by pturmel](https://forum.inductiveautomation.com/t/how-to-create-the-momentary-button-in-perspective/63815/7).

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [March 20, 2024, 9:41pm UTC](https://forum.inductiveautomation.com/t/is-there-no-momentary-button-in-perspective/87665/3 "2024-03-20T21:41:37Z")

</div>

Maybe a better question to ask, why do you feel you need to use a momentary button?

[https://xyproblem.info/](https://xyproblem.info/)

---

<div class="post-metadata">

**Author:** ![prashants](https://avatars.discourse-cdn.com/v4/letter/p/a87d85/32.png) [@prashants](https://forum.inductiveautomation.com/u/prashants)\
**Post date:** [March 21, 2024, 9:56pm UTC](https://forum.inductiveautomation.com/t/is-there-no-momentary-button-in-perspective/87665/4 "2024-03-21T21:56:22Z")

</div>

Thanks, I just used one shot button and programmed in the plc to change.

---

<div class="post-metadata">

**Author:** ![eddie\_johnson](https://avatars.discourse-cdn.com/v4/letter/e/57b2e6/32.png) [@eddie\_johnson](https://forum.inductiveautomation.com/u/eddie_johnson)\
**Post date:** [March 22, 2024, 11:15am UTC](https://forum.inductiveautomation.com/t/is-there-no-momentary-button-in-perspective/87665/5 "2024-03-22T11:15:43Z")

</div>

Adding visualization to an environment with 50ish PLC and each PLC has reset bits already programmed to use momentary inputs. I don't have access to change the customers PLC code. That was my motivation.

```auto
def runAction(self, event):
		from threading import Timer
		
		def writeOn():
		    system.tag.write("TagPath", 1)
		def delayOff():
		    system.tag.write("TagPath", 0)
		
		writeOn()
		t = Timer(1.5, delayOff)
		t.start()

```

---

<div class="post-metadata">

**Author:** ![Hayden\_Watson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hayden_watson/32/48792_2.png) [@Hayden\_Watson](https://forum.inductiveautomation.com/u/Hayden_Watson)\
**Post date:** [March 22, 2024, 12:40pm UTC](https://forum.inductiveautomation.com/t/is-there-no-momentary-button-in-perspective/87665/6 "2024-03-22T12:40:23Z")

</div>

Probably want to use `system.tag.writeBlocking` instead of `system.tag.write` as that is deprecitated 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:** [March 22, 2024, 12:45pm UTC](https://forum.inductiveautomation.com/t/is-there-no-momentary-button-in-perspective/87665/7 "2024-03-22T12:45:38Z")

</div>

> [@eddie\_johnson](#):
>
> I don't have access to change the customers PLC code.

Then make _them_ change it. The customer is not always correct. If a customer insists on making you use questionable/racy methods, you should document that, so there's written evidence that you warned them.

---

<div class="post-metadata">

**Author:** ![eddie\_johnson](https://avatars.discourse-cdn.com/v4/letter/e/57b2e6/32.png) [@eddie\_johnson](https://forum.inductiveautomation.com/u/eddie_johnson)\
**Post date:** [March 22, 2024, 12:51pm UTC](https://forum.inductiveautomation.com/t/is-there-no-momentary-button-in-perspective/87665/8 "2024-03-22T12:51:10Z")

</div>

If it were part of the control I'd be more concerned. I have voiced the issue but so far it's being used to reset counters, with the counter displayed just above the reset button on the Perspective screen.

---

<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:** [March 22, 2024, 1:02pm UTC](https://forum.inductiveautomation.com/t/is-there-no-momentary-button-in-perspective/87665/9 "2024-03-22T13:02:45Z")

</div>

The simplest, non-racy way to reset a counter is to write a zero to it. 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![prashants](https://avatars.discourse-cdn.com/v4/letter/p/a87d85/32.png) [@prashants](https://forum.inductiveautomation.com/u/prashants)\
**Post date:** [March 22, 2024, 1:27pm UTC](https://forum.inductiveautomation.com/t/is-there-no-momentary-button-in-perspective/87665/10 "2024-03-22T13:27:56Z")

</div>

I just needed to reset an xio alarm reset tag that is in the plc logic that is being used to reset alarm. We use momentary button in vision for that. Just wanted to have something like that in perspective also.  
There are many ways to do this (nothing easier than momentary button) but what I did was to write 1 from perspective using a button and in the plc program when that bit is 1 it does reset the logic and writes 0 to the same tag.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [August 8, 2024, 4:34pm UTC](https://forum.inductiveautomation.com/t/is-there-no-momentary-button-in-perspective/87665/12 "2024-08-08T16:34:37Z")

</div>

It's trying to write to a tag literally called "self.custom.tagpath". Try without the quotes around it.

---

<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:** [August 8, 2024, 4:37pm UTC](https://forum.inductiveautomation.com/t/is-there-no-momentary-button-in-perspective/87665/13 "2024-08-08T16:37:55Z")

</div>

Shiva, if you are using a timer in a script then you are doing it wrong. The topic has been covered many times on the forum.

Instead of describing your solution, open a new thread and describe the actual original problem you are trying to solve - not the solution you think will work.
