# Failing to create a start button for a pump using indirect tags

**URL:** <https://forum.inductiveautomation.com/t/failing-to-create-a-start-button-for-a-pump-using-indirect-tags/80030>\
**Category:** Ignition\
**Tags:** vision, ignition81\
**Created:** [October 4, 2023, 5:19pm UTC](https://forum.inductiveautomation.com/t/failing-to-create-a-start-button-for-a-pump-using-indirect-tags/80030 "2023-10-04T17:19:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luis\_Alejandro\_Nino](https://avatars.discourse-cdn.com/v4/letter/l/ecc23a/32.png) [@Luis\_Alejandro\_Nino](https://forum.inductiveautomation.com/u/Luis_Alejandro_Nino)\
**Post date:** [October 4, 2023, 5:19pm UTC](https://forum.inductiveautomation.com/t/failing-to-create-a-start-button-for-a-pump-using-indirect-tags/80030/1 "2023-10-04T17:19:09Z")

</div>

trying to create a standard one shot or similar start/stop button to be used in several pumps without having to rewrite as much as possible, currently my approach has been the introduction of indirect tags as part of the button's customization, however this has been to no avail. anyone out there with experience doing this or something similar\> urgent help needed please!!!

---

<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:** [October 4, 2023, 5:50pm UTC](https://forum.inductiveautomation.com/t/failing-to-create-a-start-button-for-a-pump-using-indirect-tags/80030/2 "2023-10-04T17:50:15Z")

</div>

A few housekeeping things first.

Vision or Perspective? Mark the topic as such.

What exactly are you having issues with? My suggestion is to get it working with direct tags first, then move on to indirection. If it doesn't work directly it probably isn't going to work indirectly.

If/when you have issues, show us what you have tried. Post code using preformatted text. Screenshots don't help much.

And, welcome to the forum!

---

<div class="post-metadata">

**Author:** ![Luis\_Alejandro\_Nino](https://avatars.discourse-cdn.com/v4/letter/l/ecc23a/32.png) [@Luis\_Alejandro\_Nino](https://forum.inductiveautomation.com/u/Luis_Alejandro_Nino)\
**Post date:** [October 4, 2023, 5:57pm UTC](https://forum.inductiveautomation.com/t/failing-to-create-a-start-button-for-a-pump-using-indirect-tags/80030/3 "2023-10-04T17:57:21Z")

</div>

currently throught vision, the issue at hand is that whenever I try: to use two Bool tags to provide the values, create the button and write the following scritp under action: # Define the path to the one-shot trigger tag  
one\_shot\_trigger\_path = "[default]Path/To/Your/OneShotTriggerTag"

# Check if the one-shot trigger tag is currently false

if not system.tag.read(one\_shot\_trigger\_path).value:  
# Set the one-shot trigger tag to true  
system.tag.write(one\_shot\_trigger\_path, True)

I can save and run, however i get an error message and the button text goes from "start: to "writing"

and thanks for the welcome I sincerely appreciate 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:** [October 4, 2023, 6:02pm UTC](https://forum.inductiveautomation.com/t/failing-to-create-a-start-button-for-a-pump-using-indirect-tags/80030/4 "2023-10-04T18:02:01Z")

</div>

Welcome to the forum. Please take a few extra seconds when composing your posts to capitalise and punctuate properly. It makes reading much easier and can eliminate much ambiguity. (Your compiler wouldn't let you away with incorrect syntax so why should we!)

You can edit your question title to fix the "pumo" typo and add the Vision tag as requested.

> [@Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831):
>
> This thread is intended as a short help file for all those struggling to post formatted code on the forum. Posting formatted code on the forum (and most others) is as simple as selecting the code and pressing the \</\> button. It works the same as applying Bold or Italic styles to your document. It preserves indentation and applies syntax highlighting. [How to post code]

---

<div class="post-metadata">

**Author:** ![Felipe\_CRM](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@Felipe\_CRM](https://forum.inductiveautomation.com/u/Felipe_CRM)\
**Post date:** [October 4, 2023, 6:03pm UTC](https://forum.inductiveautomation.com/t/failing-to-create-a-start-button-for-a-pump-using-indirect-tags/80030/5 "2023-10-04T18:03:28Z")

</div>

Hi Luis,

I've gone ahead and added the Vision tag to your post to make it easier for the right people to find your post. I also corrected the typo while I was at it but feel free to edit as needed.

---

<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:** [October 4, 2023, 6:04pm UTC](https://forum.inductiveautomation.com/t/failing-to-create-a-start-button-for-a-pump-using-indirect-tags/80030/6 "2023-10-04T18:04:50Z")

</div>

Welcome, and as with the others, here are a few pointers:

When posting code, use the formatting tool:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/b/3b70bc776eb3db020580061ddfffa5194ed88302.png)  
or surround your code with triple backticks, you can even specify what language to use:  
```python  
code  
```

> [@Luis\_Alejandro\_Nino](#):
>
> i get an error message

This doesn't help much if we don't know what the error is. Post it with the code that produces it.

edit: The whole forum uses markdown for formatting. If you're not familiar with it, it's quite simple:

> **[Markdown Guide](https://www.markdownguide.org/)**
>
> A free and open-source reference guide that explains how to use Markdown.

And as you can see, you can edit your own posts to correct things... like code formatting.

---

<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:** [October 4, 2023, 6:13pm UTC](https://forum.inductiveautomation.com/t/failing-to-create-a-start-button-for-a-pump-using-indirect-tags/80030/7 "2023-10-04T18:13:18Z")

</div>

Read the docs, [Vision - One-Shot Button - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Vision+-+One-Shot+Button)

Use bindings vs script.

Take note of the comment in the doc:  
" **you must make sure that the PLC resets this value, otherwise the button will remain in a writing state.**"

---

<div class="post-metadata">

**Author:** ![Luis\_Alejandro\_Nino](https://avatars.discourse-cdn.com/v4/letter/l/ecc23a/32.png) [@Luis\_Alejandro\_Nino](https://forum.inductiveautomation.com/u/Luis_Alejandro_Nino)\
**Post date:** [October 4, 2023, 7:58pm UTC](https://forum.inductiveautomation.com/t/failing-to-create-a-start-button-for-a-pump-using-indirect-tags/80030/8 "2023-10-04T19:58:20Z")

</div>

thank you appreciate the help

---

<div class="post-metadata">

**Author:** ![Luis\_Alejandro\_Nino](https://avatars.discourse-cdn.com/v4/letter/l/ecc23a/32.png) [@Luis\_Alejandro\_Nino](https://forum.inductiveautomation.com/u/Luis_Alejandro_Nino)\
**Post date:** [October 4, 2023, 7:59pm UTC](https://forum.inductiveautomation.com/t/failing-to-create-a-start-button-for-a-pump-using-indirect-tags/80030/9 "2023-10-04T19:59:18Z")

</div>

do i just add the reset to the script of the tag?

---

<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:** [October 4, 2023, 8:11pm UTC](https://forum.inductiveautomation.com/t/failing-to-create-a-start-button-for-a-pump-using-indirect-tags/80030/10 "2023-10-04T20:11:26Z")

</div>

Did you read the doc?

_To use the One-Shot button, bind an OPC tag bidirectionally to the button's Value property. When clicked, the button will write the value in its Set Value property to the Value property. Typically, Set Value is 1, and Value is 0 in a ready state, although the logic could be reversed or change simply by altering Set Value. The button can disable itself when it is writing, and will display different text. The button considers itself to be writing whenever Value equals Set Value - you must make sure that the PLC resets this value, otherwise the button will remain in a writing state._
