Ob121: Set/Read System Time - Siemens CPU 948 Programming Manual

Simatic s5 s5-155u
Table of Contents

Advertisement

OB 121: Set/Read System Time
6.2
OB 121: Set/Read System Time
Function
Parameters
6 - 8
With OB121 you can set or read the system time (date and time). This
function is compatible with the CPU 946/947.
1. Data field
Four words in the word-oriented memory area.
With the "set system time" function the area before the OB121 call
must be loaded with the time values to be set. The system program
checks these values to ensure they are logically correct.
With the "read system time" function, OB121 enters the current time
values in this area.
Structure of the data field
Bit no.
15
12 11
1st word
Sec. x 10
2ndword
Hour x 10
3rd word
Day x 10
4th word
Year x 10
Note
The structure of the data field corresponds to the structure of
system data RS 96 to RS 99 (current time).
Possible time values:
100th seconds:
0 to 9
10th seconds:
0 to 9
Seconds x 1:
0 to 9
Seconds x 10:
0 to 5
Minutes x 1:
0 to 9
Minutes x 10:
0 to 5
Hours x 1:
0 to 9
Hours x 10:
Bit no.
12 /13:
0 to 1 with 12 hour format
0 to 2 with 24 hour format
Bit no. 14:
0 = AM with 12 hour format
1 = PM
0 in 24 hour format
Bit no. 15:
0 = 12 hour format
1 = 24 hour format
9 8
Sec. x 1
10th Sec.
Hour x 1
Min. x 10
Day x 1
Weekday
Year x 1
Month x 10
"
"
CPU 948 Programming Guide
C79000-G8576-C848-04
4 3
0
100th Sec.
Min x 1
0
Month x 1

Advertisement

Table of Contents
loading

Table of Contents