Timer Operations - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

Basic instructions

7.2 Timer operations

7.2
Timer operations
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 7- 18
Timer instructions
LAD / FBD boxes
LAD coils
FBD only:
FBD only:
STEP 7 automatically creates the DB when you insert the instruction.
1
In the SCL examples, "IEC_Timer_0_DB" is the name of the instance DB.
2
212
SCL
"IEC_Timer_0_DB".TP(
IN:=_bool_in_,
PT:=_time_in_,
Q=>_bool_out_,
ET=>_time_out_);
"IEC_Timer_0_DB".TON (
IN:=_bool_in_,
PT:=_time_in_,
Q=>_bool_out_,
ET=>_time_out_);
"IEC_Timer_0_DB".TOF (
IN:=_bool_in_,
PT:=_time_in_,
Q=>_bool_out_,
ET=>_time_out_);
"IEC_Timer_0_DB".TONR (
IN:=_bool_in_,
R:=_bool_in_
PT:=_time_in_,
Q=>_bool_out_,
ET=>_time_out_);
(No SCL equivalent)
(No SCL equivalent)
Description
The TP timer generates a pulse with a preset
width time.
The TON timer sets output Q to ON after a preset
time delay.
The TOF timer resets output Q to OFF after a
preset time delay.
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.
The PT (Preset timer) coil loads a new PRESET
time value in the specified IEC_Timer.
The RT (Reset timer) coil resets the specified
IEC_Timer.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG

Advertisement

Table of Contents
loading

Table of Contents