4. Configuration
178
Figure 4-51. RTC Writing and Reading Function Blocks
Function Blocks and Functions for RTC Reading and Writing
Among other function blocks, there are four which are very important for clock reading
(GetDateAndTime and GetTimeZone) and for date/time settings (SetDateAndTime and
SetTimeZone). These functions always use the local time, ie, these functions take into account the
value set for the Time Zone.
Below are described the procedures used to configure the functions.
Functions for RTC Reading
GetDateAndTime
This function reads the date and time, with return in milliseconds.
Input and Output
Parameters
Type
Description
DATEANDTIME
EXTENDED_DATE_A
ND_TIME
Receives the date and time values with
milliseconds. See RTC Data Structure -
EXTENDED_DATE_AND_TIME
Table 4-121. Input and Output Parameters
Output Parameters
Type
Description
GetDateAndTime
RTC_CMD_STATUS
Returns the setting/reading result. See
RTC_CMD_STATUS.
Table 4-122. Output Parameters