Basic instructions
8.2 Timer operations
S7-1200 Programmable controller
236 System Manual, V4.2, 09/2016, A5E02486680-AK
You use the timer instructions to create programmed time delays. The number of timers that
you can use in your user program is limited only by the amount of memory in the CPU. Each
timer uses a 16 byte IEC_Timer data type DB structure to store timer data that is specified at
the top of the box or coil instruction. STEP 7 automatically creates the DB when you insert
the instruction.
Table 8- 18 Timer instructions
IN:=_bool_in_,
PT:=_time_in_,
Q=>_bool_out_,
ET=>_time_out_);
The TP timer generates a pulse with a preset
width time.
IN:=_bool_in_,
PT:=_time_in_,
Q=>_bool_out_,
ET=>_time_out_);
The TON timer sets output Q to ON after a preset
time delay.
IN:=_bool_in_,
PT:=_time_in_,
Q=>_bool_out_,
ET=>_time_out_);
The TOF timer resets output Q to OFF after a
preset time delay.
IN:=_bool_in_,
R:=_bool_in_,
PT:=_time_in_,
Q=>_bool_out_,
ET=>_time_out_);
The TONR timer sets output Q to ON after a pre-
set time delay.
Elapsed time is accumulated over
multiple timing periods until the R input is used to
reset the elapsed time.
FBD only:
PT:=_time_in_,
TIMER:=_iec_timer_in_);
The PT (Preset timer) coil loads a new PRESET
time value in the specified IEC_Timer.
FBD only:
_iec_timer_in_);
The RT (Reset timer) coil resets the specified
IEC_Timer.
STEP 7 automatically creates the DB when you insert the instruction.
2
In the SCL examples, "IEC_Timer_0_DB" is the name of the instance DB.