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

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?

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

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.

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.

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.

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?

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.

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.

Try varying drivers, too.