5. CONFIGURATION
5.8.1.1.1. GetDateAndTime
Figure 128: Date and Hour Reading
Input Parameters Type Description
DATEANDTIME
EXTENDED_DATE
_AND_TIME
This variable returns the value of
date and hour of RTC in the format
shown at Table 165.
Table 156: Input Parameters of GetDateAndTime
Output Parameters Type Description
GETDATEANDTIME RTC_STATUS
Returns the function error state, see
Table 167.
Table 157: Output Parameters of GetDateAndTime
Utilization example in ST language:
PROGRAM UserPrg
VAR
Result : RTC_STATUS;
DATEANDTIME : EXTENDED_DATE_AND_TIME;
xEnable : BOOL;
END_VAR
--------------------------------------------------------------------------
IF xEnable = TRUE THEN
Result := GetDateAndTime(DATEANDTIME);
xEnable := FALSE;
END_IF
5.8.1.1.2. GetTimeZone
The following function reads the Time Zone configuration, this function is directly related with time in Time Zone at SNTP
synchronism service:
Figure 129: Configuration Reading of Time Zone
218