# Deprecated tag read and write functions

**URL:** <https://forum.inductiveautomation.com/t/deprecated-tag-read-and-write-functions/83054>\
**Category:** Ignition\
**Created:** [December 12, 2023, 9:13pm UTC](https://forum.inductiveautomation.com/t/deprecated-tag-read-and-write-functions/83054 "2023-12-12T21:13:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bushmatic](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bushmatic/32/87014_2.png) [@Bushmatic](https://forum.inductiveautomation.com/u/Bushmatic)\
**Post date:** [December 12, 2023, 9:13pm UTC](https://forum.inductiveautomation.com/t/deprecated-tag-read-and-write-functions/83054/1 "2023-12-12T21:13:32Z")

</div>

I learned system.tag.read and write have been replaced by system.tag.readBlocking and writeBlocking. I am wondering if there is a version of Ignition where, if we upgrade to said version, we need to worry about instances of the deprecated functions breaking entirely and needing to be rewritten? We are on version 8.1.18.

---

<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:** [December 12, 2023, 9:21pm UTC](https://forum.inductiveautomation.com/t/deprecated-tag-read-and-write-functions/83054/2 "2023-12-12T21:21:17Z")

</div>

IA tends to keep deprecated functions around for a really long time. They just don't get much love if bugs pop up, and they are deliberately removed from the documentation.

I'd not worry about old code. If you make sure new code or updated code uses the modern functions, the deprecated stuff will likely be gone before it matters.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 12, 2023, 9:22pm UTC](https://forum.inductiveautomation.com/t/deprecated-tag-read-and-write-functions/83054/3 "2023-12-12T21:22:55Z")

</div>

We'll also never remove functionality (outside of critical security issues) in a "minor" version - as in, any 8.1 upgrade is absolutely going to be fine. We have no plans to remove these specific functions in 8.3, either, meaning you're set for at least the next several years.

---

<div class="post-metadata">

**Author:** ![Bushmatic](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bushmatic/32/87014_2.png) [@Bushmatic](https://forum.inductiveautomation.com/u/Bushmatic)\
**Post date:** [December 12, 2023, 9:24pm UTC](https://forum.inductiveautomation.com/t/deprecated-tag-read-and-write-functions/83054/4 "2023-12-12T21:24:30Z")

</div>

Awesome, thank you for the quick answers.

---

<div class="post-metadata">

**Author:** ![Ryan\_Shaw](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@Ryan\_Shaw](https://forum.inductiveautomation.com/u/Ryan_Shaw)\
**Post date:** [February 13, 2025, 2:13pm UTC](https://forum.inductiveautomation.com/t/deprecated-tag-read-and-write-functions/83054/5 "2025-02-13T14:13:20Z")

</div>

I googled "how to read single tag after system.tag.read deprecation" and ended up here so I'll revive this year-old discussion. Since this function was deprecated my scripting for getting the value from a single tag has gone from

```python
tagVal = system.tag.read(tagPath).value

```

to

```python
tagVal = [v.value for v in system.tag.readBlocking([tagPath])][0]

```

Is that the accepted way moving forward, or is there something simpler I could use?

---

<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:** [February 13, 2025, 2:19pm UTC](https://forum.inductiveautomation.com/t/deprecated-tag-read-and-write-functions/83054/6 "2025-02-13T14:19:21Z")

</div>

I use  
`tagVal = system.tag.readBlocking([tagPath])[0].value`

---

<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:** [February 13, 2025, 2:20pm UTC](https://forum.inductiveautomation.com/t/deprecated-tag-read-and-write-functions/83054/7 "2025-02-13T14:20:40Z")

</div>

```python
system.tag.readBlocking([tagPath])][0].value

```

While you could technically use:

```python
system.tag.readBlocking(tagPath).value

```

if you learn to use the list forms, it will cover all your bases. 🙂

---

<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:** [February 13, 2025, 2:30pm UTC](https://forum.inductiveautomation.com/t/deprecated-tag-read-and-write-functions/83054/8 "2025-02-13T14:30:53Z")

</div>

> [@Ryan\_Shaw](#):
>
> `tagVal = [v.value for v in system.tag.readBlocking([tagPath])][0]`

Use the list comprehension like above when you want to read a handful of tags together, and stuff them into separate variables. Like so:

```python
tagA, tagB, tagC = [v.value for v in system.tag.readBlocking([pathA, pathB, pathC])][0]

```

---

<div class="post-metadata">

**Author:** ![Ryan\_Shaw](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@Ryan\_Shaw](https://forum.inductiveautomation.com/u/Ryan_Shaw)\
**Post date:** [February 13, 2025, 2:57pm UTC](https://forum.inductiveautomation.com/t/deprecated-tag-read-and-write-functions/83054/9 "2025-02-13T14:57:28Z")

</div>

Hi pturmel.

I agree, I used list comprehension in my proposal because it scales better into using a handful of tags, which is also common. So for consistency I use list comprehension even when it's just 1 tag.
