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

PI DataLink

PICompDat()

  • Last UpdatedNov 21, 2022
  • 1 minute read

Returns PI point values or PI AF attribute values stored during a specified time period.

Syntax

PICompDat(DataItem, STime, ETime, OutCode, RootPath, Mode)

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.

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, 2, 4, 5, and 6.

RootPath

String

The path to the data item. See Data items.

Mode

String

The method that the function uses to determine which values to retrieve near the start time (boundary type):

  • inside

  • outside

  • interpolated

  • auto

Example

=PICompDat("sinusoid","1:00:00","3:00:00",1,"","inside")

Returns values and corresponding time stamps from the default Data Archive server for the PI point sinusoid from 1:00a.m. to 3:00 a.m. this morning using boundary type inside.

See also

Compressed 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