MaxInTime('Expression','Interval',' Reset=0')

Arguments

'Expression'

Measured value, for which the maximum is formed

'Interval'

Specification of the interval length in seconds, over which the maximum should be calculated.

'Reset'

Optional parameter (default = 0) to stop and restart the calculation

'Reset’ =0

Perform calculation

'Reset'=1

Stop calculation and set result to 0

'Reset'=2

Stop calculation and keep result

'Reset'=3

Calculate now and then stop calculation

Description

This function returns the maximum value of 'Expression' within each interval of the 'interval' length (in seconds) as its result.

Example

Effects of the 'Reset' parameter

Task description

The 'Reset' parameter should switch from 0 to 1, 2, or 3 in 5-second intervals in order to make the effects of the parameter visible.

Solution

Three If-queries relay, via a modulo function of the time, the value 0 and the values 1, 2, 3 in intervals of 5 seconds on the 'Reset' parameter of the MaxInTime function.