PctGood (Tag-based PE function)
- Last UpdatedOct 04, 2024
- 1 minute read
- PI System
- PI Server 2023
- PI Server
Find the percentage, over a given time range, when a point's archived values are good. The PctGood function finds the percentage of values returned by the expression that do not contain an error code from the System digital state set. For more information about, see System digital state set.
Syntax
PctGood(tagname, starttime, endtime)
Arguments
tagname
A tagname.
starttime
Must be a time expression, the beginning of the time range to search.
endtime
Must be a time expression, greater than starttime; the end of the time range to search.
Returns
An integer or real number from 0.0 to 100.0: the percentage of the given time when the point had good values.
Example
PctGood('tag1', 'y', '*')
PctGood('tag1', '-1h', '*')