Technical data
6.9 Setting/Reading the System Time (OB 150)
Characteristics of the
system time
•• The resolution is 10 ms for reading and 1 sec for setting.
•• Leap years are taken into account.
•• You can select between a 24 hour clock and a 12 hour clock, "am"
(midnight to twelve o’clock), and "pm" (twelve o’clock to
midnight),
•• The weekday can be specified
•• Input and output in BCD.
•• The integral hardware clock for the system time is backed up by
the battery in the PLC rack. If you have set the system time, it also
remains correct following a power down and WARM RESTART.
Function
Using OB 150, you can set or read the date and time of the CPU 928B
in your user program. The date and time are known as the "system
time".
Note
Before you can read out the system time, it must first be set.
Parameters
1. Data Field for the Time Parameters
When you set the system time, OB 150 takes the system time from a
data field, when you
read the system time, OB 150 transfers the
current data to the data field. You can set up this data field in a
data
block
or in one of the two flag areas (F or S flags).
The data field consists of four words.
1a)
Format of the data field for setting the hardware clock
15 12 11 8 7 4 3 0Bit no.
Seconds
Format Hours Minutes
Day of month Weekday
Year Month
0
0
1st word
2nd word
3rd word
4th word
Setting/Reading the System Time (OB 150)
CPU 928B Programming Guide
6 - 28 C79000-B8576-C898-01