100BBasic instructions
7.2 Timers
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
171
LAD / FBD boxes
LAD coils
SCL
Description
"IEC_Timer_0_DB".TONR (
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
preset time delay.
Elapsed time is accumulated
over multiple timing periods until the R input is
used to reset the elapsed time.
FBD only:
(No SCL equivalent)
The PT (Preset timer) coil loads a new PRESET
time value in the specified IEC_Timer.
FBD only:
(No SCL equivalent)
The RT (Reset timer) coil resets the specified
IEC_Timer.
1
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.
Table 7- 18 Data types for the parameters
Parameter
Data type
Description
Box: IN
Coil: Power flow
Bool
TP, TON, and TONR:
Box: 0=Disable timer, 1=Enable timer
Coil: No power flow=Disable timer, Power flow=Enable timer
TOF:
Box: 0=Enable timer, 1=Disable timer
Coil: No power flow=Enable timer, Power flow=Disable timer
R
Bool
TONR box only:
0=No reset
1= Reset elapsed time and Q bit to 0
Box: PT
Coil: "PRESET_Tag"
Time
Timer box or coil: Preset time input
Box: Q
Coil: DBdata.Q
Bool
Timer box: Q box output or Q bit in the timer DB data
Timer coil: you can only address the Q bit in the timer DB data
Box: ET
Coil: DBdata.ET
Time
Timer box: ET (elapsed time) box output or ET time value in the timer DB
data
Timer coil: you can only address the ET time value in the timer DB data.