You are on page 1of 22

Manufacturing Automation (MT 451)

Lecture 5

Dr. Syed Hammad Nazeer


Assistant Professor
Office: A Block, Faculty Room
Email: hammad@mail.au.edu.pk
Karnaugh Maps

• Given a Truth table it can be used to get a (Simple) Boolean Function


Karnaugh Maps – Example
Timers & Counters - Motivation

• Complex systems cannot be controlled by Combinational Logic alone

• A system can be Event driven, Time driven or a combination of both

• Basic events which need to catered for are (Event + Time based):
– Delays
– Count of Events
– Latch Or Unlatch (to turn something On or Off)

• Common theme in all these events are:


– How long? (Time based)
– How many? (Count of events)
Response of a Device in Event Driven Systems

• The response of a device to an event can be classified into following


two categories:
– Logical Response
– Event Response

• Consider the scenario when a push button is pressed, the device


responds in the following manner:
Latches

• Latch & Unlatch:


– It can be considered as a sticky switch when it is turned on it remains ON
– It must be pulled (unlatched) to turn it off
– Different instructions are used to Latch & Unlatch the variables
Example

• These scan times are just an example to clarify things and don’t depict the actual
scan times of a PLC
An Actual Timing Diagram

• Real timing diagram for the Scenario mentioned before


Another Example
Draw the Timing Diagram

• Draw the Timing diagram of corresponding outputs to the Inputs


Latches in case of Other Vendors

• Latch & Unlatch blocks are not used universally by all PLC vendors
• Siemens uses SR Flip flops to perform latching & unlatching
operations

• SR Flip Flop:

S R Action
0 0 No
Change
1 0 Q=1
0 1 Q=0
1 1 Not
Specified
Siemens
Timers

 Mainly used for providing delays in between sequences &


operations
 There are 4 different types of Timers:
– Off Delay Timers
Non Retentive
– On Delay Timers
– Retentive On timers
– Retentive Off timers

 Examples of Usage:
– Consider a garage light which should remain ON for 2 minutes before
turning off.
Off Delay Timers
 The timer turns ‘ON’ as soon as the input turns high
 Starts incrementing when the input has turned false and turns ‘OFF’
when a certain time has been achieved

 Examples:
– A garage light which should remain ON for 2 minutes before turning off.
– Consider a car whose ignition key has been turned off but the car
engine remain ‘ON’ for some time
– Cooling fans remain “ON” for some time after the oven has been turned
off
ON Delay Timers

 Starts incrementing when the input has becomes true and turns
‘ON’ when a certain time has been achieved
 It turns OFF immediately as the input turns OFF.

 Examples:
– Consider a car whose ignition key has been turned ON but the car
engine turns ON after some delay
– An On delay timer would allow an oven to reach a specific temperature
before starting production
Retentive Timers
• Retentive timers:
– They don’t lose their accumulated values once the enable input lines go
low
– They retain the accumulated value until the enable input lines goes high
again
– They function like stop watches. They can start and stop and retain their
current values until a reset button is pressed

• Non Retentive timers:


– The timer value goes to Zero once the enable input goes low
– Thus non retentive timers lose the accumulated value
Basic Similarities in Timers
• There are some basic common aspects in a Timer blocks made by
different PLC vendors:
– Timers will have a number to identify them (for example T7 in case of
Rockwell)
– Time Base:
• Timers can be programmed with different time basis, for example 1 second, 0.1
second and 0.01 second
• Example:
– If a timer has 0.1 second time base and the user entered 50 as the number of delay
increments then delay would be 5 seconds

– Preset Value:
• The preset value is the number of increments the timer has to count before it
changes it output. 50 is the preset value in the previous case

– Accumulated Value:
• It refers to the current increment the timer has reached during its operation
Rockwell Timers

• On Delay Timer:
– It starts accumulating when the rung
becomes true and continues until the
preset value becomes equal to the accumulated value or the rung
goes false
– Basic Symbol used is T and the file number is 4 (T4).

• Status Bits Usage:


– Enable Bit (EN): It turns on immediately when the rung goes true and
remains set until the rung goes false or timer is reset
– Timing Bit (TT): It remains true when the rung goes true or
accumulated value is less then preset value
– Done Bit (DN): It is set when the accumulated value equals the preset
value
Example of On Delay Timer

• The preset value is 4000ms, so delay of 4 seconds.


Addressing Special Bits

RsLogix 500 RsLogix 5000


Rockwell Timers

• Off Delay Timer:


– It starts accumulating when the rung
becomes False and continues until the
preset value becomes equal to the accumulated value or the rung
goes True

• Status Bits Usage:


– Enable Bit (EN): It turns on immediately when the rung goes true and
remains set until the rung goes false or timer is reset
– Timing Bit (TT): It remains true when the rung goes False and
accumulated value is less then preset value
– Done Bit (DN): It is set when rung becomes true and reset when
accumulated value is equal to preset value
Example of Off Delay Timer

• The preset value is 3500ms, so delay of 3.5 seconds.

You might also like