FindGT (Tag-based PE function)
- Last UpdatedOct 04, 2024
- 1 minute read
- PI System
- PI Server 2023
- PI Server
Find the first time, within a range, when a point is greater than a given value.
Syntax
FindGT(tagname, starttime, endtime, value)
Arguments
tagname
A tagname.
starttime
A time expression representing the beginning of the time range to search. Can be a time relative to endtime if endtime is a time.
endtime
End of the time range to search, time expression or time (in seconds) relative to starttime if starttime is a time. If this time is earlier than starttime, the range is searched backwards.
value
Must be an integer or real number or digital state (character string), the value to search for.
Returns
The timestamp closest to starttime, within the given range, for which the point was greater than the given value.
Exceptions
If the point was never greater than the given value, FindGT returns an error value.
Notes
FindGT interpolates between Archive events, if necessary, to find the value it is looking for.
Example
FindGT('tag1', 't', '*',40.0)
FindGT('tag1', '-1d', '*',40.0)
FindGT('digitaltag', '-1d', '*', TagVal('digitaltag', 'y'))