# Perspective - Absolute Newb Question - Making one button simultaneously stop 4 different conveyor systems

**URL:** <https://forum.inductiveautomation.com/t/perspective-absolute-newb-question-making-one-button-simultaneously-stop-4-different-conveyor-systems/55215>\
**Category:** Ignition\
**Created:** [January 20, 2022, 4:52pm UTC](https://forum.inductiveautomation.com/t/perspective-absolute-newb-question-making-one-button-simultaneously-stop-4-different-conveyor-systems/55215 "2022-01-20T16:52:56Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexavier\_Garcia](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Alexavier\_Garcia](https://forum.inductiveautomation.com/u/Alexavier_Garcia)\
**Post date:** [January 20, 2022, 4:52pm UTC](https://forum.inductiveautomation.com/t/perspective-absolute-newb-question-making-one-button-simultaneously-stop-4-different-conveyor-systems/55215/1 "2022-01-20T16:52:56Z")

</div>

I’m trying to do it by toggling 4 different bits with “onMouseDown” & “onMouseUp” event scripts.

**These are the Tag Paths** (Copied & Pasted from each individual tag)

- [default]CCP61/CCP61\_stop
- [default]CCP62/CCP62\_stop
- [default]CCP63/CCP63\_stop
- [default]CCP71/CCP71\_stop

I have tried this: ⬇, Adding a separate script for each tag but I keep getting the red squiggly underline and a "no viable alternative at input ‘CCP61’ " message when I hover the cursor over the text.

 ![Screenshot 2022-01-20 113946](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/1/919c81e9082093b36887607f036774b68fc457b8.jpeg)

---

<div class="post-metadata">

**Author:** ![leonardo.godoi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/leonardo.godoi/32/27178_2.png) [@leonardo.godoi](https://forum.inductiveautomation.com/u/leonardo.godoi)\
**Post date:** [January 20, 2022, 5:01pm UTC](https://forum.inductiveautomation.com/t/perspective-absolute-newb-question-making-one-button-simultaneously-stop-4-different-conveyor-systems/55215/2 "2022-01-20T17:01:19Z")

</div>

Your tag adress is a string, so you need to write that line like this:

```auto
system.tag.write('[default]CCP71/CCP71_stop',1)

```

You can also write all of them at the same time using **system.tag.writeAsync()**

```auto
tagList = ['[default]CCP71/CCP71_stop',
			'[default]CCP63/CCP63_stop',
			'[default]CCP63/CCP63_stop',
			'[default]CCP61/CCP61_stop']
valuesList = [True,True,True,True]
system.tag.writeAsync(tagList,valuesList)

```

So you can just provide a list of tag paths and values and do it all at once, efficiently.  
You can take a better look at how it works here:  
[https://docs.inductiveautomation.com/display/DOC81/system.tag.writeAsync](https://docs.inductiveautomation.com/display/DOC81/system.tag.writeAsync)

---

<div class="post-metadata">

**Author:** ![leonardo.godoi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/leonardo.godoi/32/27178_2.png) [@leonardo.godoi](https://forum.inductiveautomation.com/u/leonardo.godoi)\
**Post date:** [January 20, 2022, 5:04pm UTC](https://forum.inductiveautomation.com/t/perspective-absolute-newb-question-making-one-button-simultaneously-stop-4-different-conveyor-systems/55215/3 "2022-01-20T17:04:43Z")

</div>

I’ve eddited on my response, but since you’re toggling bits, you can’t write `"1"` to them, since you’re indicating that that 1 is actually a string, the correct way would be to just use **1** or **True**

---

<div class="post-metadata">

**Author:** ![Alexavier\_Garcia](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Alexavier\_Garcia](https://forum.inductiveautomation.com/u/Alexavier_Garcia)\
**Post date:** [January 21, 2022, 6:33am UTC](https://forum.inductiveautomation.com/t/perspective-absolute-newb-question-making-one-button-simultaneously-stop-4-different-conveyor-systems/55215/4 "2022-01-21T06:33:24Z")

</div>

So for now I used a separate script for each tag using **system.tag.write()**. I couldn’t get **system.tag.writeAsync()** to work. Thank You

---

<div class="post-metadata">

**Author:** ![jonathan.taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jonathan.taylor/32/4048_2.png) [@jonathan.taylor](https://forum.inductiveautomation.com/u/jonathan.taylor)\
**Post date:** [January 21, 2022, 9:18am UTC](https://forum.inductiveautomation.com/t/perspective-absolute-newb-question-making-one-button-simultaneously-stop-4-different-conveyor-systems/55215/5 "2022-01-21T09:18:16Z")

</div>

Just so you know, `system.tag.write` is now deprecated. `system.tag.writeBlocking` or `system.tag.writeAsync` should be used.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [January 21, 2022, 10:16am UTC](https://forum.inductiveautomation.com/t/perspective-absolute-newb-question-making-one-button-simultaneously-stop-4-different-conveyor-systems/55215/6 "2022-01-21T10:16:59Z")

</div>

> [@leonardo.godoi](#):
>
> ```auto
> valuesList = [True,True,True,True]
> system.tag.writeAsync(tagList,valuesList)
> 
> ```

Ps you can simplify this to:

```auto
system.tag.writeAsync(tagList, [True]*len(tagList))

```

> [@jonathan.taylor](#):
>
> Just so you know, `system.tag.write` is now deprecated. `system.tag.writeBlocking` or `system.tag.writeAsync` should be used.

Just fyi this only applies to v8+ and not to v7 ~~which is propably why these new functions aren't working for the OP~~

---

<div class="post-metadata">

**Author:** ![jonathan.taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jonathan.taylor/32/4048_2.png) [@jonathan.taylor](https://forum.inductiveautomation.com/u/jonathan.taylor)\
**Post date:** [January 21, 2022, 10:21am UTC](https://forum.inductiveautomation.com/t/perspective-absolute-newb-question-making-one-button-simultaneously-stop-4-different-conveyor-systems/55215/7 "2022-01-21T10:21:02Z")

</div>

Of course and useful for others to distinguish between, but screenshot is from V8

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [January 21, 2022, 10:23am UTC](https://forum.inductiveautomation.com/t/perspective-absolute-newb-question-making-one-button-simultaneously-stop-4-different-conveyor-systems/55215/8 "2022-01-21T10:23:05Z")

</div>

Haha, that’s embarrassing, I didn’t even look at the screenshot 🙄

---

<div class="post-metadata">

**Author:** ![Alexavier\_Garcia](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Alexavier\_Garcia](https://forum.inductiveautomation.com/u/Alexavier_Garcia)\
**Post date:** [January 21, 2022, 11:02pm UTC](https://forum.inductiveautomation.com/t/perspective-absolute-newb-question-making-one-button-simultaneously-stop-4-different-conveyor-systems/55215/9 "2022-01-21T23:02:31Z")

</div>

Thank You guys!!

---

<div class="post-metadata">

**Author:** ![Dustin\_VanKeuren](https://avatars.discourse-cdn.com/v4/letter/d/b782af/32.png) [@Dustin\_VanKeuren](https://forum.inductiveautomation.com/u/Dustin_VanKeuren)\
**Post date:** [July 18, 2024, 3:56pm UTC](https://forum.inductiveautomation.com/t/perspective-absolute-newb-question-making-one-button-simultaneously-stop-4-different-conveyor-systems/55215/10 "2024-07-18T15:56:13Z")

</div>

I know this is an old thread, but I just ran across it. Honestly this should be done in the PLC and not the HMI.
