%MaxDif function


Function
The function returns the difference between the minimum and maximum values of given object for the time period elapsed.
Declaration
REAL %MaxDif(
   REAL in Arg, 
   INT in timeInt
   UNIVAL in trigger
 )

Parameters
Arg Variable which value increment / decrement is to be calculated.
timeInt Time interval [s] - calculation time depth.
trigger Object - a change of its value causes the function to be recalculated. Its type is optional.

Description
The function calculates the difference between minimum and maximum values within the time interval defined by the parameter timeInt.
Return value
If minimum value is written before maximum one - the function returns a positive difference, i.e. increment.
If maximum value is written before minimum one - the function returns a negative difference, i.e. decrement.
If the object values within the given interval are the same, i.e. the same object values at the moment of trigger change, the function returns the value of 0.
Napíšte komentár