# Does writeBlocking respect tag order in parameters?

**URL:** <https://forum.inductiveautomation.com/t/does-writeblocking-respect-tag-order-in-parameters/115471>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [May 11, 2026, 1:26pm UTC](https://forum.inductiveautomation.com/t/does-writeblocking-respect-tag-order-in-parameters/115471 "2026-05-11T13:26:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdumouli](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@bdumouli](https://forum.inductiveautomation.com/u/bdumouli)\
**Post date:** [May 11, 2026, 1:26pm UTC](https://forum.inductiveautomation.com/t/does-writeblocking-respect-tag-order-in-parameters/115471/1 "2026-05-11T13:26:53Z")

</div>

Hi everybody, i'm quite new to Ignition. In a project with igntion 8.3.4 we're trying to write a list of tags with writeBlocking. The last tag of the list is significant since it will trigger a process with all values. We saw that sometimes this trigger before all tags are written. How does writeBlocking works internally ? Does it write tags in the same order given in parameters or is the order not guarranteed ?

To solve this for now i will split the write operation in 2 writeBlocking, first with values and second with the trigger.

Thank you for your answers 🙂

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [May 11, 2026, 2:01pm UTC](https://forum.inductiveautomation.com/t/does-writeblocking-respect-tag-order-in-parameters/115471/2 "2026-05-11T14:01:42Z")

</div>

I think you have a fundamental misunderstanding of what is happening here.

`writeBlocking()` does move through the list of tag paths sequentially. That writes the values to the **Ignition** tag server sequentially. Those values do not necissarily arive at the device in that same order.

Even splitting the write into two sepearte calls does not make this a sure thing.

Esentially what you have here is a race condition, this is a common problem though often it is from the other direction.

Probably the best way to get around this is to use `system.opc.writeValues()` which will write the values directly to the device.

---

<div class="post-metadata">

**Author:** ![bdumouli](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@bdumouli](https://forum.inductiveautomation.com/u/bdumouli)\
**Post date:** [May 11, 2026, 2:18pm UTC](https://forum.inductiveautomation.com/t/does-writeblocking-respect-tag-order-in-parameters/115471/3 "2026-05-11T14:18:45Z")

</div>

Thank you for your answer ! I did forget to mention it is on memory tags with the system.tags.writeBlocking method (not OPC). So i was expecting to have more-or-less no delay except for the write-time since it writes in the gateway tags.

Not sure if i'm clear. Nontheless thank you for your answer 🙂

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [May 11, 2026, 2:30pm UTC](https://forum.inductiveautomation.com/t/does-writeblocking-respect-tag-order-in-parameters/115471/4 "2026-05-11T14:30:57Z")

</div>

> [@bdumouli](#):
>
> I did forget to mention it is on memory tags

I can't imagine there being a sequencing issue with memory tags. Obviously I don't know all the in's and outs of the programming behind the function, but I would find it hard to beleive that there is any parallelism inside that function.

However, depending on how you are reacting to the trigger's value change, it could have something to do with scan classes.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [May 11, 2026, 3:11pm UTC](https://forum.inductiveautomation.com/t/does-writeblocking-respect-tag-order-in-parameters/115471/5 "2026-05-11T15:11:55Z")

</div>

Do your tags have tag change events on them which then run in response to your writeBlocking? Might be confounding things.

I believe I saw that memory tags don't need / wait for polling.

If all these are really memory tags I would think this should work right. Though you should also show all your logic - how are you writing, and what is the mechanmism you are using for your trigger tag?

---

<div class="post-metadata">

**Author:** ![bdumouli](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@bdumouli](https://forum.inductiveautomation.com/u/bdumouli)\
**Post date:** [May 11, 2026, 3:24pm UTC](https://forum.inductiveautomation.com/t/does-writeblocking-respect-tag-order-in-parameters/115471/6 "2026-05-11T15:24:06Z")

</div>

Hi, thank you for your answer.

I do have a script on the trigger tag value changes. If the trigger is true then it notifies another gateway that will read all these tags. When the other gateway is notified and read, some tags are not yet updated with their new value. This is why i suspected that the order is not guaranteed.

Once the gateway is ok it will send me a response and i will reset all my tags and set my trigger to False and wait for another writeBlocking sequence.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [May 11, 2026, 3:30pm UTC](https://forum.inductiveautomation.com/t/does-writeblocking-respect-tag-order-in-parameters/115471/7 "2026-05-11T15:30:53Z")

</div>

Ok so for future reference architiectural decisions like this are worth noting in your original post, the fact you have two gateways. I believe that is probably your issue here. If this was all executing on the same gateway it woudl be fine, but Gateway 2 looking at your tags on Gateway 1 is on a polling basis and so that tidbit about memory tags not needing to wait for the poll cycle doesn't apply here. That is my best guess what is going on based on what you've told us.

To avoid the issue I would, on gateway 1 upon the trigger being set to true, I would in that script grab all revelant tag values and include that in the payload to that you are sending to gateway 2 so that it has everything it needs in one message. Now gateway 2 poll cycle is immaterial as gateway 2's message handler has everything it needs in the message from gateway1, which should be the right values at time of sending the message over.

---

<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:** [May 11, 2026, 4:54pm UTC](https://forum.inductiveautomation.com/t/does-writeblocking-respect-tag-order-in-parameters/115471/8 "2026-05-11T16:54:24Z")

</div>

To avoid the possibility of races, since the implementation is opaque, is to use two calls to `system.tag.writeBlocking()`. One to write all the new data, and the second to write the new trigger. It is **vital** to examine the return value of the first call (a list of quality codes) to make sure they are all "Good" before writing the trigger.
