5. CONFIGURATION
5.8.2.1. EXTENDED_DATE_AND_TIME
This structure is used to store the RTC date when used the function blocks for date reading/setting within milliseconds of
accuracy. It is described in the table below:
Structure Type Variable Description
BYTE byDayOfMonth Stores the day of the set date.
BYTE ByMonth Stores the month of the set date.
WORD wYear Stores the year of the set date.
EXTENDED_DATE_ BYTE byHours Stores the hour of the set date.
AND_TIME BYTE byMinutes Stores the minutes of the set date.
BYTE bySeconds Stores the seconds of the set date.
WORD wMilliseconds
Stores the milliseconds of the set
date.
Table 165: EXTENDED_DATE_AND_TIME
5.8.2.2. DAYS_OF_WEEK
This structure is used to store the day of week:
Enumerable Value Description
0 INVALID_DAY
1 SUNDAY
2 MONDAY
DAYS_OF_WEEK 3 TUESDAY
4 WEDNESDAY
5 THURSDAY
6 FRIDAY
7 SATURDAY
Table 166: DAYS_OF_WEEK Structure
5.8.2.3. RTC_STATUS
This enumerator is used to return the type of error in the RTC setting or reading and it is described in the table below:
Enumerator Value Description
NO_ERROR (0) There is no error.
UNKNOWN_COMMAND (1) Unknown command.
DEVICE_BUSY (2) Device is busy.
DEVICE_ERROR (3) Device with error.
ERROR_READING_OSF (4)
Error in the reading of the valid date
and hour flag.
ERROR_READING_RTC (5) Error in the date and hour reading.
RTC_STATUS ERROR_WRITING_RTC (6) Error in the date and hour writing.
ERROR_UPDATING_SYSTEM
_TIME (7)
Error in the update of the system’s
date and hour.
INTERNAL_ERROR (8) Internal error.
INVALID_TIME (9) Invalid date and hour.
INPUT_OUT_OF_RANGE
(10)
Out of the limit of valid date and
hour for the system.
223