S5-95F
The Integral Real-Time Clock
10.2
Structure of the Clock Data Area
Convention:
You must store the location of the clock data area in DB1. To enable you to set the clock also in the
safety mode via the programmer, we recommend you to store the clock data area and the status
word in the parameter control DB.
For reasons of clarity, we assume on the following pages that the clock data area occupies data
words DW 0 to DW 21 in DB200 and that the status word occupies the data word DW 22.
Structure of the Clock Data Area
Data exchange between DB1 or the control program and the integral real-time clock is always
through the clock data area. The integral real-time clock stores current time, date and operating
hours counter values in the clock data area. DB1 and the control program store the settings for
prompt times and operating hours counter in the same data area. Figure 10-1 illustrates the
relationship between DB1 or the control program, the clock data area, and the integral real-time
clock.
Figure 10-1. Accessing the Clock Data Area
DB1/
Control
program
Clock data area
Integral real-
time clock
Current clock
time/data
(words 0 to 3)
Settings
clock time/date
(words 4 to 7)
Prompt time
(words 8 to 11)
Current operating
hours count
(words 12 to 14)
Settings operating
hours counter
(words 15 to 17)
Clock time/date of
the last switch from
RUN to STOP
(words 18 to 21)
Reading clock data
Transferring settings
The clock writes clock data
in the clock data area
The clock accepts the settings
from the clock data area
EWA 4NEB 812 6210-02
10-3