Notes on real-time clock
The real-time clock is an optional function for AC500-eCo Basic processor modules (e.g. PM5012-x-ETH) and require a TA5131-RTC. All other AC500-eCo processor modules have an integrated real-time clock.
The real-time clock operates as a PC clock. It saves date and time to a DWORD in DT format (DATE AND TIME FORMAT), i.e., in seconds passed since the start time: 1 January 1970 at 00:00.
For AC500-eCo, Basic CPU with TA5131-RTC buffers the real-time clock for 7 days, and Standard/Pro CPU buffers the integrated real-time clock for 20 days. When the CPU is not powered over the buffering time, the real-time clock data will be cleared.
If a battery is connected and full, the real-time clock continues to run even if the control voltage is switched off.
If no battery is inserted or the battery is empty, the real-time clocks starts with a default start date. The default start date is in the range between the value 0 (1970-01-01, 00:00:00) and a later date and it can be different for each PLC model.
When switching on the control voltage, the system clock of the operating system is set to the value of the real-time clock. It is recommended to set the clock to the current date.
Real-time clock with PLC browser
The PLC browser/PLC shell commands date
and time
are used to set the real-time
clock.
The commands date
<ENTER> or time
<ENTER> display the current
date and time of the real-time clock.
The command:
date yyyy-mm-dd
<ENTER> (year-month-day)
sets the date.
The command:
time hh-mm-ss
<ENTER> (hours-minutes-seconds)
sets the time.
Example:
The real-time clock should be set to 22 February 2005, 16:50.
-
Enter the date:
date 2005-02-22<ENTER>
Display:
date 2005-02-22 Clock set to 2005-02-22 08:01:07
The time remains unchanged.
-
Enter the time:
time 16:50<ENTER>
Display:
time 16:50 Clock set to 2005-02-22 16:50:00
Real-time clock with user program
The following function blocks located in the folder "Realtime clock" of the system library ABB_ExtUtils_AC500.lib can be used to set and display the real-time clock (RTC) with help of the user program:
Function block |
Function |
---|---|
CLOCK “Library Manager ABB-AC500 Use Cases AC500 Utils PM<Version> (ABB) Function Blocks Realtime clock” |
Sets and displays the real-time clock with values for year, month, day, hours, minutes and seconds. Also the day of week is indicated (Mo=1, Tue=2, Wed=3, Thu=4, Fr=5, Sa=6, Su=0). Note: The week of day cannot be set. It is given by the real-time clock. The input DAY_SET is ignored. |
CLOCK_DT “Library Manager ABB-AC500 Use Cases AC500 Utils PM<Version> (ABB) Function Blocks Realtime clock” |
Sets and displays the real-time clock in DT format, for example DT#2005-02-17-17:15:00. |
Reference for function blocks, functions, structures etc.⮫ “Reference, function blocks”