# Create 10 minute averages

**URL:** <https://forum.inductiveautomation.com/t/create-10-minute-averages/77637>\
**Category:** General Discussion\
**Created:** [August 9, 2023, 2:28pm UTC](https://forum.inductiveautomation.com/t/create-10-minute-averages/77637 "2023-08-09T14:28:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![denny\_jimenez](https://avatars.discourse-cdn.com/v4/letter/d/958977/32.png) [@denny\_jimenez](https://forum.inductiveautomation.com/u/denny_jimenez)\
**Post date:** [August 9, 2023, 2:28pm UTC](https://forum.inductiveautomation.com/t/create-10-minute-averages/77637/1 "2023-08-09T14:28:20Z")

</div>

Greetings to all.  
I am new to Ignition programming, surely this question will have a simple answer. I am creating a SCADA and I need to take analog data from a field unit (RTU), with this data I need to create fifteen minute averages, it can be with a sample every 10s. These averages, later I will save them in a database to be processed by a small application. Thank you very much if you can advise me.

---

<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:** [August 9, 2023, 2:55pm UTC](https://forum.inductiveautomation.com/t/create-10-minute-averages/77637/2 "2023-08-09T14:55:11Z")

</div>

You will need to save the 10-second samples in a database. Then you can "process" the 10-second samples into the 15-minute averages, for prior periods, at the start of a new period. You can prune the 10-second samples any time after that.

Ignition's tag historian can be configured on the point or points of interest to do the 10-second samples. Generally, the 15-minute averages would be done by a scheduled script.

---

<div class="post-metadata">

**Author:** ![denny\_jimenez](https://avatars.discourse-cdn.com/v4/letter/d/958977/32.png) [@denny\_jimenez](https://forum.inductiveautomation.com/u/denny_jimenez)\
**Post date:** [August 9, 2023, 3:17pm UTC](https://forum.inductiveautomation.com/t/create-10-minute-averages/77637/3 "2023-08-09T15:17:16Z")

</div>

Pturmel, Thank you very much for the quick answer.  
Is the Schedule script at the Gateway level? Do you have an example of the script?

Thanks

---

<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:** [August 9, 2023, 3:34pm UTC](https://forum.inductiveautomation.com/t/create-10-minute-averages/77637/4 "2023-08-09T15:34:57Z")

</div>

Yes, and no. I generally do not use the historian in this fashion.
