# Is there a way to collect tag changes into 1 variable?

**URL:** <https://forum.inductiveautomation.com/t/is-there-a-way-to-collect-tag-changes-into-1-variable/24317>\
**Category:** Ignition\
**Tags:** ignition79, scripting\
**Created:** [April 23, 2019, 9:17am UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-collect-tag-changes-into-1-variable/24317 "2019-04-23T09:17:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![huyao](https://avatars.discourse-cdn.com/v4/letter/h/aeb1de/32.png) [@huyao](https://forum.inductiveautomation.com/u/huyao)\
**Post date:** [April 23, 2019, 9:17am UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-collect-tag-changes-into-1-variable/24317/1 "2019-04-23T09:17:10Z")

</div>

Hi All,

Current I have around 5000 tags, and want to collect all the tags changes event every second.  
Two ideas

1. Memory dataset tag.  
For those 5000 tags, add tag change scripts to read and write the dataset tag. Question is whether some events will be missed.
2. Python module variable.  
Add a python module with a dictionary variable and set/clear function. Then call the set function in tag change script in those 5000 tags. But question is the same. will some events be missed?

Any suggest will be appreciated.

Regards

---

<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:** [April 23, 2019, 12:35pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-collect-tag-changes-into-1-variable/24317/2 "2019-04-23T12:35:15Z")

</div>

Why do you want to do this? Ignition’s tag architecture automatically supplies tag changes on an as-needed basis to the bindings using them, and to historians that will record them. All individually configurable. What _ **else** _ are you trying to do?

---

<div class="post-metadata">

**Author:** ![yao.hu](https://avatars.discourse-cdn.com/v4/letter/y/e5b9ba/32.png) [@yao.hu](https://forum.inductiveautomation.com/u/yao.hu)\
**Post date:** [April 23, 2019, 12:37pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-collect-tag-changes-into-1-variable/24317/3 "2019-04-23T12:37:54Z")

</div>

I had tested several times with option 2.  
5000 tags refer to the same modbus tcp address, then log the tag events to logger.  
For those limited test, option 2 seems work.

---

<div class="post-metadata">

**Author:** ![yao.hu](https://avatars.discourse-cdn.com/v4/letter/y/e5b9ba/32.png) [@yao.hu](https://forum.inductiveautomation.com/u/yao.hu)\
**Post date:** [April 23, 2019, 12:42pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-collect-tag-changes-into-1-variable/24317/4 "2019-04-23T12:42:14Z")

</div>

Um, that is a request which need IG feed the tag change event to another system.

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [April 23, 2019, 1:31pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-collect-tag-changes-into-1-variable/24317/5 "2019-04-23T13:31:39Z")

</div>

You can do an exception detection on these 5000 tags thru scripts or a module and send name value pairs of changed values to the other system requiring it. However the danger in exception based reporting is if you miss one exception then you will have wrong data on receiving system until you synchronize the whole 5000 tags once in a while. Its safer to send the whole data every time. In exception based reporting you have the over head of change detection and in worst scenario, you will send full data. So sending full data is like worst case every time , but its safer and easier to build full data transfer in my opinion.
