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 2018)

InterpolatedValues

  • Last UpdatedJan 11, 2023
  • 2 minute read

Obtain interpolated values over a specified time range using the specified time step.

Syntax

InterpolatedValues(attname, starttime, endtime, timestep)

Arguments

  • attname

    attribute of time series data (such as PI point data reference) enclosed in single quotes

  • starttime

    a time expression representing the beginning of a time range enclosed in single quotes; can be a relative time (such as '-3h') in reference to an absolute endtime

  • endtime

    a time expression representing the end of a time range enclosed in single quotes; can be a relative time (such as '+1h') in reference to an absolute starttime

  • timestep

    a time interval enclosed in single quotes (such as '+1m' or '-10s') representing the incremental change in time between the specified range to obtain the interpolated values

Returns

An array of the values obtained within the specified range in intervals of the time step

Exceptions

If the attribute does not support range calls or interpolated values of range calls, the function returns an error indicating as such

Notes

  • If the starttime is earlier than the endtime, the resulting values will be in time-ascending order, otherwise they will be in time-descending order.

  • When a positive timestep is specified, the interval calculation begins at the earliest bounding time in the time range and applies the interval repeatedly in the time-ascending direction to generate the calculation intervals.

  • If a negative timestep is specified, the interval calculation begins at the latest bounding time in the time range and applies the interval repeatedly in the time-descending direction to generate the calculation intervals.

  • Note that the order of values returned will still be reflected by the time range, regardless of the timestep sign.

Example

  • InterpolatedValues('att1', 't', '+1h', '+10m')

    [Return the values of 'att1' between 12:00 and 1:00am today in 10-minute intervals]

  • InterpolatedValues('att1', 't', '+1h', '-14m')

    [Return the values of 'att1' between 12:00 and 1:00am today in 14-minute intervals, anchoring from 1:00am (that is, 12:04,12:18,12:32,12:46,1:00)]

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