PITimeFilter()
- Last UpdatedNov 21, 2022
- 2 minute read
- PI System
- PI DataLink 2023 SP1
- Visualization
Returns the amount of time that a performance equation evaluates to true during evenly spaced intervals in a specified time period.
Syntax
PITimeFilter(Expression, STime, ETime, Interval, TimeUnit, OutCode, RootPath)
Arguments
|
Argument |
Type |
Description |
|---|---|---|
|
Expression |
String |
A Boolean performance equation that the function evaluates. See Expressions. Reference a range of cells that contain expressions to return values for each. |
|
STime |
String |
The start of the time period for which the function calculates values. See Time inputs. |
|
ETime |
String |
The end of the time period for which the function calculates values. See Time inputs. |
|
Interval |
String |
The interval between returned values. Enter a value and time unit that specifies the length of the interval. For example, enter 15m (15 minutes) to return a value for every 15-minute interval during the time period. See Learn about time-interval specifications. |
|
TimeUnit |
String |
Time unit of the calculated result:
|
|
OutCode |
Integer |
An output code that determines what appended data the function returns and how the function orients output. See Output codes for information on how to compute the code. This function supports bits 2, 3, 7, and 8. |
|
RootPath |
String |
The path to the data item referenced by the expression. See Data items. |
Example
=PITimeFilter($A$1,"y","t","1h","seconds",65,"thevax")
Returns the number of seconds that the expression in cell A1 is true on the Data Archive server named thevax during one-hour intervals, starting from midnight yesterday to midnight today.
The function shows the time stamp of the start of each calculation interval to the left of the value.