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

PI System Management Tools

TagTot (Tag-based PE function)

  • Last UpdatedOct 04, 2024
  • 2 minute read

Find the totalized value (time integral) of a point over a given time, according to values stored in the PI Archive.

Syntax

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

Arguments

tagname

A tagname. This point must represent a continuous process flow.

starttime

Beginning of the time range to search. Relative times are relative to endtime, if endtime is not itself a relative time.

endtime

End of the time range to search. Relative times are relative to starttime, if starttime is not itself a relative time.

pctgood

Optional. Minimum time percentage over the given time range, that the point's archived values must be good. For more infomation about pctgood, see PctGood (Tag-based PE function).

Returns

The point's totalized value over the given time.

Exceptions

If the point has no good values or the PctGood minimum is not reached for the given time range, returns an error value.

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 value is good.

Notes

  • The system chooses a scale factor such that the integral is correct only if the flow is expressed in units per day. If the flow is expressed in units per hour, or per some other time unit, you must multiply this result by a conversion factor. The conversion factor equals the number of actual flow time units in a day.

  • For instance, if you totalize a point measured in gallons per minute, multiply the result of TagTot by 1440 to get the answer in gallons. This conversion factor is not related to the time period you are totalizing over; it is strictly a function of the point's engineering units.

  • Some PI sites have the default total period configured to be per hour rather than per day. If you are at one of these sites, your conversion factor will differ.

  • When the percentage of good data is less than 100%, TagTot determines the total based on good data and divides the fraction of good data in the interval.

Example

TagTot('tag1', 'y', '*')

TagTot('tag1', '-1h', '*',85)

TagTot('tag1', '14-Dec-97', '+1h')

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