timer instructions overview instructions: use the page up and page down keys to navigate through...

40
Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation, close this

Upload: hillary-carson

Post on 23-Dec-2015

218 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

Timer Instructions Overview

Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation, close this window.

Page 2: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

Timer Applications

Delay motors from starting at the same time

Keep track of downtimeOpen a valve for a given time

(e.g.,10 seconds)Measure the cycle time of a process

Page 3: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

Practical ExamplesKeep track of total time required to

make a batch of a productTurn mixing motor off 2 minutes after

the switch is closedHold clamp on for 25 seconds after glue

is appliedOpen a valve 27 seconds after a switch

is turned on. If interrupted, the valve should close and the time be reset to 0.

Page 4: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

Categories of Timer Instructions

TON (Timer on delay)Timer remains true for a preset time interval

TOF (Timer off delay)Timer remains false for a preset time

interval

RTO (Retentive timer on delay)Timer remains on for a preset time interval

Page 5: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

Parts of a Timer Instruction

Word 0: Control word Enable bit(.EN) -- is set when the rung is

true Timer Done Bit (.DN)-- changes state

when accumulated value reaches a preset value

Timer Timing bit (.TT)-- is set while the timer is incrementing its accumulated value

Page 6: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

Parts of a Timer Instruction (cont.)

Word 1: Preset Value (.PRE) the value the timer must reach before the

controller sets the DN bit. When ACC = PRE, the DN bit is set. PRE can be used to control an output device.

Word 2: Accumulated Value (.ACC) the time elapsed since the timer was last

reset. When ACC is enabled, the timer updates it continually.

Page 7: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

Parameters to Enter

Accumulated value (.ACC)Preset value (.PRE)Time base - the duration of each

time base unitDuration of timer = (preset value - accumulator value) * time base

Page 8: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TON Instruction

Page 9: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TON stands for...

TIMER DELAY ONTime delay period is from the instant

the rung goes TRUE until the DN bit is turned on

Page 10: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TON can be used to...

Create a short pulse at the beginning of a longer input condition;

Delay the start of a function for a defined period of time from the start of some other function

Page 11: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TON Ladder Diagram

Page 12: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TON operation

When the rung goes TRUE, the EN and TT bits go on.

When the accumulated value (ACC) reaches the preset value (PRE), TT bit goes off EN bit stays on DN bit turns on

Page 13: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TON operation (cont.)

When the rung goes from TRUE to FALSE and the accumulated value (ACC) is less than the preset value (PRE) EN and TT bits turn off Accumulated value is reset to 000

Timer reset instructions can be used to clear ACC

Page 14: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TON EN bit

Is set when rung conditions are TRUERemains set until rung conditions go

FALSE

Page 15: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TON TT bit

Is set when rung conditions are TRUE

AND ACC < PRE

Remains set until rung conditions go FALSE

Page 16: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TON DN bit

Is set when ACC = PRERemains set until rung conditions go

FALSE

Page 17: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

Worked Out Problems

Turn on L1 if sw1 is closed for 12 seconds.

When sw1 is closed, turn on motors 10, 11, and 12. Turn off motors 10, 11, and 12 at five-second intervals when sw1 is opened.

Page 18: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TOF Instruction

Page 19: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TOF stands for...

TIMER DELAY OFFTime delay period is from the instant

the rung goes TRUE to FALSE until the DN bit is turned off

Page 20: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TOF can be used to...

Create longer output functions derived from short input functions;

Generate a short pulse at the end of a long input function

Page 21: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TOF Timer Instruction

TOF instruction begins to count time base intervals when the rung makes a true-to-false transition.

As long as rung conditions remain false, the timer increments its accumulated value (ACC) each scan until it reaches the preset value (PRE).

The controller resets the accumulated value when rung conditions go true regardless of whether the timer has timed out

Sheng-Jen (“Tony”) Hsieh, Texas A&M University

Page 22: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

Using the TOF Status Bits

Sheng-Jen (“Tony”) Hsieh, Texas A&M University

Where, the bit is set means set to 1

Page 23: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TOF Ladder Diagram

Page 24: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TOF operation

When the rung goes TRUE, the EN and DN bits go on.

When the accumulated value (ACC) reaches the preset value (PRE), DN bit goes off AC is reset to 000

Page 25: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TOF operation (cont.)

When the rung goes from TRUE to FALSE and the accumulated value (ACC) is less than the preset value (PRE) DN bit stays on Timer begins to accumulate time for the

delay period TT bit goes on and stays on for preset time,

then resets

Timer reset instructions cannot be used to clear ACC

Page 26: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TOF EN bit

Is set when rung conditions are TRUERemains set until rung conditions go

FALSE

Page 27: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TOF TT bit

Is set when rung conditions are TRUE to FALSE

AND AC < PR

Remains set until rung conditions go TRUE again

Page 28: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

TOF DN bit

Is set when rung conditions are TRUEWhen rung conditions go from TRUE

to FALSE and ACC < PRE Remains set until

ACC = PRE

Page 29: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

RTO Instruction

Page 30: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

RTO stands for...

RETENTIVE TIMER DELAY ONSimilar to TONTime delay period is from the instant

the rung goes TRUE until the DN bit is turned on (like TON)

Page 31: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

RTO can be used for...

Maintenance functions;Diagnostic programs

Page 32: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

RTO Timer Instruction

Use the RTO instruction to turn an output on or off after its timer has been on for a preset time interval.

The RTO instruction is a retentive instruction that lets the timer stop and start without resetting the accumulated value (ACC).

Sheng-Jen (“Tony”) Hsieh, Texas A&M University

Page 33: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

Using the RTO Status Bits

Sheng-Jen (“Tony”) Hsieh, Texas A&M University

To reset the ACC value and status bits, you must program a reset (RES) instruction with the same address

Page 34: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

Timer: RTO

Page 35: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

RTO operation

(Like TON) When the rung goes TRUE, the EN and TT bits go on.

(Like TON) When the accumulated value (ACC) reaches the preset value (PRE), TT bit goes off EN bit stays on DN bit turns on

Page 36: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

RTO operation (cont.)

When the rung goes from TRUE to FALSE and the accumulated value (AC) is less than the preset value (PR) EN and TT bits turn off Accumulated value is NOT reset

Timer reset instructions must be used to clear AC

Page 37: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

RTO EN bit

(like TON) Is set when rung conditions are TRUE

(like TON) Remains set until rung conditions go FALSE

Page 38: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

RTO TT bit

(like TON) Is set when rung conditions are TRUE

AND AC < PR

(like TON) Remains set until rung conditions go FALSE

OR when the DN bit is set

Page 39: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

RTO DN bit

(like TON) Is set when AC => PRRemains set until the appropriate

RES instruction is enabled

Page 40: Timer Instructions Overview Instructions: Use the Page Up and Page Down keys to navigate through this presentation. When you are done viewing the presentation,

Close this window and then select items 4, 5, 6 TON, TOF, and RTOSimulation.