TimeLE (Tag-based PE function)
- Last UpdatedOct 04, 2024
- 1 minute read
- PI System
- PI Server 2023
- PI Server
Find the total time in seconds, within a range, when a point is less than or equal to a given value.
Syntax
TimeLE(tagname, starttime, endtime, value)
Arguments
tagname
A PI tag.
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 less than or equal to the given value.
Exceptions/Errors
None.
Notes
TimeLE interpolates between Archive events, if necessary, to find the times when the point crossed the given value.
Examples
TimeLE('att1', 't', '+1h',80)
-
[Find the total time between 12:00am and 1:00am today when 'att1' was less than or equal to 80.]
TimeLE('att1', '-1h', '*',TagVal('att1', 't+8h'))
-
[Find the total time in the past hour when the value of 'att1' was less thank or equal its value at 8am today. Result is in seconds.]
TimeLE('digitaltag', '14-Dec-97', '*', "On")
TimeEq (page ), TimeGE (page ), TimeGT (page ), TimeLT (page ), TimeNE (page )