使用搜索功能查看 Kepware 的信息库,其中包含 500 多篇知识库文章。缩小搜索结果范围,或在下面的搜索字段中输入您的查询。

或者,如果您无法找到解决方案,我们还有另一个资源:我们的 PTC eSupport Portal。 如果系统提示您登录 eSupport Portal,您可以使用“我的 Kepware”凭据。需要一个“我的 Kepware”帐户吗?在此处创建

搜索解决方案结果:
View All Solutions

Kepware Knowledge Base: Solution


How Do Average Tags Work?


Last Update: 2018/11/7

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
01UNK
13UNK
185.5
12515.25
11113.125
07513.125
01913.125
01213.125
11413.125
1710.5

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
01UNK
10UNK
100
1105
1107.5
1108.75
1109.375
1109.6875

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