You are on page 1of 21

ECT 464

Lecture 7
Timers
Sorrow looks back.
Worry looks around.
Faith looks up.

Let us fix our eyes on Jesus, the author and


perfecter of our faith, who for the joy set before
him endured the cross, scorning its shame, and
sat down at the right hand of the throne of God.
Hebrews 12:2
Timer Data File Elements

• EN – timer enabled
• TT – timer timing
• DN – done bit
• PRE – Preset value word
• ACC – Accumulated value word
Word values

• Accumulator Value – Number of clock


cycles that have occurred since the timer
was enabled.
• Preset Value – Value which the timer must
count up to until the PLC sets the done
bit.
• Values between 0 and 32,767
Time Base
• The timers have a time base by which
they are clocked.
• Valid Time Bases are:
– 1 second
– 0.1 seconds
– 0.01 seconds
Address Structure
• The Timer uses the typical element
addressing scheme.
• Examples:
– T4:0.ACC
– T11:33/DN
– T4:2/TT
– T12:4/EN
– T15:56.1/0 = T15:56.PRE/0
– T16:29.2/15 = T16:29.ACC/15
Timer On Delay (TON)

• Enable – Set whenever the input rung is


true
• Timer Timing – Set when enable is true
and accumulated value is less than the
preset value.
• Done – Set when the enable is true and
the accumulated value is greater than or
equal to the preset value.
Timer Off Delay (TOF)

• Enable – Set whenever the input rung is


true
• Timer Timing – Set when enable goes
false and accumulated value is less than
the preset value.
• Done – Set when the enable or timer
timing bit is true.
Retentive Timer (RTO)

• Enable – Set whenever the input rung is


true
• Timer Timing – Set when enable goes true
and accumulated value is less than the
preset value.
• Done – Set when the enable is true and
the accumulated value is greater than or
equal to the preset value. Does not reset
accumulated value when enable is false.
Timer Uses
• Use to count time
• Extend push button inputs
• Delay inputs
• Assembly line product control
Timer Examples
•On Delay: Output B comes on at a specific set time after
output A is turned on. When A is turned off, B goes off.
•Off Delay: Both A and B have been turned on at the
same time. Both are in operation. When A is turned off, B
remains on for a specific set time period before going off.
•Limited On Time: A and B go on at the same time. B
goes off after specific set time period, but A remains on.
•Repeat Cycling: An output pulses on and quickly off at a
constant preset time interval.
•One-Shot Operation: Output B goes on for a specified
time after output A is turned on. Output B will run for its
specified time interval even if A is turned off during the B
timing interval.
Timer Examples
•Alternate on and off of two outputs: Two alternately
flashing lights. The time for the two lights could be
different.

•Multiple On Delay: Two different events start at different


time intervals after an initial starting time reference point.

•Multiple Off Delay: Two different functions remain on for


two different time intervals after a process is turned off.

•Interval time within a cycle: We may require that an


output come on 7.5 seconds after system start up, remain
on for 4.5 seconds, and then go off and stay off.
Timer Example 1
On Delay: Output B comes on at a specific set time after
output A is turned on. When A is turned off, B goes off.
Timer Example 2
Off Delay: Both A and B have been turned on at the same
time. Both are in operation. When A is turned off, B
remains on for a specific set time period before going off.
Timer Example 3
Limited On Time: A and B go on at the same time. B
goes off after specific set time period, but A remains on.
Timer Example 4
Repeat Cycling: An output pulses on and quickly off at a
constant preset time interval.
Timer Example 5
One-Shot Operation: Output B goes on for a specified
time after output A is turned on. Output B will run for its
specified time interval even if A is turned off during the B
timing interval.
Timer Example 6
Alternate on and off of two outputs: Two alternately
flashing lights. The time for the two lights could be
different.
Timer Example 7
Multiple On Delay: Two different events start at different
time intervals after an initial starting time reference point.
Timer Example 8
Multiple Off Delay: Two different functions remain on for
two different time intervals after a process is turned off.
Timer Example 9
Interval time within a cycle: We may require that an
output come on 7.5 seconds after system start up, remain
on for 4.5 seconds, and then go off and stay off.

You might also like