StdDev_Sampled()

Format

StdDev_Sampled(Expr,StartTime[,EndTime])

Returns

Returns the standard deviation of the values of an expression over a range of time.

It is possible to retrieve very large volumes of data through indiscriminate use of this function. Retrieving large amounts of Historian data across a slow network can affect system performance for all users of the system.

Inputs

Expr: The expression whose values should be processed to find the standard deviation. Which values are processed will depend on how the expression is sampled.
Behaviour: Required
Dimension: Collection
Valid data types: Decimal, Duration, Integer

StartTime: The start time over which to produce the standard deviation.
Behaviour: Required
Dimension: Collection, SingleValue
Valid data types: DateTime, Decimal, Integer, String

EndTime: The end time over which to produce the standard deviation. If not specified, it assumes Time(), which will return a list of timestamps between the StartTime and EndTime parameters.
Behaviour: Optional 
Dimension: Collection, SingleValue
Valid data types: DateTime, Decimal, Integer, String

How to format data types

Examples

Expression: StdDev_Sampled(Expr, Time() - 60, Time())
Result: Standard deviation over the last minute (60 seconds)

Expression: StdDev_Sampled(Expr, Time() - 60)
Result: Standard deviation over the last minute (60 seconds)

Expression: StdDev_Sampled(Expr, Midnight(Time()))
Result: Standard deviation since midnight (the start of the day)

Expression: StdDev_Sampled({tag, sampleMethod = "Raw"}, Time() – 60)
Result: Standard deviation of the raw values over the last minute

Expression: StdDev_Sampled(Sampling(Expr, "raw"), Time() - 60)
Result: Standard deviation of the raw values over the last minute

Comments are closed