Promotic

NetPutTime - method of the AtouchX object

Description:
Writes the new time to the station.
The method writes the new time (directly in the VBA format) to the station. The writing is done asynchronously, after the writing is finished the EndNetPutTime event is triggered, which announces the result of the communication. The Param value is also passed to the event, which is used by the user for identification.
 
A special case is the time 1/1/1980 0:00:00 (midnight). When this time is written, a so-called synchronization occurs, i.e. the current time and date are of the PC's is written.
Syntax:
Integer NetPutTime(Long Station, Variant Param, Date DataTime)
Parameters:
Station(Long) Number of the station to which the time is to be written.
Param(Variant) The value that is passed unchanged to the timeout event.
DataTime(Date) The value of the newly written time.
Return values:
Example:
JavaScriptVBScriptSelect and copy to clipboard

var oATC = pMe.Pm("/AtouchApp").Acx;
var nStation = 2;
var nParam = 100;
var DateTime = Pm.Time;
var nState = oATC.NetPutTime(nStation, nParam, DateTime);
PROMOTIC 9.0.23 SCADA system documentation MICROSYS, spol. s r.o.

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