Program instructions
7.2 Clock
S7-200 SMART
186 System Manual, V2.3, 07/2017, A5E03822230-AF
Format of 8 byte time buffer, beginning at byte address T
You must assign all date and time values in BCD format (for example, 16#12 for the year
2012). The BCD value range of 00 to 99 can assign years, in 2000 to 2099 range.
0 Year 00 to 99 (BCD value) Year 20xx: where xx is the two digit BCD value in
1 Month 01 to 12 (BCD value)
3 Hour 00 to 23 (BCD value)
7 Day of week Value ignored when written with the SET_RTC / TODW instruction.
Value reports correct day of week when read with the READ_RTC /
TODR instruction based upon current Year/Month/Day values.
1 to 7, 1 = Sunday, 7 = Saturday (BCD value)
Extended power outage effect on the CPU clock
See the S7-200 SMART system manual appendix A CPU specifications, for how long the
real-time clock can maintain the correct time during power outages.
A CPU initializes with the time values shown in the following table, after an extended power
outage.
Note
Compact serial (CRs) CPU models do not have a RTC (Real-time Clock)
You can use the READ_RTC and SET_RTC instructions to set the year, date, and time
values in compact serial (CRs) CPU models, but the values will be lost on the next CPU
power off
-on cycle. On power-up, the date and time will initialize to January 1, 2000.