56
IEC 1131-3 Timers It is not the intent of this course to cover all S7-200 instructions,
but timer instructions provide an opportunity to understand
some of the differences between the SIMATIC and IEC 1131-3
instruction sets.
The timers previously discussed were SIMATIC timers.
The IEC 1131-3 instruction set also includes three timers,
On-Delay Timer (TON),
Off-Delay Timer (TOF), and Pulse
Timer (TP). The same three resolutions (1 ms, 10, ms, and 100
ms) are available as for the SIMATIC timers, and the resolution
is determined by the timer number as shown in the following
illustration.
Timer Number Resolution Maximum Value
T32, T96 1 ms 32.767 seconds
T33 to T36, T97 to T100 10 ms 327.67 seconds
T37 to T63, T101 to T255 100 ms 3276.7 seconds
IEC 1131-3 Timers
On-Delay Timer Off-Delay Timer
Timer Number (T0 to T255)
IN
PT
TON
%Txxx
Q
ET
xxx ms
Elapsed
Time
Resolution
(1 ms, 10 ms, 100 ms)
IN
PT
TOF
%Txxx
Q
ET
xxx ms
IN
PT
TP
%Txxx
Q
ET
xxx ms
Pulse Timer
The On-Delay Timer (TON) begins timing when its enable input
(IN) turns on. When the elapsed time (ET) equals the preset
time (PT), the timer stops timing, and the output (Q) turns on.
The timer is reset, when IN turns off.
The Off-Delay Timer (TOF) output (Q) turns on immediately
when IN turns on. When IN turns off, the timer begins timing.
When ET equals PT, Q turns off. The elapsed time is maintained
until the next time IN turns on. If IN turns on before ET equals
PT, Q remains on.
The Pulse Timer (TP) generates pulses of a preset duration.
When IN turns on, Q turns on, and the timer begins timing.
When ET equals PT, Q turns off. The elapsed time is maintained
until IN turns off.