ON THIS PAGE:
Format
ContinuousSmall_Sampled(Expr ,ValueIndex ,StartTime [,EndTime] [,SampleMethod] [,SampleInterval])
Returns
Returns the nth smallest value at which an expression is held over a range of time.
Inputs
Expr: The expression whose values should be processed to find nth smallest value.
Behaviour: Required
Dimensions: Expression
Valid data types: Expression
ValueIndex: The zero-based ordinal (n) of the value to return, i.e. use zero to return the smallest value, use 1 to return the second smallest value, etc. If the ordinal is greater than the number of values then an error will be returned.
Behaviour: Required
Dimensions: SingleValue
Valid data types: Integer
StartTime: The start time over which to produce the nth smallest value. Note: You can use the Time() function to use a valid DateTime argument.
Behaviour: Required
Dimensions: Collection, SingleValue
Valid data types: DateTime, Decimal, Integer, String
EndTime: The end time over which to produce the nth smallest value. Note: If not specified, it assumes the current time. You can use the Time() function to use a valid DateTime argument.
Behaviour: Optional
Dimensions: Collection, SingleValue
Valid data types: DateTime, Decimal, Integer, String
SampleMethod: This optional parameter can be used to override the sample method which will be used for evaluating the expression (1st parameter).
Behaviour: Optional
Dimensions: SingleValue
Valid data types: String
SampleInterval: This optional parameter can be used to override the sample interval which will be used for evaluating the expression (1st parameter).
Behaviour: Optional
Dimensions: SingleValue
Valid data types: DateTime, Decimal, Integer, String
Examples
Expression: ContinuousSmall_Sampled(Expr, 0, Time() - 60, Time())
Result: Smallest value over the last minute (60 seconds).
Expression: ContinuousSmall_Sampled(Expr, 1, Time() - 60)
Result: Second smallest value over the last minute (60 seconds).
Expression: ContinuousSmall_Sampled(Expr, 2, Midnight(Time()))
Result: Third smallest value since midnight (the start of the day).
Expression: ContinuousSmall_Sampled({tag, sampleMethod = "Raw"}, 0, Time() – 60)
Result: Smallest of the raw values over the last minute.
Expression: ContinuousSmall_Sampled(Sampling(Expr, "raw"), 1, Time() - 60)
Result: Second smallest of the raw values over the last minute.
Expression: ContinuousSmall_Sampled(Expr, 2, Time() - 7200, Time(), 'LastKnownValue', 3600)
Result: Evaluates the expression using the last known value sample method and 1-hour sample interval and returns its third smallest value over the last 2 hours.
Release History
- ContinuousSmall_Sampled() 4.9.10
- Initial version