# Reading Tags Not Working

**URL:** <https://forum.inductiveautomation.com/t/reading-tags-not-working/45020>\
**Category:** Ignition\
**Created:** [March 29, 2021, 5:36pm UTC](https://forum.inductiveautomation.com/t/reading-tags-not-working/45020 "2021-03-29T17:36:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kghali](https://avatars.discourse-cdn.com/v4/letter/k/da6949/32.png) [@kghali](https://forum.inductiveautomation.com/u/kghali)\
**Post date:** [March 29, 2021, 5:36pm UTC](https://forum.inductiveautomation.com/t/reading-tags-not-working/45020/1 "2021-03-29T17:36:36Z")

</div>

I have 3 tags: Tag1, Tag2, and Tag3  
if Tag1 == 1:  
Tag2 = Tag3   
x = system.tag.readBlocking(“Path to Tag1”)  
if x==1:  
system.tag.writeBlocking(“Tag2.value path”, currentValue)  
else:  
system.tag.writeBlocking(“Tag2.value path”, x)

Why isn’t this working?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 29, 2021, 5:37pm UTC](https://forum.inductiveautomation.com/t/reading-tags-not-working/45020/2 "2021-03-29T17:37:45Z")

</div>

`readBlocking` and `writeBlocking` expect lists.

It would be something like this:

```auto
system.tag.readBlocking(["Path to Tag1"])

```

---

<div class="post-metadata">

**Author:** ![kghali](https://avatars.discourse-cdn.com/v4/letter/k/da6949/32.png) [@kghali](https://forum.inductiveautomation.com/u/kghali)\
**Post date:** [March 29, 2021, 5:42pm UTC](https://forum.inductiveautomation.com/t/reading-tags-not-working/45020/3 "2021-03-29T17:42:44Z")

</div>

Yeah I tried that too and it didn’t work

---

<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:** [March 29, 2021, 6:05pm UTC](https://forum.inductiveautomation.com/t/reading-tags-not-working/45020/4 "2021-03-29T18:05:19Z")

</div>

readBlocking also returns a list of qualified values so to get the value you would need something like this:

```auto
x = system.tag.readBlocking(['Path To Tag1'])[0].value

```

---

<div class="post-metadata">

**Author:** ![WillMT10](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@WillMT10](https://forum.inductiveautomation.com/u/WillMT10)\
**Post date:** [March 29, 2021, 6:05pm UTC](https://forum.inductiveautomation.com/t/reading-tags-not-working/45020/5 "2021-03-29T18:05:26Z")

</div>

Edit: Looks like @lrose beat me to it on the qualified value error.

Couple other errors in there.

> [@kghali](#):
>
> x = system.tag.readBlocking(“Path to Tag1”)

`readBlocking` returns a list of qualified values. So you have to pull out the value from the return list and access the value:

```auto
x = system.tag.readBlocking(["Path to Tag1"])[0].value

```

Also, when using `writeBlocking` you need to give it a list of values instead of a single value:

```auto
if x==1:
system.tag.writeBlocking([“Tag2 value path”], [currentValue])
else:
system.tag.writeBlocking([“Tag2 value path”], [x])

```

---

<div class="post-metadata">

**Author:** ![kghali](https://avatars.discourse-cdn.com/v4/letter/k/da6949/32.png) [@kghali](https://forum.inductiveautomation.com/u/kghali)\
**Post date:** [March 29, 2021, 6:19pm UTC](https://forum.inductiveautomation.com/t/reading-tags-not-working/45020/6 "2021-03-29T18:19:24Z")

</div>

Thank you all. It worked!
