# Is it possible to use system.tag.writeBlocking on a OPC tag?

**URL:** <https://forum.inductiveautomation.com/t/is-it-possible-to-use-system-tag-writeblocking-on-a-opc-tag/36908>\
**Category:** Ignition\
**Created:** [July 21, 2020, 4:57pm UTC](https://forum.inductiveautomation.com/t/is-it-possible-to-use-system-tag-writeblocking-on-a-opc-tag/36908 "2020-07-21T16:57:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyle.demerath](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@kyle.demerath](https://forum.inductiveautomation.com/u/kyle.demerath)\
**Post date:** [July 21, 2020, 4:57pm UTC](https://forum.inductiveautomation.com/t/is-it-possible-to-use-system-tag-writeblocking-on-a-opc-tag/36908/1 "2020-07-21T16:57:56Z")

</div>

Is it possible to use system.tag.writeBlocking on an OPC tag? I understand the tag could be written over, but if it is a leased tag that isn’t active and I want to get the value I can use system.opc.readValue to get it. Once I have the value it could be handy to update the OPC tag since it may not update anytime soon depending on the tag group settings. Maybe this isn’t considered a best practice and therefore isn’t allowed. It didn’t seem to work for me. I am using 8.0.14 of Perspective, but I assume this applies across all of Ignition.

---

<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:** [July 21, 2020, 4:59pm UTC](https://forum.inductiveautomation.com/t/is-it-possible-to-use-system-tag-writeblocking-on-a-opc-tag/36908/2 "2020-07-21T16:59:18Z")

</div>

> [@kyle.demerath](#):
>
> It didn’t seem to work for me.

Why not? What happened? Was there an error message?

---

<div class="post-metadata">

**Author:** ![kyle.demerath](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@kyle.demerath](https://forum.inductiveautomation.com/u/kyle.demerath)\
**Post date:** [July 21, 2020, 5:09pm UTC](https://forum.inductiveautomation.com/t/is-it-possible-to-use-system-tag-writeblocking-on-a-opc-tag/36908/3 "2020-07-21T17:09:42Z")

</div>

I get [Good] back in the script console, but the value property does not update. The timestamp doesn’t either. Furthermore, if the tag is ‘Uncertain\_InitValue’ it remains as such. As a test I took the tag off of leased and just on a slower direct tag and it still only updates on the tag group time. writeBlocking does not update it.

If I do the same thing to a memory tag both update right away.

---

<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:** [July 21, 2020, 5:25pm UTC](https://forum.inductiveautomation.com/t/is-it-possible-to-use-system-tag-writeblocking-on-a-opc-tag/36908/4 "2020-07-21T17:25:18Z")

</div>

Maybe the underlying value in the device is being overwritten then?

Can you do a write to this tag from the quick client or tag browser?

---

<div class="post-metadata">

**Author:** ![kyle.demerath](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@kyle.demerath](https://forum.inductiveautomation.com/u/kyle.demerath)\
**Post date:** [July 21, 2020, 5:49pm UTC](https://forum.inductiveautomation.com/t/is-it-possible-to-use-system-tag-writeblocking-on-a-opc-tag/36908/5 "2020-07-21T17:49:26Z")

</div>

Well my original intent was to read the actual value using system.opc.readValue to avoid waiting for the tag group to update so then I would actually be writing to the tag with the value that is currently in the PLC. When the tag group updates next nothing would change. I was curious though if my test was being overwritten in the PLC, but the tag group setting has Read After Write off and to do another test I removed any rungs of logic in the PLC that would write to the tag. I then was able to toggle the value and also use writeBlocking BUT the changes wouldn’t take effect until the tag group time occurred again. So I could use writeBlocking but if the tag group updates ever 30000 ms I could wait 30 seconds to actually see it change in the tag browser. I just ran another test and it appears writeBlocking is changing the PLC value right away, but the Tag Browser does not update.

OK - after I realized that I turned on Read After Write and it does update the Tag Browser with the value. Problem solved. Thanks.
