4. Configuration
179
Input and Output
Parameters
This variable present the reading of Time Zone
configuration.
Table 4-116. Input and Output Parameters of GetTimeZone
Returns the function error state, see Table
4-125.
Table 4-117. Output Parameters of GetTimeZone
Utilization example in ST language:
PROGRAM MainPrg
VAR
GetTimeZone_Status : RTC_STATUS;
TimeZone : TIMEZONESETTINGS;
xEnable : BOOL;
END_VAR
--------------------------------------------------------------------------
IF xEnable = TRUE THEN
GetTimeZone_Status := GetTimeZone(TimeZone);
xEnable := FALSE;
END_IF
GetDayOfWeek
GetDayOfWeek function is used to read the day of the week.
Figure 4-83. Day of Week Reading
Returns the day of the week, See Section
EXTENDED_DATE_AND_TIME
Table 4-118. Output Parameters of GetDayOfWeek
When called, the function will read the day of the week and fill the structure DAYS_OF_WEEK.
Utilization example in ST language:
PROGRAM MainPrg
VAR
DayOfWeek : DAYS_OF_WEEK;
END_VAR
--------------------------------------------------------------------------
DayOfWeek := GetDayOfWeek();
Function Blocks and Functions of RTC Writing and Configuration
The clock settings are made through function and function blocks as follows:
SetDateAndTime
SetDateAndTime function is used to write the settings on the clock.