Technical data

Appendix
27.8 Setting the Operating Behavior
Programming with STEP 7
682 Manual, 05/2010, A5E02789666-01
6. Switch the power back on. The CPU executes an automatic memory reset. After that, the CPU
is ready for operation.
27.8.3 Using the Clock Functions
All S7-300/S7-400 CPUs are equipped with a clock (real-time clock or software clock). The clock
can be used in the programmable controller both as clock master or clock slave with external
synchronization. The clock is required for Time-Of-Day interrupts and runtime meters.
Time Format
The clock always indicates the time (minimum resolution 1 s), date, and weekday. With some
CPUs it is also possible to indicate milliseconds (refer to the "S7-300 Programmable Controller,
Hardware and Installation" Manual and "S7-400, M7-400 Programmable Controllers Module
Specifications" Reference Manual).
Setting and Reading the Time
You set the time and date for the CPU clock by calling SFC0 SET_CLK in the user program or with
a menu option on the programming device to start the clock. Using SFC1 READ_CLK or a menu
option on the programming device, you can read the current date and time on the CPU.
Note
To prevent the time from being displayed differently on HMI systems, you should set winter time on
the CPU.
Assigning Parameters for the Clock
If more than one module equipped with a clock exists in a network, you must set parameters using
STEP 7 to specify which CPU functions as master and which as slave when the time is
synchronized. When setting these parameters, you also decide whether the time is synchronized
via the communication bus or via the multipoint interface and the intervals at which the time is
automatically synchronized.
Synchronizing the Time
To make sure that the time is the same on all modules in the network, the slave clocks are
synchronized by the system program at regular (selectable) intervals. You can transfer the date
and time from the master clock to the slave clocks using system function SFC48 SFC_RTCB.
Using a Runtime Meter
A runtime meter counts the operating hours of connected equipment or the total runtime hours of
the CPU.