6.13 Ob 150: Set/Read System Time - Siemens CPU 948 Programming Manual

Simatic s5 s5-155u
Table of Contents

Advertisement

OB 150: Set/Read System Time

6.13 OB 150: Set/Read System Time

Features of the
system time
Function
Parameters
Bit no.
15
word 1
word 2
Format
word 3
word 4
6 - 38
• • 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.
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.
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.
12
11
Seconds
Hours
Day of month
Year
8
7
4
Minutes
Weekday
Month
3
0
0
0
CPU 948 Programming Guide
C79000-G8576-C848-04

Advertisement

Table of Contents
loading

Table of Contents