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

PI System Management Tools

StDev (Tag-based PE function)

  • Last UpdatedOct 04, 2024
  • 2 minute read

Find the time-weighted standard deviation of a point over a given time, according to values stored in the PI Archive.

Syntax

StDev(tagname, starttime, endtime [, pctgood])

Arguments

  • tagname: The name of the tag (point) whose standard deviation you want to calculate. This point must represent a continuous variable.

  • starttime: Must be a time expression representing the beginning of the time range to search.

  • endtime: Must be a time expression, greater than starttime; representing the end of the time range to search.

  • pctgood(optional): Minimum time percentage over the given time range, that the point's archived values must be good.

Returns

The point's time-weighted standard deviation over the given time.

Exceptions

If the point has no good values or the PctGood minimum is not reached for the given time range, returns an error value.

Notes:

  • If the point has few good Archive values during the time period, this function's result may not be trustworthy. Use the PctGood function to find out what percentage of the values is good.

  • The pctgood is ignored when it is passed as a string.

Examples

  1. Using relative time expressions:

    StDev('tag1', 'y', '*')

    StDev('tag1', '14-Dec-97', '+1d', 85)

    StDev('tag1', '14-Dec-97', '15-Dec-97')

    This calculates the standard deviation of 'tag1' from yesterday ('y') to the current time ('*').

  2. Using absolute and relative time expressions with a minimum percentage of good values:

    StDev('tag1', '14-Dec-97', '+1d', 85)

    This calculates the standard deviation of 'tag1' from December 14, 1997, to one day later ('+1d'), requiring at least 85% of the values to be good.

  3. Using absolute time expressions:

    StDev('tag1', '14-Dec-97', '15-Dec-97')

    This calculates the standard deviation of 'tag1' from December 14, 1997, to December 15, 1997.

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