PISampFilDat()
- Last UpdatedNov 21, 2022
- 2 minute read
- PI System
- PI DataLink 2023 SP1
- Visualization
Returns evenly-spaced, interpolated and filtered values for a PI point or PI AF attribute stored over a specified time period.
Syntax
PISampFilDat(DataItem, STime, ETime, Interval, FiltExp, FiltCode, OutCode, RootPath)
Arguments
|
Argument |
Type |
Description |
|---|---|---|
|
DataItem |
String |
The PI point name or PI AF attribute name for which the function returns values. Specify a range of cells that contain PI point names or PI AF attribute names to return values for each. |
|
STime |
String |
The start of the time period for which the function returns values. See Time inputs. |
|
ETime |
String |
The end of the time period for which the function returns 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. |
|
FiltExp |
String |
A Boolean performance equation that the function uses to filter values. When the expression evaluates to false, the function excludes corresponding values. See Filter expressions. |
|
FiltCode |
Integer |
A code that indicates whether to label filtered values:
|
|
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 1 and 2. |
|
RootPath |
String |
The path to the data item. See Data items. |
Example
=PISampFilDat("sinusoid","11-Jan-1997","+3h","1h",A1,1,1,"")
Returns sampled data for the PI point sinusoid from the default Data Archive server. The function retrieves values at midnight 11-Jan-97, 1:00 a.m. on 11-Jan-97, 2:00 a.m. on 11-Jan-97, and 3:00 a.m. on 11-Jan-97. If the condition in cell A1 is not satisfied at any of those times, the function returns the label Filtered at that time. The function shows time stamps in the first column and values in the second column.