6.13 OB 150: Set/Read System Time
Features of the
system time
••
The system time is backed up by the battery in the PLC rack. If the
time is set, it therefore remains correct even following a power
failure.
••
The resolution is 10 ms for reading and 1 s for setting.
••
Leap years are taken into account.
••
Hours can be represented either using the 24 hour clock or the 12
hour clock "am" and "pm".
••
The weekday is specified.
••
Input and output is BCD coded.
Function
Using OB 150, you can set or read out the date and time of the CPU 948
in your user program. The date and time are known as the "system time".
Note
The system time is started (initially with a default value) after the
CPU is plugged in.
Parameters
1. Data field for the time parameters
When setting the system time, OB 150 reads in the values to be set
from a data field, when reading the time, OB 150 transfers the current
time 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 system time.
Bit no.
15
12
11
8
7
4
3
0
word 1
Seconds
0
word 2
Format
Hours
Minutes
word 3
Day of month
Weekday
0
word 4
Year
Month
OB 150: Set/Read System Time
CPU 948 Programming Guide
6 - 38
C79000-G8576-C848-04
Summary of Contents for CPU 948
Page 10: ...Contents CPU 948 Programming Guide 1 2 C79000 G8576 C848 04 ...
Page 32: ...Contents CPU 948 Programming Guide 2 2 C79000 G8576 C848 04 ...
Page 72: ...Data Blocks CPU 948 Programming Guide 2 42 C79000 G8576 C848 04 ...
Page 74: ...Contents CPU 948 Programming Guide 3 2 C79000 G8576 C848 04 ...
Page 154: ...Contents CPU 948 Programming Guide 4 2 C79000 G8576 C848 04 ...
Page 200: ...Contents CPU 948 Programming Guide 5 2 C79000 G8576 C848 04 ...
Page 308: ...Contents CPU 948 Programming Guide 7 2 C79000 G8576 C848 04 ...
Page 324: ...Examples of Parameter Assignment CPU 948 Programming Guide 7 18 C79000 G8576 C848 04 ...
Page 326: ...Contents CPU 948 Programming Guide 8 2 C79000 G8576 C848 04 ...
Page 370: ...Addressable System Data Area CPU 948 Programming Guide 8 46 C79000 G8576 C848 04 ...
Page 372: ...Contents CPU 948 Programming Guide 9 2 C79000 G8576 C848 04 ...
Page 486: ...Contents CPU 948 Programming Guide 11 2 C79000 G8576 C848 04 ...
Page 522: ...PG Functions via the S5 Bus CPU 948 Programming Guide 11 38 C79000 G8576 C848 04 ...
Page 524: ...Contents CPU 948 Programming Guide 12 2 C79000 G8576 C848 04 ...
Page 538: ...Contents CPU 948 Programming Guide 13 2 C79000 G8576 C848 04 ...
Page 546: ...List of Key Words CPU 948 Programming Guide Index 6 C79000 G8576 C848 04 ...