Chapter 13 Device Logic (Pawn)
13.2.2 Timer, date & time
13.2.2.1 Arrays with symbolic indices
TrM2M_DateTime
Detailed breakdown of the date and time
// year
Year specified relates to the 21st century, i.e. 14 refers to
//
the year 2014
// month
Month
// day
Day
// hour
Hours
// minute
Minutes
// second
Seconds
// DoW
Weekday (0 = Monday ... 6 = Sunday)
// timestamp
Time stamp (seconds since 31.12.1999)
// timestamp256 Fraction of the next started sec. (resolutions 1/256 sec.)
#define TrM2M_DateTime[ .year, .month, .day, .hour, .minute, .second, .DoW,
.timestamp, .timestamp256
]
13.2.2.2 Constants
Time basis flags
Control flags for the rM2M_SetDateTime() function
RM2M_DATETIME_LOCALTIME = 0b00000001, // transferred time in local time
13.2.2.3 Functions
native rM2M_GetTime(&hour=0, &minute=0, &second=0, timestamp=0);
If no time stamp was transferred (timestamp=0), the current system time (in UTC) is converted to
hours/minutes/seconds. Alternatively, the transferred time stamp is converted to
hours/minutes/seconds.
Parameter
Explanation
hour
Variable to store the hours - OPTIONAL
minute
Variable to store the minutes - OPTIONAL
second
Variable to store the seconds - OPTIONAL
timestamp
Time stamp that should be converted
= 0: The current system time (in UTC) is converted.
> 0: The transferred time stamp is converted.
(The time stamp must be specified in seconds since 31.12.1999.)
Explanation
Return value
l
timestamp = 0: Seconds since 31.12.1999 (current system time in UTC)
l
timestamp > 0: The transferred time stamp is returned.
Rev. 05
119
Summary of Contents for myDatalogEASY V3
Page 2: ......
Page 13: ...Chapter 2 Declaration of conformity Chapter 2 Declaration of conformity Rev 05 13 ...
Page 14: ......
Page 42: ......
Page 76: ......
Page 88: ......
Page 102: ......
Page 110: ......
Page 116: ......
Page 234: ......
Page 244: ......
Page 252: ......
Page 254: ......
Page 266: ......
Page 276: ......