# Tag group updating all values

**URL:** <https://forum.inductiveautomation.com/t/tag-group-updating-all-values/91559>\
**Category:** Ignition\
**Created:** [June 7, 2024, 5:55pm UTC](https://forum.inductiveautomation.com/t/tag-group-updating-all-values/91559 "2024-06-07T17:55:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephanie\_Aguiar](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@Stephanie\_Aguiar](https://forum.inductiveautomation.com/u/Stephanie_Aguiar)\
**Post date:** [June 7, 2024, 5:55pm UTC](https://forum.inductiveautomation.com/t/tag-group-updating-all-values/91559/1 "2024-06-07T17:55:59Z")

</div>

I have some tags which have a script to change the Tag Group at a certain time. This tag group is set to 0ms so that it will stop reading data. I did this to keep a static value at a certain time. I have a list of tags 5am-6am, 6am-7am ect... but Im not sure why when the tag group updates it also updates the tag value. I don't want it to update once it is at the static value of it designated time.

---

<div class="post-metadata">

**Author:** ![leonardo.godoi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/leonardo.godoi/32/27178_2.png) [@leonardo.godoi](https://forum.inductiveautomation.com/u/leonardo.godoi)\
**Post date:** [June 7, 2024, 6:26pm UTC](https://forum.inductiveautomation.com/t/tag-group-updating-all-values/91559/2 "2024-06-07T18:26:03Z")

</div>

While i don't have an answer as to why your group is behaving that way, what i would do to achieve what seems to be your goal is:

1. Create a folder with all of your opc tags within and another folder with the same tag names but memory as the Value Source.

2. Create memory or expression tags that will function as your trigger(s) to check whether it's time to update the memory tag.

3. Add this script to every opc tag so that your memory tags are only updated at the correct time.  

```python
	tagName = tag.name 
	#Use the same tag name so it's easier to copy the script
	
	TriggerOK = system.tag.readBlocking(["[.]" + tagName + "TriggerUpdate"])[0].value 
	#Check if the trigger is ok to update
	
	if TriggerOK and not initialChange:
		paths = ["[.]../MemoryTags/"+ tagName]
		values = [currentValue.value]
		system.tag.writeBlocking(paths, values)
		#Write to the memory tag only if the trigger is ok

```

---

<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:** [June 7, 2024, 7:23pm UTC](https://forum.inductiveautomation.com/t/tag-group-updating-all-values/91559/3 "2024-06-07T19:23:10Z")

</div>

I believe you should be using driven tag groups instead of direct tag groups. You'll probably have to make one for every hour or whatever condition you're needing different, but would simplify it greatly.

> **[Driven Tag Group Video at Inductive University](https://inductiveuniversity.com/videos/driven-tag-group/8.1)**
>
> Learn how to configure a Driven Tag Group, a Tag Group that varies in execution rate based on some condition.

---

<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:** [June 7, 2024, 7:25pm UTC](https://forum.inductiveautomation.com/t/tag-group-updating-all-values/91559/4 "2024-06-07T19:25:32Z")

</div>

If these are all reading from the same PLC tag, I would suspect that because the value via OPC updates, all associated tags are probably updating even if the tag group isn't polling for an update, but I could be wrong.

---

<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:** [June 9, 2024, 3:30am UTC](https://forum.inductiveautomation.com/t/tag-group-updating-all-values/91559/5 "2024-06-09T03:30:55Z")

</div>

Sounds like an XY problem where you may be trying to solve the problem in the wrong way.  
Go back a step; whats the problem you're trying to solve?

---

<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:** [June 9, 2024, 4:05pm UTC](https://forum.inductiveautomation.com/t/tag-group-updating-all-values/91559/6 "2024-06-09T16:05:08Z")

</div>

Yeah, it looks like they have a tag already with the running total, so probably easiest to set up a gateway scheduled script to run once an hour and write these values to an integer array memory tag with a size of 24 based on the start of each hour. I would guess end goal is a number of parts per hour but could be wrong.
