# Tag value source does not support writing

**URL:** <https://forum.inductiveautomation.com/t/tag-value-source-does-not-support-writing/31928>\
**Category:** Ignition\
**Created:** [February 4, 2020, 10:21pm UTC](https://forum.inductiveautomation.com/t/tag-value-source-does-not-support-writing/31928 "2020-02-04T22:21:03Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim/32/3361_2.png) [@Tim](https://forum.inductiveautomation.com/u/Tim)\
**Post date:** [February 4, 2020, 10:21pm UTC](https://forum.inductiveautomation.com/t/tag-value-source-does-not-support-writing/31928/1 "2020-02-04T22:21:03Z")

</div>

I’ve migrated a 7.9.13 gateway into 8.0.7. It was originally migrated with everything disabled, but everything has been enabled AFAIK. I see an error in the logs “Bad\_ReadOnly(“Tag value source does not support writing.”)” when I try to write a value to an expression tag via scripting. This was a global shared script in v7 and now it’s a project script under the global project FWIW. The Ignition OPCUA server is enabled and not set to read-only, the realtime tag provider is enabled, the tag itself is not set to read-only. Any ideas?

---

<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:** [February 4, 2020, 10:24pm UTC](https://forum.inductiveautomation.com/t/tag-value-source-does-not-support-writing/31928/2 "2020-02-04T22:24:53Z")

</div>

Writing to expression tags has never been supported - I’m pretty confident it also didn’t work in 7.9.

---

<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 4, 2020, 10:25pm UTC](https://forum.inductiveautomation.com/t/tag-value-source-does-not-support-writing/31928/3 "2020-02-04T22:25:02Z")

</div>

Expression tags aren’t supposed to be written. Anything you’d write to them would be replaced by the expression result on the next evaluation. Looks like a loophole closed.

---

<div class="post-metadata">

**Author:** ![Tim](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim/32/3361_2.png) [@Tim](https://forum.inductiveautomation.com/u/Tim)\
**Post date:** [February 4, 2020, 10:32pm UTC](https://forum.inductiveautomation.com/t/tag-value-source-does-not-support-writing/31928/5 "2020-02-04T22:32:03Z")

</div>

It worked fine in v7

---

<div class="post-metadata">

**Author:** ![Tim](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim/32/3361_2.png) [@Tim](https://forum.inductiveautomation.com/u/Tim)\
**Post date:** [February 4, 2020, 10:35pm UTC](https://forum.inductiveautomation.com/t/tag-value-source-does-not-support-writing/31928/6 "2020-02-04T22:35:09Z")

</div>

In this particular case it was just set to count itself up along with the scanclass and I reset via script.

`toInteger({[.]Tag},0) + 1`

\*UPDATE - Pro tip - avoid using this expression in combination with the new “Event Driven” expression tag default execution mode to avoid pegging your Ignition server CPU at 100%.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [February 4, 2020, 10:55pm UTC](https://forum.inductiveautomation.com/t/tag-value-source-does-not-support-writing/31928/7 "2020-02-04T22:55:14Z")

</div>

That use makes sense. I’m guessing this isn’t a case where you’d want it to reset at a certain value every time (adding modulus operator would accomplish that). For a callable reset that makes it behave a lot like it used to:

1. Add a `Reset` property to the tag.
2. Add a value change event script:

```python
if not currentValue.value:
	system.tag.writeAll(["[.]Tag.Reset"], [False])

```

1. Modify expression:

```java
if({[.]Tag.Reset},
	0,
	toInteger({[.]Tag},0) + 1
)

```

1. Reset via script:

```python
system.tag.writeAll(['[provider]_test/Tag.Reset'], [True])

```

---

<div class="post-metadata">

**Author:** ![Tim](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim/32/3361_2.png) [@Tim](https://forum.inductiveautomation.com/u/Tim)\
**Post date:** [February 5, 2020, 1:52pm UTC](https://forum.inductiveautomation.com/t/tag-value-source-does-not-support-writing/31928/8 "2020-02-05T13:52:28Z")

</div>

I also found that the error shows in the log from source “LegacyScripting[system\_util\_tag]” when using system.tag.write. When using current scripting functions system.tag.writeAsync or system.tag.writeBlocking it fails silently.

---

<div class="post-metadata">

**Author:** ![Tim](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim/32/3361_2.png) [@Tim](https://forum.inductiveautomation.com/u/Tim)\
**Post date:** [February 5, 2020, 1:54pm UTC](https://forum.inductiveautomation.com/t/tag-value-source-does-not-support-writing/31928/9 "2020-02-05T13:54:33Z")

</div>

Thanks. I will have to reevaluate how I do this. It’s something I replicate hundreds of times and even create these tags dynamically via scripting in some cases.

---

<div class="post-metadata">

**Author:** ![Tim](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim/32/3361_2.png) [@Tim](https://forum.inductiveautomation.com/u/Tim)\
**Post date:** [February 5, 2020, 2:12pm UTC](https://forum.inductiveautomation.com/t/tag-value-source-does-not-support-writing/31928/10 "2020-02-05T14:12:11Z")

</div>

I found one work around for this particular case with the least amount of reworking is to disable/enable the tag by writing to “[.]Tag.Enabled”

This also uncovered a small bug in 8.0.7 with the disabled tag icon in the tag browser. This icon does not disappear when a tag is re-enabled (either manually or via the script) until the tag browser is refreshed.

---

<div class="post-metadata">

**Author:** ![Sourabh\_Ambildhuke](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@Sourabh\_Ambildhuke](https://forum.inductiveautomation.com/u/Sourabh_Ambildhuke)\
**Post date:** [February 23, 2022, 4:55am UTC](https://forum.inductiveautomation.com/t/tag-value-source-does-not-support-writing/31928/11 "2022-02-23T04:55:10Z")

</div>

Hi @Tim , I am facing same issue in ignition.  
Can you elaborate how you did the enable/disable function to work to write to expression tag. I am using 8.1.12 version.

Thanks

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [February 23, 2022, 5:15am UTC](https://forum.inductiveautomation.com/t/tag-value-source-does-not-support-writing/31928/12 "2022-02-23T05:15:14Z")

</div>

Just don’t, is a bad configuration. Don’t do it.

---

<div class="post-metadata">

**Author:** ![Hitesh\_Rathod1](https://avatars.discourse-cdn.com/v4/letter/h/ea666f/32.png) [@Hitesh\_Rathod1](https://forum.inductiveautomation.com/u/Hitesh_Rathod1)\
**Post date:** [October 9, 2024, 1:47pm UTC](https://forum.inductiveautomation.com/t/tag-value-source-does-not-support-writing/31928/13 "2024-10-09T13:47:40Z")

</div>

I am facing the exact same issue after upgrading Ignition from 7.9 to 8.1. What to do to work to write to expression tag. I am using Ignition 8.1.43

---

<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:** [October 9, 2024, 2:03pm UTC](https://forum.inductiveautomation.com/t/tag-value-source-does-not-support-writing/31928/14 "2024-10-09T14:03:06Z")

</div>

> [@Hitesh\_Rathod1](#):
>
> What to do to work to write to expression tag

You cannot. That you could in v7.9 was a bug.

Convert to memory tag. Move your expression to jython and write from a suitable event.

---

<div class="post-metadata">

**Author:** ![Hitesh\_Rathod1](https://avatars.discourse-cdn.com/v4/letter/h/ea666f/32.png) [@Hitesh\_Rathod1](https://forum.inductiveautomation.com/u/Hitesh_Rathod1)\
**Post date:** [October 9, 2024, 2:16pm UTC](https://forum.inductiveautomation.com/t/tag-value-source-does-not-support-writing/31928/15 "2024-10-09T14:16:59Z")

</div>

Thanks @pturmel

---

<div class="post-metadata">

**Author:** ![Tim](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim/32/3361_2.png) [@Tim](https://forum.inductiveautomation.com/u/Tim)\
**Post date:** [April 16, 2025, 6:25pm UTC](https://forum.inductiveautomation.com/t/tag-value-source-does-not-support-writing/31928/17 "2025-04-16T18:25:22Z")

</div>

Timers which run on the gateway can be useful. You can still do it, you just have to reset it this way now.

```python
system.tag.writeBlocking("TimerTag.Enabled",0)
system.tag.writeAsync("TimerTag.Enabled",1)

```
