12-7
Operator Panel OP3
Edition 11/99
12.3.3 Time and Date
The current time and date are stored by the S7 program in bytes n+15 to
n+17 and n+21 to n+24. This means that the OP3 can synchronize the time
and date with the S7.
Bytes n+15 to n+17 contain the current time of the S7 in BCD. The
illustration shows the structure of the data byte.
Hour (0 to 23)
n+15
Address
Minute (0 to 59)
n+16
n+17
Second (0 to 59)
0
7
Bytes n+21 to n+24 contain the current date of the S7 in BCD. The
illustration shows the structure of the data byte.
Day of week (1 to 7)
Day of month (1 to 31)
Month (1 to 12)
Year (0 to 99)
n+21
Address
n+22
n+23
0
7
n+24
Synchronization of the OP3 and the SIMATIC S7 is performed in three steps:
1. Every hour, the OP3 sets bit 2 in data byte n+0 to 1.
2. As soon as the S7 program resets the bit, the OP3 detects that the S7
program has stored up-to-date values for the time and date in the interface
area.
3. The OP3 reads the up-to-date data from data bytes n+15 to n+17 and
n+21 to n+24 of the interface area.
Purpose
Bytes
n+15 to n+17:
Time
Bytes
n+21 to n+24:
Date
Synchronization
with the S7
Communication