FindLE (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 less than or equal to a given value.
Syntax
FindLE(tagname, starttime, endtime, value)
Arguments
tagname
A tagname.
starttime
Beginning of the time range to search; time expression or time relative to endtime if endtime is a time.
endtime
End of the time range to search, timestamp 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 less than or equal to the given value.
Exceptions
If the point was always greater than the given value, FindLE returns an error value.
Notes
FindLE interpolates between Archive events, if necessary, to find the value it is looking for.
Example
FindLE('tag1', 't', '*',40.0)
FindLE('tag1', -3600, '*',40.0)
FindLE('tag1', 'Saturday', '*',40.0)