The Tag Calculation Data Source gives you the ability to quickly determine the average, sum, and maximum values from tag history.

Video recorded using: Ignition 7.9


(open in window)

[00:00] The tag calculation query allows you to run aggregates against your tag history data. Let's begin by adding a new tag calculation query. In the data panel, we'll click on the plus icon and click on "Tag Calculation Query". We'll drill down into our historical tags, and I have these three random tags. These are just coming from a simulated device and providing us with random numbers. We'll drag them over to our selected historical tags. Now if you take a look at this calculations section down below, this has a list of aggregates we can run against each of our tags. Each calculation you check is ran against each of your selected historical tags. So, let's go ahead and select average, sum, and maximum. You can specify the date range here. I'll just use the default historical, and then looking at our start date and end date. Now if we take a look at the design panel, and look over at our data sources, under our tag_calcs data source, you'll find each of our calculations listed. However, we don't list each of our tags in here, but there is this "tagpath" key. The tag path key is whatever your alias is. So just to show you this, let's go ahead and change this. Double, do space. There we are. Now if you take a look at this in the preview, you'll see that we have an average for each of our tags, we have a maximum for each of our tags, as shown, and a sum for all the current values within that data range. Also, you'll see the alias for each of our tags.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.


Share this video