Docsity

Timers And Counters-Digital Logic Design And Programming-Lecture Slides, Slides of Digital Logic Design and Programming

Partial preview of the text

Download Timers And Counters-Digital Logic Design And Programming-Lecture Slides and more Slides Digital Logic Design and Programming in PDF only on Docsity!

Timers And Counters^ ^ The^ preset^ value^

is^ stored^ in^ a^ presetregister, while the accumulated value is keptin an accumulated register.

^ Both of these registers are defined during theprogramming of the instruction. ^ Either the basic ladder format or the blockinstruction format can be used to implementtimers and counters

Timer Instructions^ ^ PLCs^ provide^ several

types^ of^ timer

instructions.  However,^ PLC^ manufacturers

may

provide^ different^

definitions^ for^ each

type of timer function offered.

Important Note^ ^ It is important to note that when PLCtimers^ replace^ hardwired

timers,^ they

replace^ the^ time-delay

contacts

associated with the timers, but not theinstantaneous^ contacts

that^ may^ be

available from a hardwired timer.

On-delay Energize Timer^ ^ An^ ON-delay^ energize^ timer

(TON)^ output^ instruction^ eitherprovides time delayed action or measures the duration for whichsome event occurs. ^ Once the rung has continuity, the timer begins counting time-based intervals (ticks)^ and counts down until the accumulatedtime equals the preset time. ^ When^ these^ two^ values^ are

equal,^ the^ timer^ energizes^

the output and closes the timed out contact associated with theoutput.  The^ timed^ contact^ can^ be^ used

throughout^ the^ program^ as either a normally open or normally closed contact.  If logic continuity is lost before the timer times out, the timerresets the accumulated register to zero.

Timing diagram for both typesof ON-delay timer instructions.

Off-delay Energize Timer^ ^ An OFF-delay energize timer (TOF) output instruction providestime delayed action.^ ^ If the control line rung does not have continuity, the timerbegins counting time-based intervals until the accumulated timevalue equals the programmed preset value.^ ^ When these values are equal, the timer energizes the outputand closes the timed-out contact associated with the output.^ ^ The^ timed^ contact^ can^ be

used^ throughout^ the^ program

as either a normally open or normally closed contact.  If^ logic^ continuity^ occurs^ before

the^ timer^ times^ out,^ the accumulated value resets to zero.

Timing diagrams for bothtypes of OFF-delay timers

Retentive On-delay Timer^ ^ A retentive ON-delay timer (RTO) output instruction is used ifthe timer’s accumulated value must be retained even if logiccontinuity or system power is lost.^ ^ If any rung path has logic continuity, the timer begins countingtime^ based^ intervals^ until^

the^ accumulated^ time^ equals

the preset value.  The accumulated register retains this accumulated value, even ifpower or logic continuity is lost before the timer has timed out.  When the accumulated time equals the preset time, the timerenergizes^ the^ output^ and^ turns

ON^ (closes)^ the^ timed-out contact associated with the output.  These timer contacts can be used throughout the program asnormally open or normally closed contacts.

Counter Instructions^ ^ Two basic types:^ ^ count up and count down.^ ^ Depending on the controller, the formatof these counters may vary.^ ^ Some^ PLCs^ use

the^ ladder^ format(output coil), while^ others^ usefunctional block format.

Counter Instructions