Using Clock Memory and Timers Page 1 of 1
Using Clock Memory and Timers
Clock Memory
The clock memory is a memory byte that changes its binary state periodically at a pulsepause ratio of 1:1. You
select which memory byte is used on the CPU when you assign parameters for the clock memory using STEP
7.
Uses
You can use clock memory bytes in the user program, for example, to activate flashing lights or to trigger
periodic activities (for example, measuring an actual value).
Possible Frequencies
Each bit of the clock memory byte is assigned a frequency. The following table shows the assignment:
Bit of the Clock 7 6 5 4 3 2 1 0
Memory Byte
Period Duration (s) 2.0 1.6 1.0 0.8 0.5 0.4 0.2 0.1
Frequency (Hz) 0.5 0.625 1 1.25 2 2.5 5 10
Note
Clock memory bytes are not synchronous with the CPU cycle, in other words, in long
cycles, the state of the clock memory byte may change several times.
Timers
Timers are a memory area of the system memory. You specify the function of a timer in the user program (for
example, ondelay timer). The number of timers available depends on the CPU.
Note
l If you use more timers in your user program than the CPU permits, a
synchronous error is signaled and OB121 started.
l On the S7-300 (with the exception of the CPU 318), timers can be started and
updated simultaneously only in OB1 and OB100; in all other OBs timers can
only be started.
mk:@MSITStor[Link]\Program%20Files%20(x86)\Siemens\Step7\S7bin\[Link]::/Ver... 3/2/2018