tvPoints - Deatiled object description

See: Object tvPoints

The tvPoints object holds the buffer of trend data points (one data point represents the time, value and attribute of a point). If the tvTrend object is connected to a data source by calling the tvTrend.Connect method, then the buffer is filled up automatically on each moving the time axis of the viewer or on calling the TrendsView.ReadData method.

The buffer of data points can be controlled - add, delete, overwrite data points by methods of this object. This is particularly useful if the tvTrend object is not connected to any data source (to a variable in the PmTrend object). Then it is possible, for example, by calling the AddPoints method, to fill up the buffer and it is also possible to do the filling by onReadData viewer event that is called each time the time axis is moved/zoomed.

Detects the points (times and values) field in the visible part of the viewer.
JavaScriptVBScriptSelect and copy to clipboard

var oTView = pMe.Acx;
var oPoints = oTView.Trends("t1").Points;
var aValues = oPoints.GetValueArray("visible");
var aTimes = oPoints.GetTimeArray("visible");

Let's have a tvTrend object (in the example it is the object with the identifier "t1") that is not connected to the data source. The buffer for displaying is filled up by methods.
JavaScriptVBScriptSelect and copy to clipboard

var tNow = Pm.Time;
var oTView = pMe.Acx;
var oPoints = oTView.Trends("t1").Points;
var vTimes = Pm.CreatePmArray().Array1(tNow-3/24, tNow-2/24, tNow-1/24, tNow);
var vValues = Pm.CreatePmArray().Array1(34, 56.6, 13.3, 98);
oTView.TimeSetType = 1;
oPoints.AddPoints(vTimes, vValues, 0, 1);
PROMOTIC 8.3.30 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