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.
Note |
|
|---|---|
|
The result of the MaxInTime function is displayed only in the subsequent interval. |
|
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.

|
Blue |
Measured value |
Yellow |
Continuous calculation without 'Reset' application |
|
Red |
('Reset' = 3) value is calculated before interruption, even within an interval (1) |
Green |
('Reset'= 2) value remains constant during interruption |
|
Purple |
('Reset' = 1) value=0 during interruption, even within an interval (1) |