Promotic
WikipediaLinkedInYoutubeTwitterFacebook

How to work with time in the PROMOTIC system

In the PROMOTIC system, the Date data type is used internally. The auxiliary PmDateObject object can also be used.
 
PmDate - date and time in the PROMOTIC internal numeric form - (Date data type) is used internally in the PROMOTIC system, and also in the scripting interface of the Pma objects. Because it is a simple numeric value, it can be easily used in scripts (read, write, save, transfer to other scripts, etc.). However, if it is necessary to execute more complicated operations with the date and time (time shifts, formatting for displaying, etc.), then it is handy to create an auxiliary PmDateObject object with the PmDate value.
 

JavaScript

Time in this language is in the PROMOTIC used as a real number of the Double type (the value represents the number of days since 30.12.1899).
 
The JavaScript language has its own Date() object, but it is not recommended to use in the PROMOTIC system.
 
The time operations follow:
- by methods of the Pm object (see Pm date and time methods)
- or by methods of the PmDateObject object (objekt lze vytvořit by the Pm.CreatePmDateObject method).

VBScript

In order to work with date and time, the VBScript uses the Date data type, which is in fact a real number of the Double type (the value represents the number of days since 30.12.1899).
 
Date and time can be created by several ways, see Now, Date, Time. Notes for Date data type:, ...
 
The time operations follow:
- by VBScript functions (see VBScript date and time functions)
- by methods of the Pm object (see Pm date and time methods)
- or by methods of the PmDateObject object (objekt lze vytvořit by the Pm.CreatePmDateObject method).

Some other PROMOTIC methods using date and time

Pm.CreateDate - Creates date and time from its individual components
Pm.CreatePmDateObject - Creates the auxiliary object PmDateObject for working with date and time
Pm.FormatDate - Creates a text string containing date and time
Pm.GetDateOf - Returns dates from defined base date
Pm.IsDaylight - Test of the "daylight-saving time"
Pm.ScanDate - Obtains date and time from text value
Pm.Time - System time
PmaTrendGroup.GetTime - Returns requested time
PmaTrendGroup.CreateFilter - Creates the value of the filter range for next methods
PmaTrendGroup.RunTime - Save the current values with the specified time
PmaTrendGroup.GetValueByTime - Returns a value (or more values) of a variable (more variables) by the specified time
PmaTrendGroup.SetValueByTime - Writing the value (more values) of a variable (more variables) by the specified time.

History:
Pm8.02.00: Created
PROMOTIC 9.0.12 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
 
- SVG
- How to work with time in the PROMOTIC system
 
 
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice