Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI DataLink

PISampDat()

  • Last UpdatedNov 21, 2022
  • 1 minute read

Returns evenly-spaced, interpolated values for a PI point or PI AF attribute stored over a specified time period.

Syntax

PISampDat(DataItem, STime, ETime, Interval, 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.

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

=PISampDat("sinusoid","y","t","3h",1,"")

Returns sampled data and the corresponding time stamps for the PI point sinusoid from the default Data Archive server, beginning at midnight yesterday and ending at midnight today, reporting values in 3-hour intervals.

See also

Sampled Data function

Define functions manually

Guidelines for entering arguments manually

Interpolated values

In This Topic
TitleResults for “How to create a CRG?”Also Available in