Promotic
WikipediaLinkedInYoutubeTwitterFacebook

GetValueByTime - method of object tvPoints

Description:
Search for value (more values) of data point according to specified parameters.
Syntax:
GetValueByTime(vTime As Variant, nStyle As Variant, nCount As Long) As Variant
Calling:
value = oPoints.GetValueByTime(vTime, nStyle, nCount)
Parameters:
vTime(Variant) Time whereby the data points have to be searched

The time is expected according to setting the TrendsView.TimeSetType property, i.e. "local time", "standard time" or "daylight-saving time".

nStyle(Variant) Type of the point specification owing to the vTime time
0 - The data point whose time is less or equal vTime, is searched
1 - The data point whose time is greater or equal vTime, is searched
2 - The data point that is the closest to the vTime time, is searched
nCount(Long) The number of the returned values.
1 - Returns one value of the data point
>1 - Returns nCount values in the array (not implemented in javascript)
Return Values:
The method returns the value (the array of values) of the found point or Empty if no point has been found.
See also:
Example1:
Time has to be entered in the "local time" (the "standard time" in the standard season and the "daylight-saving time" in the daylight-saving season.):
JavaScriptVBScriptSelect and copy to clipboard

var val, vTime;
var oTView = pMe.Acx;
var oPoints = oTView.Trends("t1").Points;

oTView.TimeSetType = 1;
vTime = "...";  //is "local time"
val = oPoints.GetValueByTime(vTime, 0, 1);
Example2:
Time has to be entered as the "standard time" even in the daylight-saving season:
JavaScriptVBScriptSelect and copy to clipboard

oTView.TimeSetType = 2;
vTime = "...";  //is "standard time"
val = oPoints.GetValueByTime(vTime, 0, 1);
PROMOTIC 8.3.24 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