SysTimeRtcConvertHighResToDate (FUN) ¶ FUNCTION SysTimeRtcConvertHighResToDate : RTS_IEC_RESULT <description>Convert a high resolution timestamp to a structure format. Time values are always UTC!</description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysTimeRtcConvertHighResToDate RTS_IEC_RESULT Inout pTimestamp SYSTIME <param name=”pTimestamp” type=”IN”>Milliseconds since 1.1.1970 00:00:000 UTC</param> pDate SYSTIMEDATE <param name=”pDate” type=”OUT”>Structure format</param>
SysTimeRtcConvertHighResToLocal (FUN) ¶ FUNCTION SysTimeRtcConvertHighResToLocal : RTS_IEC_RESULT <description> Convert a high resolution timestamp [UTC] to a structure format [Localtime] </description> <errorcode name=”RTS_RESULT Result” TYPE=”ERR_OK”>Timestamp can be converted</errorcode> <errorcode name=”RTS_RESULT Result” type=”ERR_FAILED”>Timestamp failed to convert</errorcode> <errorcode name=”RTS_RESULT Result” type=”ERR_NOTIMPLEMENTED”>Conversion is not available on the target</errorcode> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysTimeRtcConvertHighResToLocal RTS_IEC_RESULT Inout pTimestamp SYSTIME <param name=”pTimestamp” type=”IN”>Milliseconds since 1.1.1970 00:00:000 [UTC]</param> pDate SYSTIMEDATE <param name=”pDate” type=”OUT”>Structure format [Localtime]</param>
SysTimeRtcConvertLocalToHighRes (FUN) ¶ FUNCTION SysTimeRtcConvertLocalToHighRes : RTS_IEC_RESULT <description> This function converts the time given by time structure [Localtime] into a High Resolution Time of format SysTime [UTC]. </description> <errorcode name=”RTS_RESULT Result” TYPE=”ERR_OK”>DATE can be converted</errorcode> <errorcode name=”RTS_RESULT Result” type=”ERR_FAILED”>Date failed to convert</errorcode> <errorcode name=”RTS_RESULT Result” type=”ERR_NOTIMPLEMENTED”>Conversion is not available on the target</errorcode> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysTimeRtcConvertLocalToHighRes RTS_IEC_RESULT Inout pDate SYSTIMEDATE <param name=”pDate” type=”IN”>Structure format [Localtime]</param> pTimestamp SYSTIME <param name=”pTimestamp” type=”OUT”>Milliseconds since 1.1.1970 00:00:000 [UTC]</param>
SysTimeRtcHighResGet (FUN) ¶ FUNCTION SysTimeRtcHighResGet : RTS_IEC_RESULT <description>Returns the Rtc (realtime clock) value with a high resolution 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: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysTimeRtcHighResGet RTS_IEC_RESULT Inout pTimestamp SYSTIME <param name=”pTimestamp” type=”OUT”>Milliseconds since 1.1.1970 00:00:000 UTC</param>
SysTimeRtcHighResSet (FUN) ¶ FUNCTION SysTimeRtcHighResSet : RTS_IEC_RESULT <description>Set the Rtc (realtime clock) value with a high resolution.</description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysTimeRtcHighResSet RTS_IEC_RESULT Inout pTimestamp SYSTIME <param name=”pTimestamp” type=”OUT”>Milliseconds since 1.1.1970 00:00:000 UTC</param>
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>