Basic instructions   
8.2 Timer operations 
  S7-1200 Programmable controller 
240  System Manual, V4.2, 09/2016, A5E02486680-AK 
: Generate OFF-delay 
The TOF timer resets output Q to OFF after a preset 
time delay. 
 
: Time accumulator 
The TONR timer sets output Q to ON after a preset time 
delay. Elapsed time is accumulated over multiple timing 
periods until the R input is used to reset the elapsed 
time. 
 
 
 
Note 
In the CPU, no dedicated resource is allocated to any specific timer instruction. Instead, 
each timer utilizes its own timer structure in DB memory and a continuously
-running internal 
CPU timer to perform timing. 
 
When a timer is started due to an edge change on the input of a TP, TON, TOF, or TONR 
instruction, the value of the continuously-running internal CPU timer is copied into the 
START member of the DB structure allocated for this timer instruction. This start value 
remains unchanged while the timer continues to run, and is used later each time the timer is 
updated. Each time the timer is started, a new start value is loaded into the timer structure 
from the internal CPU timer. 
When a timer is updated, the start value described above is subtracted from the current 
value of the internal CPU timer to determine the elapsed time. The elapsed time is then 
compared with the preset to determine the state of the timer Q bit. The ELAPSED and Q 
members are then updated in the DB structure allocated for this timer. Note that the elapsed 
time is clamped at the preset value (the timer does not continue to accumulate elapsed time 
after the preset is reached).