Programming instructions
6.1 Basic instructions
Parameter
IN
R
PT
Q
ET
Timer data block
Parameter IN starts and stops the timers:
● The 0 to 1 transition of parameter IN starts timers TP, TON, and TONR.
● The 1 to 0 transition of parameter IN starts timer TOF.
The following table shows the effect of value changes in the PT and IN parameters.
Timer
TP
TON
TOF
TONR
TIME values
PT (preset time) and ET (elapsed time) values are stored in memory as signed double
integers that represent milliseconds of time. TIME data uses the T# identifier and can be
entered as a simple time unit "T#200ms" or as compound time units "T#2s_200ms".
Data type
TIME
Note
The negative range of the TIME data type shown above cannot be used with the timer
instructions. Negative PT (preset time) values are set to zero when the timer instruction is
executed. ET (elapsed time) is always a positive value.
100
Data type
Bool
Bool
Bool
Bool
Time
DB
Changes in the PT and IN parameters
Changing PT has no effect while the timer runs.
Changing IN has no effect while the timer runs.
Changing PT has no effect while the timer runs.
Changing IN to FALSE, while the timer runs, resets and stops the timer.
Changing PT has no effect while the timer runs.
Changing IN to TRUE, while the timer runs, resets and stops the timer.
Changing PT has no effect while the timer runs, but has an effect when the timer
resumes.
Changing IN to FALSE, while the timer runs, stops the timer but does not reset the
timer. Changing IN back to TRUE will cause the timer to start timing from the
accumulated time value.
Size
Valid number ranges
32 bits
T#-24d_20h_31m_23s_648ms to T#24d_20h_31m_23s_647ms
Stored as
-2,147,483,648 ms to +2,147,483,647 ms
Description
Enable timer input
Reset TONR elapsed time to zero
Preset time value input
Timer output
Elapsed time value output
Specify which timer to reset with the RT instruction
S7-1200 Programmable controller
System Manual, 11/2009, A5E02486680-02