# Large number of tag reads are stale

**URL:** <https://forum.inductiveautomation.com/t/large-number-of-tag-reads-are-stale/35806>\
**Category:** Ignition\
**Created:** [June 18, 2020, 8:35pm UTC](https://forum.inductiveautomation.com/t/large-number-of-tag-reads-are-stale/35806 "2020-06-18T20:35:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![deancable](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@deancable](https://forum.inductiveautomation.com/u/deancable)\
**Post date:** [June 18, 2020, 8:35pm UTC](https://forum.inductiveautomation.com/t/large-number-of-tag-reads-are-stale/35806/1 "2020-06-18T20:35:55Z")

</div>

I have a large number of tags in a PLC that get updated  
at one time in the PLC. Then I want to tell Ignition to come  
get all of them using a BOOLEAN tag in the PLC set to True.

Ignition 8.0.10  
All tags are in the same tag group, at a rate of 1000ms  
I have a gateway tag change event with the boolean tag in it.  
When the event fires and I see that the tag is TRUE, I write  
all those tags to a database. That is all working just fine.

SOMETIMES the values of a few of the tags have “stale” data in them from the previous  
time they were refreshed in the PLC a few minutes ago.  
The PLC only refreshes the data every few minutes.

How can I know that the tags have the most recent data in them from the PLC?

In the gateway tag change event script, I want to be able  
to somehow tell Ignition to refresh these tags.  
THEN I will write them to the database.

So I was thinking in my gateway tag change event  
to use: system.tag.requestGroupExecution()  
However I don’t know if it is synchronous or not?

If it is asynchronous then it will not help me.  
Any ideas?  
thanks

---

<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:** [June 18, 2020, 8:39pm UTC](https://forum.inductiveautomation.com/t/large-number-of-tag-reads-are-stale/35806/2 "2020-06-18T20:39:47Z")

</div>

The only way to do this for sure is to do the read in your tag change script using `system.opc.readValues`, not rely on tags.

---

<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:** [June 19, 2020, 11:51am UTC](https://forum.inductiveautomation.com/t/large-number-of-tag-reads-are-stale/35806/3 "2020-06-19T11:51:07Z")

</div>

You can also use a SQL Bridge Transaction Group in OPC “Read” mode (having dragged the opc items to it, not tags), with the boolean as the trigger. In that mode, the transaction group will subscribe to the trigger, but not the rest. They will be read via OPC _after_ the trigger fires.

---

<div class="post-metadata">

**Author:** ![deancable](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@deancable](https://forum.inductiveautomation.com/u/deancable)\
**Post date:** [June 19, 2020, 12:51pm UTC](https://forum.inductiveautomation.com/t/large-number-of-tag-reads-are-stale/35806/4 "2020-06-19T12:51:22Z")

</div>

Thanks,

I will use the `system.opc.readValues` ,

---

<div class="post-metadata">

**Author:** ![deancable](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@deancable](https://forum.inductiveautomation.com/u/deancable)\
**Post date:** [June 29, 2020, 7:47pm UTC](https://forum.inductiveautomation.com/t/large-number-of-tag-reads-are-stale/35806/5 "2020-06-29T19:47:28Z")

</div>

I was SUCCESSFUL using the system.opc.readValues.

no more STALE values.
