ContinuousLarge_Sampled()

Format

ContinuousLarge_Sampled(Expr ,ValueIndex ,StartTime [,EndTime] [,SampleMethod] [,SampleInterval])

Returns

Returns the nth largest value at which an expression is held over a range of time.

Inputs

Expr: The expression whose values should be processed to find nth largest 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 largest value, use 1 to return the second largest 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 largest 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 largest 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: ContinuousLarge_Sampled(Expr, 0, Time() - 60, Time())
Result: Largest value over the last minute (60 seconds).

Expression: ContinuousLarge_Sampled(Expr, 1, Time() - 60)
Result: Second largest value over the last minute (60 seconds).

Expression: ContinuousLarge_Sampled(Expr, 2, Midnight(Time()))
Result: Third largest value since midnight (the start of the day).

Expression: ContinuousLarge_Sampled({tag, sampleMethod = "Raw"}, 0, Time() – 60)
Result: Largest of the raw values over the last minute.

Expression: ContinuousLarge_Sampled(Sampling(Expr, "raw"), 1, Time() - 60)
Result: Second largest of the raw values over the last minute.

Expression: ContinuousLarge_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 largest value over the last 2 hours.

Release History

  • ContinuousLarge_Sampled() 4.9.10
    • Initial version

Comments are closed