timer indutrial automation

Post on 07-Jul-2016

228 views 1 download

description

industrial automation

Transcript of timer indutrial automation

Industrial Mechatronics Lecture # 6

Hammad Nazeer Office: B Block, Blue Faculty Room

Email: hammad@mail.au.edu.pk

Timers

Mainly used for providing delays in between sequences & operations

There are 4 different types of Timers:

– Off Delay Timers

– 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.

Non Retentive

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. • 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.

Retentive ON timer

• Similar to ON timer except that it retains its value.

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

• How can we use the timer after the cycle has completed?

Example

Example

• Consider the scenario in which a start button turns on the Heater

and the Stop button (normally closed) turns it off. Initially there is a

delay of 10 sec before the heater turns ‘ON’. After the heater is

turned ‘OFF’ the cooling fans remain ON for 5 minutes

Cascaded Timers

• The timers are connected to each other and thus are called

cascaded timers

• Each timer drives the other timer

• Mainly used when a single timer can’t provide the delay

required

Timers of other PLC Vendors

• GE FANUC TIMERS & CONTACTS:

• There are of the following basic types:

• ONDTR (On delay timer) Retentive timer

• OFDT (Off delay timer) Retentive timer

• TMR (On delay timer) Non retentive timer

• Contact addressing in GE FANUC:

• %I represents inputs %I0005 represents real input 5

• %Q represents outputs %Q0003 represents real output 3

• %R represents system registers

• %AI Analog Inputs

• %AQ Analog Outputs

ONDTR

TB

Time

Base R

PV

%R0001

Enable Input Output ONDTR

TB

R

PV

%R0001

Enable Input Output

Time

Base

ONDTR

TB

R

PV

%R0001

Enable Input Output ONDTR

TB

R

PV

%R0001

Enable Input ONDTR

TB

R

PV

%R0001

Enable Input ONDTR

TB

R

PV

%R0001

Enable Input Output

Time

Base

ONDTR

TB

R

PV

%R0001

Enable Input ONDTR

TB

R

PV

%R0001

Enable Input ONDTR

TB

R

PV

%R0001

Enable Input Output

Timers of other PLC Vendors • Gould Modicon Timers & Contacts:

• The figure shows a Non retentive Gould

Modicon Timer.

• The delay can be calculated by multiplying the

preset value with the time base

• The Timer has two outputs, one which operates when the timer

accumulated value equals the preset value and the other output is

inverted

• Contact Addressing:

• 0 at the start represents outputs 0005 represents the 5th real

output

• 1 at the start represents inputs 1002 represents the 2nd real input

• 4 at the start represents Storage registers example 4004

Reset

Preset Value

Time Base

Storage Register

Enable Output

Output

Solve

Solve

Counters

• Counters are used in many important industrial applications

• Mainly used in Production lines where the items have to be counted

• When we are counting the number of products we might use a count up timer

• When we are counting the number of parts left we might use a count down timer

• The choice of counter to be used depends on the application

Operation of Counter

• There are different types of counters:

– Count up

– Count down

• They use a low to high transition for counting action

• Timers count time increments whereas counters count pulses on input lines

• Timer increments its value with each low to high transition and turns ‘ON’ when the accumulated value equals the preset value

• Counters are edge triggered devices and don’t accumulate when the level is remain high (level triggered)

Rockwell Automation Counters

• Rockwell Automation Counters – Use the filer number 5 for counters and the symbol C

– So counter values would be stored in C5:0

– Counters are retentive and a reset bit must be used to return the accumulated value to zero

• Counters have the following essential elements: – CU (Count Up bit)

– CD (Count Down bit)

– DN (Done bit)

– OV (Overflow bit)

– UN (Underflow bit)

– PRE (Preset value)

– ACC (Accumulated value)

Count Up Timers

• Count Up Timers (Retentive): – The accumulator (ACC) value increases

with every low to high transition

– The done bit (DN) is set when the accumulated value equals the preset value

– The over flow bit (OV) turns on when the counter value increases by 32,767. It then wraps around and starts counting from -32,768 (this is how 16 bit signed numbers are stored)

– The count up (CU) shows that the Counter has been enabled (it turns on when ever the rung condition goes true)

Example of Count Up Counter

• Contact B is used to Reset the counter

Example

• A count up (CU) Counter is used to remove the 6th Part of

every 11 parts that are detected and then resets the

counters

Count Down Counter

• Count Down Timers (Retentive): – The accumulator (ACC) value decreases

with every low to high transition

– The done bit (DN) is set when the accumulated value equals or greater then the preset value

– The over flow bit (OV) turns on when the counter value decreases by -32,768. It then wraps around and starts counting from 32,767

– The count down (CD) shows that the Counter has been enabled (it turns on when ever the rung condition goes true)

Example of Counters

• Count Up & Count Down Counters can have the same

registers

Cascading Counters

• What is happening here?

• When will the last counter done bit (DN) be set?

What is the output?

Counters from Other Vendors

• GE FANUC TIMERS:

• There are of the following basic types:

• UPCTR (Up counter) Retentive Counter

• DNCTR (Down Counter) Retentive Counter

• UPCTR:

• Every time the input turns “High” it increments the Counter value

by ‘1’ and if it is equal to the preset value, the counter turn ‘ON’

• The ‘R’ input is used to reset the counter

• DNCTR:

• Every time the input turns “High” it decrements the Counter value

by ‘1’ and if it is equal to the preset value, the counter turn ‘ON’

• The ‘R’ input is used to reset the counter

ONDTR

TB

R

PV

%R0001

Enable Input ONDTR

TB

R

PV

%R0001

Enable Input UPCTR

R

PV

%R0001

Enable Input Output

• Gould MODICON Counters:

– When the input pin transitions from

Low to high the counter increments the

Counter value

– The reset pin must be high for the counter to

Count

– The output value goes high when the input value equals the preset value

– The counter also provides an inverted output

Counters from Other Vendors

Reset

Preset Value

CTR

Storage Register

Enable Output

Output

Solve