RTS_SYSTIMEDATE (STRUCT) ¶ TYPE RTS_SYSTIMEDATE : STRUCT <description>Time and date in structured</description> InOut: Name Type Comment wYear UINT <element=”wYear” type=”IN”>Year (e.g. 2006)</element> wMonth UINT <element=”wMonth” type=”IN”>Month (1..12: January = 1, December = 12)</element> wDay UINT <element=”wDay” type=”IN”>Day of month (1..31)</element> wHour UINT <element=”wHour” type=”IN”>Hours after midnight (0..23)</element> wMinute UINT <element=”wMinute” type=”IN”>Minutes after hour (0..59)</element> wSecond UINT <element=”wSecond” type=”IN”>Seconds after minute (0..59)</element> wMilliseconds UINT <element=”wMilliseconds” type=”IN”>Milliseconds after second (0..999). Optional!</element> wDayOfWeek UINT <element=”wDayOfWeek” type=”IN”>Day of week (1..7: Monday = 1, Sunday = 7</element> wYday UINT <element=”wYday” type=”IN”>Day of year (1..365): January 1 = 1, December 31 = 364/365</element>
SYSTIMEDATE (ALIAS) ¶ TYPE SYSTIMEDATE : RTS_SYSTIMEDATE
Standard ¶ GVL (GVL) SysTimeRtcControl (Function) SysTimeRtcConvertDateToUtc (Function) SysTimeRtcConvertLocalToUtc (Function) SysTimeRtcConvertUtcToDate (Function) SysTimeRtcConvertUtcToLocal (Function) SysTimeRtcGet (Function) SysTimeRtcGetTimezone (Function) SysTimeRtcSet (Function) SysTimeRtcSetTimezone (Function) TimezoneInformation (Struct)
GVL (GVL) ¶ InOut: Scope Name Type Initial Comment Constant RTC_12HOURS DINT 0 <element=”RTC_12HOURS” type=”IN”>Control status HourMode: 12 hours mode</element> RTC_24HOURS DINT 1 <element=”RTC_24HOURS” type=”IN”>Control status HourMode: 24 hoursmode</element> RTC_BATTERY_FAILED DINT 0 <element=”RTC_BATTERY_FAILED” TYPE=”IN”>Battery state: Battery empty OR failed</element> RTC_BATTERY_OK DINT 1 <element=”RTC_BATTERY_OK” type=”IN”>Battery state: Battery Ok</element> RTC_CTRL_CHECKBATTERY DWORD 0 <element=”RTC_CTRL_CHECKBATTERY” TYPE=”IN”>Control status keys: Check the battery OF the RTC</element> RTC_CTRL_HOURMODE DWORD 1 <element=”RTC_CTRL_HOURMODE” type=”IN”>Control status keys: Check the hour mode of the RTC</element>
SysTimeRtcControl (FUN) ¶ FUNCTION SysTimeRtcControl : RTS_IEC_RESULT <description>Control the Rtc and read out hardware status information</description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysTimeRtcControl RTS_IEC_RESULT Input iControlTag DINT <param name=”iControl” type=”IN”>Control key. See corresponding category for detailed information</param> Inout pdiControlResult DINT <param name=”pdiControlResult” type=”OUT”>Control state. See category Control status for detailed information</param>
SysTimeRtcConvertDateToUtc (FUN) ¶ FUNCTION SysTimeRtcConvertDateToUtc : RTS_IEC_RESULT <description>Convert UTC in a structured format to timestamp in seconds</description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysTimeRtcConvertDateToUtc RTS_IEC_RESULT Inout pDate SYSTIMEDATE <param name=”pDate” type=”IN”>Pointer to structure format. See category for detailed information</param> pdwTimestampUtc DWORD <param name=”pdwTimestampUtc” type=”OUT”>Pointer to UTC time in seconds since 1.1.1970 00:00:00</param>
SysTimeRtcConvertLocalToUtc (FUN) ¶ FUNCTION SysTimeRtcConvertLocalToUtc : RTS_IEC_RESULT <description>*OBSOLETE*: Only for backward compatibility.</description> InOut: Scope Name Type Return SysTimeRtcConvertLocalToUtc RTS_IEC_RESULT Input dwTimestampLocal DWORD Inout pdwTimestampUtc DWORD
SysTimeRtcConvertUtcToDate (FUN) ¶ FUNCTION SysTimeRtcConvertUtcToDate : RTS_IEC_RESULT <description>Convert UTC timestamp in seconds to a structured format</description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysTimeRtcConvertUtcToDate RTS_IEC_RESULT Input dwTimestampUtc DWORD <param name=”dwTimestampUtc” type=”IN”>UTC time in seconds since 1.1.1970 00:00:00</param> Inout pDate SYSTIMEDATE <param name=”pDate” type=”OUT”>Pointer to structure format. See category for detailed information</param>
SysTimeRtcConvertUtcToLocal (FUN) ¶ FUNCTION SysTimeRtcConvertUtcToLocal : RTS_IEC_RESULT <description>*OBSOLETE*: Only for backward compatibility.</description> InOut: Scope Name Type Return SysTimeRtcConvertUtcToLocal RTS_IEC_RESULT Input dwTimestampUtc DWORD Inout pdwTimestampLocal DWORD
SysTimeRtcGet (FUN) ¶ FUNCTION SysTimeRtcGet : DWORD <description>Returns the curent Rtc (realtime clock) value in UTC. <p>UTC time: current coordinated universal time; has replaced the Greenwich Mean Time. The time zones are given as positive or negative deviation from UTC.: e.g. „UTC+1“ corresponds to the Central European Time (CET) and ”UTC+2” corresponds to the Central European Summer Time (CEST)</p> </description> <result><p>RESULT: Seconds since 1.1.1970 00:00:00 UTC</p></result> InOut: Scope Name Type Comment Return SysTimeRtcGet DWORD Inout pResult RTS_IEC_RESULT <param name=”pResult” type=”OUT”>Pointer to runtime system error code (see CmpErrors.library)</param>