TimeGT (Tag-based PE function)
- Last UpdatedOct 04, 2024
- 1 minute read
- PI System
- PI Server 2018
- PI Server
Find the total time in seconds, within a range, when a point is greater than a given value.
Syntax
TimeGT(tagname, starttime, endtime, value)
Arguments
tagname
A tagname.
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. This time must be after starttime.
value
Must be an integer or real number or digital state (character string); the value to search for.
Returns
The time period in seconds within the given range, for which the point was greater than the given value.
Exceptions
None.
Notes
TimeGT interpolates between Archive events, if necessary, to find the times when the point crossed the given value.
Example
TimeGT('tag1', 't', '*',40.0)
TimeGT('digitaltag', '-1d', '*',TagVal('digitaltag', '14-Dec-97'))
TimeGT('digitaltag', '14-Dec-97', '*', "On")
Note: For more information about PI time, see PI time abbreviations and PI time expressions.