Promotic

CompressType - property of the PmgTrendViewer object

Description:
Evaluation type for the data compression.
Syntax:
String CompressType
Values:
avg - Average. Calculated as the sum of all values divided by the number of these values.
avgweighted - Weighted average. Calculated as the sum of all values multiplied by their weight (the value has the heigher weight the longer it lasts) and this sum is divided by the whole length of of time span, by which the calculation is done.
min - Minimum. Returns the minimum value from the interval.
max - Maximum. Returns the maximum value from the interval.
minmax (default) - Minimum and maximum. Returns two values: the first is the minumum value from the interval and the second is the maximum value from the interval.
sum - Sum. Returns the sum of all values from the interval.
count - Count. Returns the count of all values from the interval.
first - First value. Returns the first value from the interval.
Note:
Property access for read and write. The default value of this property is defined in the "Recalculate type" configurator of this object.
 
This property is also functional in Web panels.
 
If the current range of the time axis (TimeMax - TimeMin) exceeds the value TimeZoomMinForCompress and the number of points stored by the trend server (by the PmaTrendGroup object) exceeds the value PointsMaxVisibleCount in this range, then the trend server provides the evaluation of values, and only the PointsMaxVisibleCount points are returned to the viewer calculated according to the selected method CompressType.
Example:
JavaScriptVBScriptSelect and copy to clipboard

var oTView = pMe.Items("../TrendView");

var sCompressType = oTView.CompressType;   // Reading from the property
oTView.CompressType = "minmax";   // Writing into the property
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.