# Issue with using system.tag.writeAll/Synchronous not actually writing all tags

**URL:** <https://forum.inductiveautomation.com/t/issue-with-using-system-tag-writeall-synchronous-not-actually-writing-all-tags/20538>\
**Category:** Ignition\
**Created:** [November 5, 2018, 5:57pm UTC](https://forum.inductiveautomation.com/t/issue-with-using-system-tag-writeall-synchronous-not-actually-writing-all-tags/20538 "2018-11-05T17:57:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [November 5, 2018, 5:57pm UTC](https://forum.inductiveautomation.com/t/issue-with-using-system-tag-writeall-synchronous-not-actually-writing-all-tags/20538/1 "2018-11-05T17:57:31Z")

</div>

I’ve built a tool that will write many user-selected tags at once. I don’t have a hard limit on how many to edit, but in the tests by users they try to edit about 150 at once. However, only about half actually changes the value. They try again to change the rest, and it writes the rest just fine. I’ve tried both the writeAll and writeAllSynchronous versions. For the first, I have tried to wait several minutes even to see if it just took some time to write, with no luck. I’ve also tried to break it up into chunks of writeAll/S blocks, around 25 at a time to try and mimic what the user was doing, also with no luck.

What am I missing here?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [November 5, 2018, 6:30pm UTC](https://forum.inductiveautomation.com/t/issue-with-using-system-tag-writeall-synchronous-not-actually-writing-all-tags/20538/2 "2018-11-05T18:30:44Z")

</div>

system.tag.writeAll will return a status for each tag, have you looped through that to see if any are failing or timing out?

---

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [February 15, 2019, 6:44pm UTC](https://forum.inductiveautomation.com/t/issue-with-using-system-tag-writeall-synchronous-not-actually-writing-all-tags/20538/3 "2019-02-15T18:44:45Z")

</div>

Time to revisit this.

I have done that, and they all return as pending. It seems the magic number is 91 tags at a time. I try to write a total of 147, in chunks of 25 at a time (each writeAll has 25 or less paths), only 91 will actually change. At that point I can select the remaining 56 and those write fine.

Edit: Just took the chunk size down to 1. Still uses writeAll, just has 2 arrays with 1 value each for path and value. Still doesn’t cover it all. In my example above, it ends up getting 98 instead of 91 but thats about it.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [February 15, 2019, 7:48pm UTC](https://forum.inductiveautomation.com/t/issue-with-using-system-tag-writeall-synchronous-not-actually-writing-all-tags/20538/4 "2019-02-15T19:48:16Z")

</div>

When they return pending, do they ever complete if you wait?  
Have you tried it with system.opc.writeValues?  
I wonder if its something in between that is causing it.

---

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [February 15, 2019, 8:35pm UTC](https://forum.inductiveautomation.com/t/issue-with-using-system-tag-writeall-synchronous-not-actually-writing-all-tags/20538/5 "2019-02-15T20:35:51Z")

</div>

No, they don’t end up being written after some time. Haven’t tried it with that function, but they aren’t all OPC values necessarily. Happens when they’re just memory tags, too.

And I just tried sending a message to the gateway and have the gateway write the values - same results.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [February 15, 2019, 9:02pm UTC](https://forum.inductiveautomation.com/t/issue-with-using-system-tag-writeall-synchronous-not-actually-writing-all-tags/20538/6 "2019-02-15T21:02:41Z")

</div>

Well I just tested it with 100 memory tags, it returns status 2(pending) on the writes but looking at the actual tags the values WERE written. Wonder if its a limitation or bug with the writeAll function?

---

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [February 15, 2019, 9:05pm UTC](https://forum.inductiveautomation.com/t/issue-with-using-system-tag-writeall-synchronous-not-actually-writing-all-tags/20538/7 "2019-02-15T21:05:42Z")

</div>

Actually I too just tested it on pure memory tags and I was mistaken, just wrote to 200 memory tags easily. It also might be a derived tag thing, we use those for 99% of opc connections so it might be stuck there somewhere as well.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [February 15, 2019, 9:10pm UTC](https://forum.inductiveautomation.com/t/issue-with-using-system-tag-writeall-synchronous-not-actually-writing-all-tags/20538/8 "2019-02-15T21:10:08Z")

</div>

Yeah for derived tags you can’t use the system.opc.writeAll since that just takes the value list and writes it.  
Unless you do the derivative calc on the values before sending them.  
You might have to call support on that one, sounds like its overloading something on the tag write system.

---

<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 15, 2019, 9:11pm UTC](https://forum.inductiveautomation.com/t/issue-with-using-system-tag-writeall-synchronous-not-actually-writing-all-tags/20538/9 "2019-02-15T21:11:42Z")

</div>

Try varying drivers, too.
