Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Time - property of the Pm object

Description:
System computer time
Syntax:
Date Time
Note:
Property access for read and write.
 
The time is with the precision of milliseconds (10 ms in OS Windows).

By this property the time can be even set up (if the permission for changing the time is set in OS Windows).
It is not recommended to set the time unnecessarily too often.
If the time change is greater than 5 seconds when its setting, then the PmaRoot.onTimeChange event is triggered.

This property is functional also in Macro expression $.expr and in the onDraw event of the PmgCanvas object.
This property is also functional in Web panels. For Web panels this property is read only.
Example1:
JavaScriptVBScriptSelect and copy to clipboard

var t = Pm.Time;
Example2:
Time shifting to 1 hour forward. At first the current time is read, then 1 hour is added to it (the Date data type is in fact a real number where the value 1.0 means 1 day) and the result is stored and thereby time on PC is changed.
JavaScriptVBScriptSelect and copy to clipboard

Pm.Time += 1.0 / 24.0;
PROMOTIC 9.0.16 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- LN2
- PI
- Pow
- Sin
- Tan
- Time
 
 
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice