Avg - method of object tvPoints

Returns the average value calculated from values according to the sFilter parameter. By the parameter is it possible, for example, to specify if the average value is calculated from the whole buffer or only from the visible part of the buffer.
Avg(sFilter As String) As Double
n = oPoints.Avg(sFilter)
sFilter(String) type of the calculation
all - the average is calculated from all values that are in the buffer
visible - the average is calculated only from the values that are in the moment of calling in the visible part of the buffer.
See also:
The example calculates the average value, minimum, maximum, summary and number of all points of the "t1" trend in the visible part of the viewer.
Dim oPoints, vAvg, vMin, vMax, vCount, vSum
Set oPoints = oTView.Trends("t1").Points
nAvg = oPoints.Avg("visible")
nMin = oPoints.Min("visible")
nMax = oPoints.Max("visible")
nSum = oPoints.Sum("visible")
nCount = oPoints.Count("visible")
PROMOTIC 8.3.19 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice