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)

FindNE

  • Last UpdatedJan 11, 2023
  • 2 minute read

Find the first time within a time interval when an attribute is not equal to a specified value. "No Data" events will be skipped.

Syntax

FindNE(attname, starttime, endtime, x)

Arguments

  • attname

    The name of an attribute enclosed in single quotation marks

  • starttime

    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

    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

  • x

    The value to search for; must be an integer or real number or digital state (character string)

Returns

The timestamp closest to starttime, within the specified interval, for which the attribute was not equal to the specified value. "No Data" events will be skipped

Exceptions

If the attribute was always equal to the specified value, an error value is returned

Notes

  • If needed, interpolation is done between attribute values to determine when the attribute was not equal to the specified value

  • Interpolation occurs when:

    • the underlying PI point has step attribute turned off

    • there is no recorded value with the specified timestamp

  • The interpolated value will be based on the values before and after the timestamp

  • No value will be interpolated if the step attribute is turned on. In this case, the value of record will be that at the time of the event (if it exists) or the previously-recorded value

  • If endtime is earlier than starttime, the time interval is searched backwards

Example

  • FindNE('att1', '-1h', '*', 40)

    [Return the timestamp of the first time since an hour ago when ' att1' was not equal to 40]

  • FindNE('enum_att1', '30-March-17', '*', "On")

    [Return the timestamp of the first time since the start of day (12am) on March 30th, 2017 when enumeration value 'enum_att1' was not equal to "On"]

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