Use the search feature to view Kepware's repository of more than 500 Knowledge Base articles. Narrow your results or type your query into the search field below.

Alternatively, if you are unable to find a solution, we have an additional resource - our PTC eSupport Portal . If you are prompted to log into the eSupport Portal, you can use your My Kepware credentials. Need a My Kepware account? Create one here .

Search Solution Results By:
View All Solutions

Kepware Knowledge Base: Solution

How Do Average Tags Work?

Last Update: 11/7/2018

Average Tags calculate the running average value of a Source Tag. The calculation is controlled using a separate Run or Trigger Tag (usually Boolean). The calculation will begin when the Run Tag's value transitions from a zero (Off) to a non-zero (On) state. When the Run Tag transitions back to zero, the calculation will stop and the Average Tag will retain the last calculated average value. When the Run Tag returns to a non-zero state, the calculations will start new. The calculation takes two samples of the scan rate of the tag being averaged, and then averages them. At the next sample, the previous average value and the new sample value will be averaged. This process repeats until the Run Tag transitions to a non-zero value. If the Source Tag's value does not change after the second sample, all subsequent calculations will produce a value that slowly creeps towards the static sample value. The table below displays the averaging process when the sample values are always changing.

Run TagSource TagAverage Tag

Note: The table below displays the averaging process when the first two samples are different, but the sample value remains the same during subsequent samples.

Run TagSource TagAverage Tag

Note 1: If the server starts and the Run Tag is a non-zero value, the average value's calculation will not begin because the Run Tag never transitioned from zero to non-zero. To start, the Run Tag must transition to zero and then back to non-zero.

Note 2: If the Run Tag has never transitioned to a non-zero value to start calculations, the Average Tag's value will be unknown.

Related Products
Advanced Tags