%MaxDif function


Function
The function returns the difference between the minimum and maximum values of the specified object for the time period elapsed.


Declaration
REAL %MaxDif(
   REAL in Arg, 
   INT in timeInt
   UNIVAL in trigger
 )
Parameters
ArgThe variable which value increment/decrement is to be calculated.
timeIntTime interval [s] - calculation time depth.
triggerObject - a change of its value causes the function to be recalculated. Its type is optional.
Description
The function calculates the difference between the minimum and maximum values within the time interval defined by the parameter timeInt.
Return value
If the minimum value is written before maximum one - the function returns a positive difference, i.e. increment.
If the 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