6 Programming Timers 2019
6 Programming Timers 2019
Presented by:
1
On-delay Timer (TON)
◼ The on-delay timer current
value is cleared when the
enabling input is OFF.
◼ The timer continues
counting after the Preset is
reached, and it stops
counting at a maximum
value of 32,767.
2
Timer Resolution
◼ The resolution (or time base) of a timer is the
unit of time used by the timer to time an event.
◼ A timer instruction times an event by counting
the number of times the resolution has occurred.
◼ For example, a TON with a resolution of 100 ms
counts the number of 100-ms intervals that
elapse after the TON is enabled: a count of 50
on a 100-ms timer represents 5 s.
◼ PT = time/resolution
Timer Resolution
◼ The SIMATIC timers are available in three
resolutions: 1 ms, 10 ms, and 100 ms.
◼ The timer number (Txx) determines the resolution of
the timer.
Timer Resolution Maximum Value Timer Number
Type
TON 1 ms 32.767 s T32, T96
(0.546 min)
10 ms 327.67 s T33 – T36,
(5.46 min) T97 – T100
100 ms 3276.7 s T37 – T63,
(54.6 min) T101 – T255
3
On-delay Timer Retentive
(TONR)
◼ Counts time when the
enabling input is ON.
◼ When the current value
is greater than or equal
to the Preset Time (PT),
the timer bit is ON.
4
TONR Resolution
5
Off-delay Timer (TOF)
◼ When the input turns OFF, the timer counts until
the elapsed time reaches the Preset Time (PT).
◼ When the Preset is reached, the timer bit turns
OFF and the current value stops counting.
6
TOF Resolution
Timer Resolution Maximum Value Timer Number
Type
TOF 1 ms 32.767 s T32, T96
(0.546 min)
10 ms 327.67 s T33 – T36,
(5.46 min) T97 – T100
100 ms 3276.7 s T37 – T63,
(54.6 min) T101 – T255
◼ You cannot share the same timer numbers for TOF and TON
◼ For example, you cannot have both a TON T32 and a TOF
T32.
Cascaded Timers
◼ Two or more timers connected such that when the first
times out, the second is started, when the second times
out, the third started, and so forth.
◼ The result is a set of signals that can be used to control a
timed sequence of events that is initiated by energizing
the first timer.
7
Flashers
◼ A flasher is a ladder network that continuously cycles ON
and OFF.
◼ The ON and OFF times can be unequal.
◼ Flashers are needed when it is desired to have a flashing
lamp, or some other event, occur at regular, timed
intervals.
8
S7-200 Built-in Flashers
◼ The ON and OFF times are fixed.
◼ If other ON and OFF times are desired, the programmer
must construct a custom flasher network in ladder logic.
◼ This is done using two cascaded timers that are
connected in regenerative fashion; that is, the first timer
enables the second, and the second disables the first.
Application Examples
1. Write and simulate a PLC program that will implement
the hardwired conveyor warning signal circuit shown.
9
Application Examples
2. Write and simulate a PLC program that will implement
the hardwired automatic sequence control system shown.
Application Examples
3. Write and simulate a PLC program that will implement
the hardwired time-delayed motor starting circuit shown.
10
Application Examples
4. Write and simulate a PLC program that will implement
the control of a set of traffic lights in one direction. The
timed sequence of the lights is:
◼ Red—30 s on
◼ Green—25 s on
◼ Amber—5 s on
Application Examples
5. When the lights are turned off in a building, an exit door
light is to remain on for an additional 2 min, and the
parking lot lights are to remain on for an additional 3 min
after the door light goes out. Write and simulate a
program to implement this process.
11
Design Problem
12