# Cannot read some tags inside Rockwell AOI

**URL:** <https://forum.inductiveautomation.com/t/cannot-read-some-tags-inside-rockwell-aoi/38393>\
**Category:** Ignition Early Access\
**Created:** [September 4, 2020, 11:09am UTC](https://forum.inductiveautomation.com/t/cannot-read-some-tags-inside-rockwell-aoi/38393 "2020-09-04T11:09:49Z")\
**Posts on this page:** 10\
**Page:** 5

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [February 18, 2025, 11:49pm UTC](https://forum.inductiveautomation.com/t/cannot-read-some-tags-inside-rockwell-aoi/38393/84 "2025-02-18T23:49:19Z")

</div>

How is your tag group configured? I have my 1-sec direct group as just subscribed with read after write and optimistic writes turned off (this is what my commands typically run under). Longer groups like my 5-sec group has read after write turned off, but optimistic writes turned on with a 7 second timeout.

---

<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:** [February 18, 2025, 11:49pm UTC](https://forum.inductiveautomation.com/t/cannot-read-some-tags-inside-rockwell-aoi/38393/85 "2025-02-18T23:49:22Z")

</div>

> [@nminchin](#):
>
> SCADA writes to the tag setting it True, the PLC immediately resets it to False, but SCADA remains True indefinitely.

This is a race condition that can happen if you use the "Read After Write" option in tag groups with an OPC UA subscription. Not sure about other causes.

> [@Indirect Tag Delay](https://forum.inductiveautomation.com/t/indirect-tag-delay/28734/9):
>
> Imagine, if you will, a boolean tag in a 30 second scan class.
> 
> 1. driver polls value=`false`, next poll in 30s
> 2. user writes value=`true` to tag, read-after-write confirms value=`true`, ignition tag now set to true
> 3. some seconds later, before the next poll, an external source (script, PLC logic, whatever) sets the value to `false` again
> 4. driver eventually polls again, reads value=`false`, no change since last poll, so no data change is sent to client
> 
> The tag is now false in the PLC but true in Ignition.

from [Indirect Tag Delay - #9 by Kevin.Herron](https://forum.inductiveautomation.com/t/indirect-tag-delay/28734/9)

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [February 18, 2025, 11:54pm UTC](https://forum.inductiveautomation.com/t/cannot-read-some-tags-inside-rockwell-aoi/38393/86 "2025-02-18T23:54:38Z")

</div>

Maybe it's just me, but this seems like a bug. Regardless of how the tag was read (whether it's read-after-write or a poll), if the value changes it should always send a data change of the tag. In step 1 the Ignition tag is true, and in step 2, something is setting it false in the PLC supposedly, so on the next poll at step 3, if the value is now false, but it was true in step 2 even though that wasn't a polling event, the tag still was verified to have changed.

Edit: Or is this due to something related to the difference between the OPC server doing the polling and the OPC client only being subscribed to tag events on a specific periodic basis?

---

<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:** [February 19, 2025, 12:00am UTC](https://forum.inductiveautomation.com/t/cannot-read-some-tags-inside-rockwell-aoi/38393/87 "2025-02-19T00:00:01Z")

</div>

I explain a little further in that thread why it’s not a bug despite being pretty undesirable. No compliant OPC UA server can behave the way you want because it leads to a spurious value being sampled/reported.

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [February 19, 2025, 12:00am UTC](https://forum.inductiveautomation.com/t/cannot-read-some-tags-inside-rockwell-aoi/38393/88 "2025-02-19T00:00:58Z")

</div>

I'll have to read. I just edited my post, but I'm guessing that's along the track of what's going on.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [February 19, 2025, 12:03am UTC](https://forum.inductiveautomation.com/t/cannot-read-some-tags-inside-rockwell-aoi/38393/89 "2025-02-19T00:03:53Z")

</div>

Slightly off course, but I've also had issues with scada set/plc reset also in the past where bool tag writes from scada either haven't been written into the audit log, or its tag value change events haven't fired (I don't recall which one) and I ended up turning on "Optimistic Writes" to fix it so that the tag. Can someone explain why that would happen?

---

<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:** [February 19, 2025, 12:34am UTC](https://forum.inductiveautomation.com/t/cannot-read-some-tags-inside-rockwell-aoi/38393/90 "2025-02-19T00:34:50Z")

</div>

Also fwiw we did eventually implement this:

> [@Indirect Tag Delay](https://forum.inductiveautomation.com/t/indirect-tag-delay/28734/17):
>
> Well, as I mentioned earlier, the ability to set a DataChangeTrigger that includes timestamp changes would mitigate this.

in Ignition 8.1.10.

---

<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 19, 2025, 12:35am UTC](https://forum.inductiveautomation.com/t/cannot-read-some-tags-inside-rockwell-aoi/38393/91 "2025-02-19T00:35:39Z")

</div>

If you really must use the "set from Ignition/reset in PLC" model, use `system.opc.writeValue()` instead of `system.tag.write*()`.

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [February 19, 2025, 5:11am UTC](https://forum.inductiveautomation.com/t/cannot-read-some-tags-inside-rockwell-aoi/38393/92 "2025-02-19T05:11:02Z")

</div>

So to clarify, the read after write and optimistic writes are client side settings.

Read after write does an explicit client OPC read after it does the write, but since it's independent of the subscription, if the value is reset back to the previous value before the next scheduled poll, the OPC server doesn't send an event for the tag because from its perspective it never changed.

Optimistic writes "assume" the value was written, so the client holds the written value as the current, but if the timeout is reached without a new tag value from the server, it reverts back to the previous value to match the last known value received from the server during a regular poll. (Which is why the HMI set, PLC reset works fine because even if it happens quickly, after the timeout it gets the correct value that matches the PLC)

Edit: The manual does a good job of describing this.

> **[Tag Groups | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/platform/tags/tag-groups#opc-settings)**
>
> What Is a Tag Group?

---

<div class="post-metadata">

**Author:** ![Chris\_Bingham](https://avatars.discourse-cdn.com/v4/letter/c/e5b9ba/32.png) [@Chris\_Bingham](https://forum.inductiveautomation.com/u/Chris_Bingham)\
**Post date:** [February 22, 2025, 6:33pm UTC](https://forum.inductiveautomation.com/t/cannot-read-some-tags-inside-rockwell-aoi/38393/93 "2025-02-22T18:33:19Z")

</div>

> [@michael.flagler](#):
>
> For all my commands from the HMI write a 1 to a tag, then let the PLC reset it back to 0 once that command is "processed".

+1 for this method. IMHO, this makes for the most straightforward **logic** for anybody that follows.

As a side note - many of A-B Logix built-in instructions (PIDE, etc.) expect to operate in a similar fashion (any OperXxxxReq is configured to auto-reset after processed). For anyone using those, adding any additional logic to change the functionality of those instructions feels like an unnecessary workaround.

> [@Kevin.Herron](#):
>
> race condition that can happen if you use the "Read After Write" option in tag groups with an OPC UA subscription

For tags which are configured using a request-response device driver, I prefer to set all of my commands/setpoints (R/W device tags) to a separate tag group with `Data Mode=Polled`. As a starting point, I typically have these set to a `Mode=Leased` tag group (`Rate=30,000`, `Leased/Driven=2000`), `Read After Write=True`, also `Optimistic Writes=True`. As another aside - my leased tags are _almost always_ accessible only from a popup.

[Previous page](https://forum.inductiveautomation.com/t/cannot-read-some-tags-inside-rockwell-aoi/38393.md?page=4)
