Promotic

RunTime - method of the PmaTrendGroup object

Description:
Saving all current values on the "Data" tab with the specified time in the tTime parameter.
Syntax:
Boolean RunTime(Date tTime, Long nTimeType)
Parameters:
tTime(Date) Time of the written values
nTimeType(Long) Time type of the written values
1 - tTime is "local time" (the "standard time" in the standard season and the "daylight-saving time" in the daylight-saving season, corresponds to the computer time depending on the locale setting of Windows system)
2 - tTime is "standard time" (in the daylight-saving and standard season).
Return value:
true - If the record has been written successfully
false - Otherwise
Note:
For calling the method with the current time, see the Run method.
If the "Read only (new records cannot be written)" configurator is checked, then the method is not functional, i.e. it isn't possible to write into the trend archive.
By calling the method it is possible to do backward writing on setting of the "Storage type" configurator to Database MS SQL server cyclic or Database Access cyclic (it is possible to write even the records with the older time than the time of the last written record). If another type of setting then the two above mentioned, is set, then backward writing is not possible.
If the "Enable saving of variables on change" configurator is checked, then the variables storing is optimalized, i.e. each time this method is called there does not have to be a data saving.
Example:
JavaScriptVBScriptSelect and copy to clipboard

var oTrend = pMe.Pm("/Trends");
var time = pMe.Pm("/Data/#vars/time").Value;
oTrend.RunTime(time, 2);
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

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