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

Analytics and Notifications for PI System Explorer (PI Server 2024 R2)

PrevVal

  • Last UpdatedJan 11, 2023
  • 1 minute read

Find the last recorded value before a specified time.

Syntax

PrevVal(attname, t1)

Arguments

  • attname

    The name of an attribute, enclosed in single quotation marks

  • t1

    A time expression

Returns

The last recorded value before the specified time for the specified attribute

Exceptions

If there is no recorded value before the specified time, the function returns an error.

Example

  • PrevVal('att1', '*')

    [Find and return the last recorded value of 'att1' before current time]

  • PrevVal('att1', '15-Mar-17')

    [Find and return the last recorded value of 'att1' before start of day (12am) March 15th, 2017]

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