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

PI DataLink

PICurrVal()

  • Last UpdatedNov 21, 2022
  • 1 minute read

Returns the most recent value of a historical PI point or PI AF attribute. For a future PI point, the value returned depends on the time stamps of recorded values relative to the current time:

  • If all recorded values have time stamps before the current time, the function returns the last recorded value.

  • If recorded values have time stamps that straddle the current time, the function returns an interpolated value.

  • If all recorded values have time stamps after the current time, the function returns no data.

This function supports bulk calls.

Syntax

PICurrVal(DataItem, OutCode, RootPath)

Arguments

Argument

Type

Description

DataItem

String

The PI point name or PI AF attribute name for which the function returns a value. Specify a range of cells that contain PI point names or PI AF attribute names to return a value for each.

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 referenced by the expression. See Data items.

Example

=PICurrVal("let439",1,"holden")

Returns the current value and corresponding time stamp for the PI point let439 from the Data Archive server named holden and places the time stamp in the column to the left of the value.

See also

Current Value function

Define functions manually

Guidelines for entering arguments manually

Retrieval of large amounts of data

Interpolated values

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