Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI System Management Tools

TagMean (Tag-based PE function)

  • Last UpdatedOct 04, 2024
  • 1 minute read

Find the average value of a point over a given time, according to values stored in the PI Archive.

Syntax

TagMean(tagname, starttime, endtime [, pctgood])

Returns

The point's average value over the given time. Notice that the average is not time-weighted.

Arguments

tagname

A tagname. This point must represent a continuous variable.

starttime

Must be a time expression representing the beginning of the time range to search.

endtime

Must be a time expression, greater than starttime; representing the end of the time range to search.

pctgood

Optional. Minimum time percentage over the given time range, that the point's archived values must good.

Exceptions

If the point has no good values or the pctgood minimum is not reached for the given time range, returns an error value. Unlike some other summary functions, TagMean does not interpolate any value on the boundary. Thus, if there is no Archive event between the specified interval, an error value is returned.

Notes

Note: If the point has few good Archive values during the time period, this function's result may not be trustworthy. Use the PctGood function to find out what percentage of the values is good.

Example

TagMean('tag1', 'y', '*')

TagMean('tag1', '14-Dec-97', '+1d',70)

TagMean('tag1', '14-Dec-97', '15-Dec-97')

In This Topic
TitleResults for “How to create a CRG?”Also Available in