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)

TagMin

  • Last UpdatedJan 11, 2023
  • 2 minute read

Find the time-weighted or event-weighted minimum value of an attribute during a specified time range. Time-weighted values are interpolated at time boundaries when possible and extrapolated otherwise.

Syntax

TagMin(attname, starttime, endtime [, pctgood, calculationBasis])

Arguments

  • attname

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

  • 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

  • pctgood

    Optional. Time-weighted or event-weighted minimum time percentage over a specified time range for which the attribute had good values

    calculationBasis

    Optional. A string indicating the type of calculation to be performed enclosed in double quotes. Choose between "TimeWeighted" or "EventWeighted". If omitted, the default is time-weighted

Returns

The time-weighted or event-weighted minimum value for the attribute during the specified time range. Time-weighted values are interpolated at time boundaries when possible and extrapolated otherwise

Exceptions

If no good attribute values exist or if the pctgood minimum is not reached for the specified time range, an error value is returned

Notes

  • Bad values are excluded from TagMin calculation

  • In order to configure an optional parameter, any previous optional parameter must be specified

    Note: If the attribute has very few good values during the time range, this function's result may not be trustworthy. Use the PctGood function to find out what percentage of the values is good

Example

  • TagMin('att1', 't', '+1h')

    [Return the time-weighted minimum value of 'att1' between 12:00 and 1:00am today]

  • TagMin('att1', '14-Dec-16', '15-Dec-16')

    [Return the time-weighted minimum value of 'att1' between 12:00am 12/14/2016 and 12:00am 12/15/2016]

  • TagMin('att1', 't', '+1h', 80)

    [Return the time-weighted minimum value of 'att1' between 12:00 and 1:00am today when at least 80% of the values were good. Return error when minimum pctgood is not reached]

  • TagMin('att1', 't', '+1h', 80, "EventWeighted")

    [Return the event-weighted minimum value of 'att1' between 12:00 and 1:00am today when at least 80% of the values were good. Return error when minimum pctgood is not reached.]

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