0% found this document useful (0 votes)
474 views25 pages

6-PLC Programming Timers

6-PLC programming Timers

Uploaded by

Vishal Gurunath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
474 views25 pages

6-PLC Programming Timers

6-PLC programming Timers

Uploaded by

Vishal Gurunath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 25
| Programming Timers Fie typo \ me Bun 7 ENTTON Worst [Preset value Word 2 [Accumulated valve Afier completing this chapter, you will be able to: The most commonly used PLC instruction, after coils and contacts, is the timer. This chapter Peers deals with how timers time intervals and the way Describe PLC timer instruction and differentiate in which they can control outputs. We discuss between a nonretentive and retentive timer the basic PLC on-delay timer function, as well as ‘Convert fundamental timer relay schematic diagrams 9 other timing functions derived from it, and typical PLC ladder logic programs industrial timing tasks. ‘Analyze and interpret typical PLC timer ladder logic programs Program the control of outputs using the timer instruction control bits Describe the operation of pneumatic on-delay and off- 131 7.1 Mechanical Timing Relays ‘There are very few industrial control systems that do not, need at least one or two timed functions. Mechanic: timing relays are used to delay the opening or closing of contacts for circuit control. The operation of a mechanical, timing relay is similar to that of a control relay, except that certain of its contacts are designed to operate at a preset, time interval, after the coil is energized or de-energized. ‘Typical types of mechanical and electronic timing relays, are shown in Figure 7-1, Timers allow a multitude of op- rations in a control circuit to be automatically started and, stopped at different time intervals Solle-state timing relay Pneumat Figure 7-1 Timing relays, Soar: Image Courtesy of Reckvel utoraten, Ie timing lay Plugin timing relay Figure 7-2 shows the construction of an on-delay pneu- matic (ait) timer, The time-delay function depends on the transfer of air through a restricted orifice. The time- delay period is adjusted by positioning the needle valve to vary the amount of otifice restriction, When the coil is energized, the timed contacts are delayed from open- ing or closing. However, when the coil is de-energized, the timed contacts return instantaneously to their normal, state. This particular pneumatic timer has instantaneous contacts in addition to timed contacts. The instantaneous, contacts change state as soon as the timer coil is powered while the delayed contacts change state at the end of the time delay. Instantaneous contacts are often used as hold- ing or sealing contacts in a control circuit. Mechanical timing relays provide time delay through ‘two arrangements. The first arrangement, on delay, pro- vides time delay when the relay coil is energized. The second arrangement, off delay, provides time delay when the relay coil is de-energized. Figure 7-3 illustrates the different relay symbols used for timed contacts. ‘The on-delay timer is sometimes referted to as DOE, which stands for delay on energize. The time delay of the ‘contacts begins once the timer is switched on; hence the term, on-delay timing, Figure 7-4 shows an on-delay timer circuit, that uses a normally open, timed closed (NOTC) contact. ‘The operation of the circuit can be summarized as follows: + With S1 initially open, TD coil is de-energized so ‘TDI contacts are open and light L1 will be off. operating cot ()) | —nomaty openterinats (HE) | — cmt cosea tomas HE) Time contol contacts | —nomaiy pen semnas (7) | —ormaty closed terninats (“A™) Time adjustment Figure 7-2 Pneumatic on-delay timer, 132 Chapter 7 Programming Timers ‘Oncdelay symbols Ofiedelay symbols od | Rae When clay is energize, there is atime delay in opening Figure 7-3 Timed contact symbols. ub > Timing diagram ‘os st | 22 | Input s0 on 1 output on wu jure 7-4 On-delay timer circuit that uses a normally ‘pen, timed closed (NOTC) contact. + When $1 is closed, TD coil is energized and the timing period starts. TD1 contacts are delayed from closing so L1 remains off + After the 10 s time-delay period has elapsed, TDI contacts close and LI is switched on. + When S1 is opened, TD coil is de-energized and ‘TDI contacts open instantly to switch L1 off. Figure 7-5 shows an on-delay timer circuit that uses a normally closed, timed open (NCTO) contact. The opera- tion of the circuit can be summarized as follows + With S1 initially open, TD coil is de-energized so TD1 contacts are closed and light L1 will be on. + When S1 is closed, TD coil is energized and the timing period starts. TD1 contacts are delayed from opening so LI remains on. + After the 10 s time-delay period has elapsed, TD1 contacts open and L1 is switched off + When S1 is opened, TD coil is de-energized and TDI contacts close instantly to switch Lion, 7 i ~ is Normally open, timed | Normal closed, times pen contact NOTO}, | closed contact NCTC) Contactisnormaly | Contactis normally openwhen relay cot! | closed wnen relay col lede-energized is de-energizea When relay ols energized, contact, closes instantly Wren relay coll is ‘energized, contact ‘pens instal osonorgee, there atime delay betore te contact opens. dovonergized, tere ‘2 Une delay boo contact closes. the Timing dog st ‘os. ee a Input u : spt ‘st oe re outst uy on Figure 7-5 On-delay timer circuit that uses a normally closed, timed open (NCTO) conzact. Figure 7-6 shows an off-delay timer circuit that uses a normally open, timed open (NOTO) contact. The opera- tion of the circuit can be summarized as follows + With S1 initially open, TD coil is de-energized so ‘TDI contacts are open and light L1 will be off. + When S1 is closed, TD coil is energized and TDI contacts close instantly to switch light L1 on. + When $1 is opened, TD coil is de-energized and the timing period starts. + After the 10 s time-delay period has elapsed, TDI contacts open to switch the light off. Timing dageam 0s 1 [22 (5) es Input u sD on 1 ° on output uy Figure 7-6 _Off-delay timer circuit that uses a normally ‘open, timed open (NOTO) contact. Programming Timers Chapter 7 133 u B st Timing diagram % bs os js .| ro Inout ‘Output 2 on Figure 7-7 _Off-delay timer cincuit that uses a normally closed, timed closed (NCTC) contact. Figure 7-7 shows an off-delay timer circuit that uses a normally closed, timed closed (NCTC) contact. The op- eration of the circuit ean be summarized as follows + With S1 initially open, TD coil is de-energized so TDI contacts are closed and light L.1 will be on. + When S1 is closed, TD coil is energized and TD1 contacts open instantly to switch Tight L1 off + When S1 is opened, TD coil is de-energized and the timing period starts, TDI contacts are delayed from closing so L1 remains off. + After the 10 s time-delay period has elapsed, TDI contacts close to switch the light on. 7.2 Timer Instructions PLC timers are instructions that provide the same fune- tions as on-delay and off-delay mechanical and electronic timing relays. All PLC timers are output instructions. PLC timers offer several advantages over their mechanical and electronic counterparts. These include the fact that: + The entire timing function occurs inside the controller. + Time settings can be easily changed, + The number of timers used in a circuit can be in- creased or decreased through the use of program ming changes rather than wiring changes. + Timer accuracy and repeatability are extremely ‘ause time delays are generated in the PLC In general, there are three different PLC timer types: the ‘on-delay timer (TON), off-delay timer (TOF), and retentive timer on (RTO). The most common is the on-delay timer, ‘which is the basic function. There are also many other tin ing configurations, all of which can be derived from one or more of the basic time-delay fmetions. Figure 7-8 shows the timer selection toolbar for the Allen-Bradley SLC 500 PLC and its associated RSLogix software. These timer ‘commands can be summarized as follows: TON (Timer On Delay)—Counts time-based inter vals when the instruction is true 134 Ghapter 7 Programming Timers lll nd a Go Figure 7-8 Timer selectian toolber TOF (Timer Off Delay)—Counts time-based inter vals when the instruction transitions from a true to false condition, RTO (Retentive Timer On)—Counts time-based intervals when the instruction is true and retains the accumulated value when the instruction goes false or when power cycle occurs. RES (Reset) value to zero, Resets a retentive timer’s accumulated Several quantities are associated with the timer instruction: + Time Base The time base of a timer is the unit of time used by a timer to time an event. A timer instruction times an event by counting the number of times the time base has occurred, Depending on the manufacturer and type of PLC, time base values can be in 1 ms (0,001 8), 10 ms (0.01 s), 100 ms (0.1 5), or 1 second intervals, For example, if a timer has a time base of I second and itis timing some- thing that is 5 seconds long, the PLC will wait until the time base has occurred 5 times before the timer times out. Conversely, if the PLC’s time base setting is 0.01 seconds, it will wait until the time base has ‘occurred 500 times before timing out. The smaller the time base, the better the accuracy of the timer. + Preset Value The preset value of a timer repre- sents the time duration for the timing circuit. Total timing interval ~ the preset value x time base. For example, fora timer with a preset value of 100 and atime base of 0.1s the time duration for the timer is: Total timing interval — 100 X 0.1 s = 10 seconds + Accumulated Value The accumulated value of the timer represents the amount of time that has elapsed from the moment the timing started. It keeps track of how many times the time base has ‘occurred since the timer instruction was initiated. Although each manufacturer may represent timers differently on the ladderlogic program, most timers operate ina similar manner. One of the first methods used depicts, the timer instruction as arelay coil similar to that of a me- chanical timing relay. Figure 7-9 shows a coil-formatted timer instruction Timer acaress Neh Determines ung continuity Type oftimer. pr: vy 1B ors Be: 000", / Time omcet Tire accumdated “ier reurentvae Timer preset value” Figure 7-3 Coilformatted timer instruction Timers are most often represented by boxes in ladder logic. Figure 7-10 illustrates a generic block format for a retentive timer that requires two input lines. Its operation, can be summarized as follows + The timer block has two input conditions associated with it, namely, the control and reset. + The control line controls the actual timing operation of the timer, Whenever this line is true or power is supplied to this input, the timer will time. Removal of power from the control line input halts the further timing of the timer. + The reset line resets the timer’s accumulated value to zer0, + Some manufacturers require that both the control and reset lines be true for the timer to time; removal of power from the reset input resets the timer to ero. + Other manufacturers’ PLCs require power flow for the control input only and no power flow on the reset input for the timer to operate, For this type of timer operation, the timer is reset whenever the reset input is tree, + The timer instruction block contains information pertaining to the operation of the timer, including the preset time, the time base of the timer, and the current or accumulated time. osostine {sos LZ een teste Figure 7-10 Block-formatted timer instruction, + All block-formatted timers provide at least one out- put signal from the timer. The timer continuously compares its current time with its preset time, and its output is false (logic 0) as long as the current time is less than the preset time, When the current time equals the preset time, the output changes to true (logic 1), 7.3 On-Delay Timer Instruction Most timers are output instructions that are conditioned, by input instructions. An on-delay timer is used when, you want to program a time delay before an instruction becomes truc. Figure 7-11 illustrates the principle of op- eration of an on-delay timer. Its operation can be summa- rized as follows: + The on-delay timer operates such that when the rung containing the timer is true, the timer time-out period commences, + The timed output becomes true sometime after the timer rung becomes true; hence, the timer is said to have an on-delay. + The length of the time delay can be adjusted by changing the preset value. + In addition, some PLCs allow the option of chang- ing the time base, or resolution, of the timer. As the time base you select becomes smaller, the accuracy of the timer increases. The Allen-Bradley SLC S00 timer file is file 4 (Figure 7-12). Each timer is composed of three 16-bit words, collectively called a timer element, There can be. Fats Rung consiton Timed period Ondlelay Timed duration wwe ‘Ontesie Fal Timed eutout bit oot Or tgieO) Figure 7-11 Principle of operation of an on-delay timer. Programming Timers Chapter 7 135 File ype Timer number T4:2 wun [ENTTON, Fle number Word 0 Wore 2 [Accumulated value Figure 7-12 SLC SOO timer fie ‘up to 256 timer elements, Addresses for timer file 4, timer element number 2 (14:2), are listed below. ‘TA = timer file 4 :2.= timer element number 2 (0-255 timer elements per file) ‘T4:20DN is the address for the done bit of the timer. ‘T4:2/17 is the address for the timer-timing bit of the timer. ‘T4:2/BN is the address for the enable bit of the timer, The control word uses the following three control bits: Enable (EN) bit—The enable bit is true (has a status of 1) whenever the timer instruction is true. When the timer instruction is false, the enable bit is false (has a status of 0). Timer-timing (TT) bit—The timer-timing bit is true whenever the accumulated value of the timer is chang- ing, which means the timer is timing. When the timer is not timing, the accumulated value is not changing, so the timer-timing bit is false. Done (DN) bit—The done bit changes state whenever the accumulated value reaches the preset value. Its state depends on the type of timer being used, ‘The preset value (PRE) word is the set point of the timer, that is, the value up to which the timer will time, ‘The preset word has a range of 0 through 32,767 and is, stored in binary form. The preset will not store a negative number. ‘The accumulated value (ACC) word is the value that in- ‘crements asthe timer is timing. The accumulated value will stop incrementing when its value reaches the preset value, ‘The timer instruction also requires that you enter atime base, which is either 1.0 or 0.01 s. The actual preset time interval is the time base multiplied by the value stored in the timer’s preset word. The actual accumulated time interval is the time base multiplied by the value stored in the timer’s accumulated word. 136 Ghapter 7 Programming Timers [TON TIMER ON DELAY Timer 140 |—@)— Thre bese 10 Preset sp ©) Accumulated oO. Figure 7-13. On-delay timer instruction Figure 7-13 shows an example of the on-delay timer in- struction used as part of the Allen-Bradley SLC 500 control- ler instruction sets, The information to be entered includes; Timer number—This number must come from the timer fle. In the example shown, the timer number is ‘74:0, which represents timer file 4, timer O in that file ‘The timer address must be unique for this timer and may not be used for any other timer. Time base—The time base (which is always expressed in seconds) may be either 1.0 or 0.01 s. In the example shown, the time base is 1.0 s Preset value—In the example shown, the preset value is 15. The timer preset value can range from 0 through 32,767. Accumulated value—In the example shown, the ac- cumulated value is 0. The timer’s accumulated value normally is entered as 0, although it is possible to center a value from 0 through 32,767. Regardless of the value that is preloaded, the timer value will become 0 whenever the timer is reset. ‘The timer instruction for the SLC 500 and ControlLogix 5000 processors operates in exactly the same manner. Figure 7-14 shows the timer selection toolbar, on-delay timer instruction, and expanded timer structure for @ ControlLogix controller. Inout ide ofrung TON fies onal] I] Timer : reset rhe Timer tag name: Example: Purp_Timer [ci : fname Data Type Silo | Descripion fEI—Pore- Ver —| Ter Deeriewe unr oer (Nebr Deeg PRE [ONT [Desa ier Deloyacc [ORT [Deca lorDeayEN | BOOL [Deca sMaorDeleyTT | BOOL [Deca toDeleyDNT | BOOL [Deca Figure 7-14 Controll.ogix timer instruction. + Logix processors use a tag name, such as Pump_ Motor, instead of a timer number. + This descriptive tag name makes it easier to know ‘what function the timer serves in the control system, + The time base is fixed at 0.001 s (1 ms). Therefore there is no parameter field. + The associated timer data (PRE, ACC, EN, TT, DN) are found within the expanded timer structure. ‘The on-delay timer (TON) is the most commonly used. timer. Figure 7-15 shows a PLC program that uses an on- delay timer. The operation of the program can be sum- ‘marized as follows: + The timer is activated by input switch A. Tier ON DELAY TON) =aeaTE on Tatas ue CerestoN) [0 aeurltng [90 eseotey —P ot Te ng BRETT —| 1 ut Cerestow [0 ecinsne —[We8 ease ore Pt Tined ox Tae range to sesame Cerestow) | fearing [0 easesrey — insncionome [Tatars sto fo ert Soest [5 a Table showing how each Dis flected during the program operat, + When input switch A is closed (true or set to 1), the processor starts timer T4:0 timing and sets the EN and TT bits to true or 1 + This turns ON outputs B and C + The accumulated value increases in one-second. time base intervals, + When the accumulated time equals the preset time (10 5), the DN bit is set to 1, output D is tumed ON, the TT bit is reset to 0 and output C is turned OFF. + As long as input switch A remains closed the EN bit is set to 1 and output B will be OD + input switch A is opened at any time before or after the timer has timed out, the accumulated time is automatically reset to 0 and output B is turned OFF + This timer configuration is termed nonretentive because any loss of continuity to the timer causes, the timer instruction to reset. + This timing operation is that of an on-delay timer because output D is switched on 10 s after the switch thas been actuated from the off to the on position. Figure 7-16 shows the timing diagram for the on- delay timer’s control bits. The sequence of operation is as follows: + The first true period of the timer rung shows the timer timing to 4 s and then going false. + The timer resets, and both the timer-timing bit and the enable bit go false. The accumulated value also resets to 0. ‘or the second true period input A remains true in excess of 10's Input Ladder logic program outauts ‘git TON Timer ‘Time bese Preset TIMER ON DELAY Accumulated B DN Figure 7-15 PLC an-elay timer program. Programming Timers Chapter 7 131 Input condition A on Timerenable bk or Timersiming bi Timersdone bit Timer accumulated value Figure 7-16 Timing diagram for an on-delay timer. + When the accumulated value reaches 10 s, the done bit (DN) goes from false to true and the timer- timing bit (TTT) goes from true to false. + When input A goes false, the timer instruction goes false and also resets, at which time the con- trol bits are all reset and the accumulated value resets t0 0. The timer table for an Allen-Bradley SLC 500 is shown in Figure 7-17. Addressing is done at three dif- ferent levels: the element level, the word level, and the bit level. The timer uses three words per element. Each clement consists of a control word, a preset word, and, an accumulated word. Each word has 16 bits, which are numbered from 0 to 15. When addressing to the bit, level, the address always refers to the bit within the word: EN = Bit 15 enable ‘TT = Bit 14 timer timing DN = Bit 13 done Timer Table Figure 7-17 SLC 500 timer table. 138 Chapter 7 Programming Timers ‘Timers may or may not have an instantaneous output (also known as the enable bit) signal associated with them. If an instantaneous output signal is required from a timer and it is not provided as part of the timer in- struction, an equivalent instantaneous contact instruc- tion can be programmed using an internally referenced relay coil. Figure 7-18 shows an application of this technique. The operation of the program can be sum- marized as follows: + According to the hardwired relay circuit diagram, coil Mis to be energized 5 s after the start pushbut- ton is pressed, + Contact TD-1 is the instantaneous contact, and con- tact TD-2 is the timed contact. + The ladder logic program shows that a contact i struction referenced to an internal relay is now used to operate the timer. + The instantaneous contact is referenced to the in- temal relay coil, whereas the time-delay contact is, referenced to the timer output coil Figure 7-19 shows an application for an on-delay timer that uses an NCTO contact. This circuit is used as a war- ing signal when moving equipment, such as a conveyor motor, is about to be started. The operation of the circuit can be summarized as follows: + According to the hardwired relay circuit diagram, coil CR is energized when the start pushbutton PBL is momentarily actuated, + Asa result, contact CR-1 closes to seal in CR coil, contact CR-2 closes to energize timer coil TD, and contact CR-3 closes to sound the horn. + Affier a 10-s time-delay period, timer contact TD-1 ‘opens to automatically switch the horn off. + The ladder logic program shows how an equivalent circuit could be programmed using a PLC, + The logic on the last rung is the same as the timer- timing bit and as such can be used with timers that do not have a timer-timing output. ‘Timers are often used as part of automatic sequenti control systems. Figure 7-20 shows how a series of mo- tors can be started automatically with only one start/stop control station, The operation of the circuit can be sum- marized as follows: + According to the relay ladder schematic, lube-oil pump motor starter coil MI is energized when the start pushbutton PB2 is momentarily actuated. + Asaresult, M1-1 control contact closes to seal in MIL, and the lube-oil pump motor starts. u Hordvired relay crcl Figure 7-18 Instantaneous contact instruction can be programmed using an internally referenced relay coil stort ra tL Stop 14 12 65) Ladder loge program hous vsenal | Opt ‘Sosa ‘sr a | saan | tere To if Te x PRS Tis vray cout Figure 7-19 Coneyor warring signal rout Stay fast b Ls « + a + 11 es pts Lada oi proton ou oN setup or Se ‘TMER ON DELAY a Timer 40 ‘o— Pat Time base 10 v0 Preset ‘8 reset Rccomdotee “0 BN uo 140 = pie Programming Timers Chapter 7 139 140 Hardwited relay eveut ul stor Stop Poe i tbe ol pressure switch) (55) Ladder logie program fey Lobe of pump motor oupas wots “ eae ™ a ls ou wk wy ‘P82 on ou Timer 140 Time base 10 L_@9 Prost s | -©) Accumulated ° 40 rr L c oN Figure 7-20 Automatic sequential contral system. When the lube-oil pump builds up sufficient oil pressure, the lube-oil pressure switch PSI closes. This in turn energizes coil M2 to start the main drive motor and energizes coil TD to begin the time- delay period. ‘After the preset time-delay period of 15 s, TD-1 con- tact closes to energize coil M3 and start the feed motor. The ladder logic program shows how an equivalent circuit could be programmed using a PLC. The en. able bit is used to seal in the timer so it continues Ghapter 7 Programming Timers to time until its preset value equals the accumulated value, The program sequence is reset by actuating the reset button, 7.4 Off-Delay Timer Instruction ‘The off-delay timer (TOF) operation will keep the output energized for a time period after the rung con- taining the timer has gone false. Figure 7-21 illustrates the programming of an off-delay timer that uses the SLC $00 TOF timer instruction. TOF starts timing when npr Ladder loge program ouput v0 bE uy Tor rey TIMER OFF DELAY @) st Timer 149 Time bose 10 $a Prect ‘8 CD Accumulated 0 T4310N loan stinpat TH enable BREN) False Times pero tse |~— _ordeiy —+| ‘ime duration Timed output Hue fogie) cone bi ON) False tonic) 074 sreot ait = accumu vate ———f Figure 7-24 Off-eley programmed timer the instruction goes from ON to OFF or from true to to 1, immediately turning on motors M1, M2, false. The operation of the circuit can be summarized and M3. as follows’ + If SW is then opened, logic continuity to all three + When the switch connected to input I:1/0 is first timers is lost and each timer begins counting. closed, timed output 0:2/1 is set to 1 immediately + Timer T4:1 times out after 5 s resetting its done bit, and the lamp is switched on, to zero to de-energize motor ML + If this switch is now opened, logic continuity is lost and the timer begins counting. + After 15 s, when the accumulated time equals the “Timer OFF DELAY (TOF) preset time, the output is reset to 0 and the lamp —_ a switches off. het on Timer Timing Bi (TT 0 + IF logic continuity is gained before the timer is timed ON Dene BRIDN) i out, the accumulated time is reset to 0. For this rea- =e son, this timer is also classified as nonretentive. fF Timer ting ae eal Done BF ON) + Figure 7-22 illustrates the use of an off-delay timer or ciao Yes instruction used to switch motors off sequentially at Enable BF END o 5 second intervals. The operation of the program can be Tae Tier Timing BROT 10. summarized as follows Sea 4 s x 8 ecumuating NO «Timer preset values for T'4:1, T4:2, and T4:3 are set Enable BEND 1 Timer preset values for T4:1, T4:2, and T4:3 « Instruction OFF Timer Timing BF (TT o for 5, 10, and 15 s, respectively. sir timed out Done BON) i + Closing the input switch SW immediately sets, ‘Accumulating | Reset the done bit of each of the three off-delay timers Table showing how each bite efeceg dsing the program operation Programming Timers Chapter 7 ™ Ladder loge program outputs ior i 3 m—O, feumulted sf 6) p—Tor ——————_ oF oe 4 fecmulted of o Z fermted sf 0 ree = ree . man = Figure 7-22 Program far switching mators off at 5 s intervals + Timer T4:2 times out 5 s later resetting its done bit to zero to de-energize motor M2. + Timer T4:3 times out 5 s later resetting its done bit {o zero to de-energize motor M3 Figure 7-23 shows a hardwired off-delay timer relay circuit with both instantaneous and timed contacts. The operation of the circuit can be summarized as follows ‘+ When power is first applied (limit switch LS open), ‘motor starter coil M1 is energized and the green pilot light is on. + At the same time, motor starter coil M2 is de~ energized, and the red pilot light is off + When limit switch LS closes, off-delay timer coil TD energizes. + Asa result, timed contact TD-1 opens to de- energize motor starter coil MI, timed contact TD-2 closes to energize motor starter coil M2, instanta- neous contact TD-3 opens to switch the green light off, and instantaneous contact TD-4 closes to switch the red light on. The circuit remains in this state as long as limit switch LS1 is closed. a2 Ghapter 7 Programming Timers + When limit switch LSI is opened, the off-delay timer coil TD de-energizes and the time-delay period is started. 4 ir Figure 7-23 Hardwired off-delay timer relay circuit with both instantaneous and timed contacts Inout Ladder ogi progam uous Figure 7-24 Equivalent lwo PLC program af the hardwired 4 “IMeR OFF DELAY 9 12 offdelay timer relay circuit Timer ran ° containing both instantaneous onist Time base 10 and timed contacts Preset, sf) ecumltes ° = oF T4I0N om T4y0N we <> R + Instar opens to switch the red light of. + After a 5-s time-delay period, timed contact TD-1 closes to energize motor starter MI, and timed con tact TD-2 opens to de-energize motor starter M2. gous contact TD-3 closes to switch the green light on, and instantaneous contact TD-4 Figure 7-24 shows an equivalent PLC program of the hardwired off-delay timer relay circuit containing both instantaneous and timed contacts. The timer instruction Ladder loge program caries out all of the functions of the original physical timer. Figure 7-25 shows a program that uses both the on- delay and the off-delay timer instruction. The process “Stop Start 145 (PSH Pump Inpats DN outst u Pump a Fume roy Pune selay a ma [jp tntzow peray Ho 4 Timer 149 Time base 10L@y Preset, 3 ost Accumulated 3 vas PSA) Pump tine (tor af =f] tier oFF bear en) oS, stow Timer vs] ¢ Time base 10 BS | | Pre ef Od Aecumuleted ° oP, Figure 7-25 Fluid pumping process. Programming Timers Chapter 7 13 involves pumping fluid from tank A to tank B. The opera- tion of the process can be summarized as follows: + Before starting, PS1 must be closed. ‘+ When the start button is pushed, the pump starts ‘The button can then be released and the pump con- tinues to operate ‘+ When the stop button is pushed, the pump stops, + PS2 and PS3 must be closed 5 s after the pump stars, If either PS2 or PS3 opens, the pump will shut off and will not be able to start again for another 14s. 7.5 Retentive Timer A retentive timer accumulates time whenever the device receives power, and it maintains the current time should power be removed from the device. When the timer ac- ‘cumulates time equal to its preset value, the contacts of the device change state. Loss of power to the timer after reach- ing its preset value does not affect the state of the contacts. ‘The retentive timer must be intentionally reset with a sepa- rate signal for the accumulated time to be reset and for the contacts of the device to return to its nonenergized stat. Figure 7-26 illustrates the action of a motor-driven, celectromechanical retentive timer used in some appliances. ‘The shaft-mounted cam is driven by a motor. Once power is applied, the motor starts turning the shaft and cam. The positioning of the lobes of the cam and the gear reduction, of the motor determine the time it takes for the motor to tum the cam far enough to activate the contacts. If power is removed from the motor, the shaft stops but does not reset. A PLC retentive timer is used when you want to retain accumulated time values through power loss or the change in the rung state from true to false. The PLC-programmed retentive on-delay timer (RTO) is programmed in a manner i | conoperts Figure 7-26 Electromechanical retentive timer. similar to the nonretentive on-delay timer (TON), with one major exception—a retentive timer reset (RES) instruction. Unlike the TON, the RTO will hold its accumulated value when the timer rung goes false and will continue timing where it left off when the timer rung goes true again. This timer must be accompanied by a timer reset instruction to reset the accumulated value of the timer to 0. The RES in- struction is the only automatic means of resetting the ac mulated value of a retentive timer. The RES instruction has the same address as the timer it is to reset. Whenever the RES instruction is true, both the timer accumulated value and the timer done bit (DN) are reset to 0. Figure 7-27 shows a PLC program for a retentive on-delay timer. The operation of the program can be summarized as follows: + The timer will start to time when time pushbutton PBL is closed, + Ifthe pushbutton is closed for 3 s and then opened for3 s, the timer accumulated value will remain at3s. + When the time pushbutton is closed again, the timer picks up the time at 3 s and continues timing, a es Ladser loge pes outpat reset a2, maa 82) ves ok Pg oe revenrweriwen on [ex] Fie 42 Theses 10 HGS Preset 3 Ped Acmuated 4a a Figure 7-27. Retentve ondlay timer program, 14 Ghapter 7 Programming Timers Time input PBI EN (enable) bit ot on, H Accumulated value | condition goes alse when input pushbutton PBtis opened Accumulated value owing bt 2 on PLoutput on. on | H Reset input PB2 on I o1234567890n2 ‘Time n seconds Figure 7-28 Retentive on-delay timer timing chart. + When the accumulated value (9) equals the preset value (9), the timer done bit T4:2/DN is set to | and the pilot light output PL is switched on, + Ifthe timing rung goes false, the timer will stop timing but will recommence timing for the stored accumulated value each time the rung goes true. + Whenever the momentary reset pushbutton is closed, the timer accumulated value is reset to 0 Figure 7-28 shows a timing chart for the retentive on- delay timer program. ‘The timing operation can be sum- marized as follows: + When the timing rung is tue (PB1 closed), the timer will commence timing. + When the reset PB2 is closed, the T4:2/DN bit is reset to 0 and turns the pilot light output off. The ac- cumulated value is also reset and held at zero until the reset pushbutton is opened. ‘The program drawn in Figure 7-29 illustrates a prac- tical application for an RTO. The purpose of the RTO timer is to detect whenever a piping system has sustained nuts Ladder og program oxtnat us 2 Reset a Y 965 rewvoma "| pg 10 jenrive mer on [EN Pressure Timer rat L_@nd) sate Preset 60 2 ‘ecumulated ° us ‘Ho a Figure 7-23. Retentive on-delay timer alarm program. Programming Timers Chapter 7 15 4 cumulative overpressure condition for 60s. At that point, a horn is sounded automatically to call attention, to the malfunction. When they are alerted, maintenance personnel can silence the alarm by switching the key switch $1 to the reset (contact closed) position. After the problem has been corrected, the alarm system can be reactivated by switching the key switch to open contact, position, Figure 7-30 shows a practical application that uses the on-delay, off-delay, and retentive on-delay instructions in the same program. In this industrial application, there is a machine with a large steel shaft supported by babbitted bearings. This shaft is coupled to a large electric motor. ‘The bearings need lubrication, which is supplied by an oil pump driven by a small electric motor. The operation of the program can be summarized as follows + To start the machine, the operator turns SW on, + Before the motor shaft starts to turn, the bearings are supplied with oil by the pump for 10 seconds. The bearings also receive oil when the machine is running. When the operator tums SW off to stop the machine, the oil pump continues to supply oil for 15s A retentive timer is used to track the total running time of the pump. When the total running time is 3 hours, the motor is shut down and a pilot ight is umed on to indicate that the filter and oil need to be changed, A reset button is provided to the filter and oil have been changed. Retentive timers do not have to be timed out com. pletely to be reset. Rather, such a timer can be reset at any time during its operation, Note that the reset input to the timer will override the control input of the timer even though the control input to the timer has logic continuity. [IEE Fe! re cumulated ro © Pump Off time. Om osw tor Pump ote @ iL timer o=F bey Le SReset Tmecese 10 Proe spd O Te Pump: “Motor Pump runing time Rr ar RETENTIVETIMER OW Timer 42 —EN) Tinevose 10 prose 10900 Con) Recamuintes "0 aN Figure 7-30 Bearing lubrication program. 146 Ghapter 7 Programming Timers 7.6 Cascading Timers When one timer’s output triggers another timer’s input, those timers are referred to as cascaded. Timers can be interconnected, or cascaded, to satisfy a number of logic control functions Figure 7-31 shows how three motors can be started automatically in sequence with a 20 s time delay between, stort Lt stop Pa? uz 203) Figure 7-34 Hardwired sequential time-delayed motor starting circuit. cach using two hardwired on-delay timers. The operation of the circuit can be summarized as follows: + Motor starter coil MI is energized when the ‘momentary start pushbutton PB2 is actuated. + Asa result, motor I starts, contact MI-1 closes to seal in MI, and timer coil TDI is energized to begin the first time-delay period. + After the preset time period of 20 s, TD1-1 contact closes to energize motor starter coil M2. + Asa result, motor 2 starts and timer coil TD2 is energized to begin the second time-delay period. + After the preset time period of 20 s, TD2-1 contact closes to energize motor starter coil M3, and so motor 3 starts Figure 7-32 shows an equivalent PLC program of the hardwired sequential time-delayed motor-starting circuit. Two programmed on-delay timers are cascaded together to obtain the same logic as the original hardwired timer relay circuit. Note that the output of timer T4:1 is used to control the input logic to timer 4:2. Reciprocating timers are defined as timing functions where the output of one timer is used to reset the input of a second timer, each resetting the other. ‘These types of timers are used in situations where a constant cycling Inputs Lode og prosrom outous pr pee om 4 stop Je o m1 stat ou = -ToN ——_____ = Mm TIMER ON DELAY OL Tomer ras en} wa. Preset 20 Accumulsted oN) aON a] TON [ta ON BELAY mer ra2 Gen) Preset 20 pe Accumuisted “Of (ON) 14210N 1 Figure 7-32 Equivalent PLC program of the sequentaltime-delayed motor-starting circuit. Programming Timers Chapter 7 “1 Inputs Lace loge u 146 TON: TIMER ON Preset Recumuatoe program oupuss OE es OD Ho» ° 14s TON. i TIMER ON Timer Time nase Prose OW Accumulate DELAY Tas 5 oy s ON Figure 7-33 Annunciator flasher of an output is required. For example, if a flashing light is required in the event of a control system failure, a pro- gram with reciprocating timers could be used to create the flashing output function Two timers can be interconnected to form an oscillator or reciprocating circuit. The oscillator logic is basically a timing circuit programmed to generate periodic output pulses of any duration. Figure 7-33, shows the program for an annunciator flasher circuit ‘Two internal timers form the oscillator cireuit, which generates a timed, pulsed output. The oscillator circuit, output is programmed in series with the alarm condi- tion. If the alarm condition (temperature, pressure, of limit switch) is true, the appropriate output indicating light will flash. Note that any number of alarm con- ditions could be programmed using the same flasher circuit At times you may require a time-delay period longer than the maximum preset time allowed for the single timer instruction of the PLC being used. When this is the case, the problem can be solved by simply cascading timers, as illustrated in Figure 7-34. The operation of the program can be summarized as follows: + The total time-delay period required is 42,000 148 Ghapter 7 Programming Timers program. The frst timer, 4:1, is programmed for a preset time of 30,000 s and begins timing when input SW is closed, When 4:1 completes its time-delay period 30,000 s later, the 'P4:1/DN bit will be set to 1 This in tum activates the second timer, T4:2, which is preset for the remaining 12,000 s of the total 42,000-s time delay. Once T4:2 reaches its preset time, the T4:2/DN bit will be set to 1, which switches on the output PL, the pilot light, to indicate the completion of the full, 42,000-s time delay. Opening input SW at any time will reset both timers, and switch output PL off A typical application for a PLC circuit combining both cascading and reciprocating functions would be the control of traffic signals. The ladder logic circuit of Figure 7-35 illustrates a control of a set of traffic lights in one direction. The operation of the program can be sum- marized as follows: + Transition from red light to green light to amber light is accomplished by the interconnection of the three TON timer instructions. vot Lads og rogram BW ton WER ON DELAY ‘ns rai © sw base "0 Braet 36800 GX) Aesmuated "8 mo swe on pear —_ HN ax | Tne 42 Tame base *0 ea Preset 2000 ©) Accimuted 8 naa au aN | Loader og prota tag -Ton——Bedtine, | ie Fre ower ovo Timer rao oN | timeoase “10 Prose 2-0) Tati tone tao Tow _sreenine Tem ON DELAY Tine Tea on | Timebese “10 Pres 25 Accimuea “0 Tey ton —Ambertine TER ON DELAY Timer Ta on | Tmebose 40 Prose : fAccimuea 0 NON ON igure 7-35 Control of traffic lights in one direction, outaut Figure 7-34 Cascading of timers for 12 anger time delays. + The input to timer T4:0 is controlled by the T4:2 done bit. + The input to timer T4:1 is controlled by the T4:0 done bit, + The input rung to timer T4:2 is controlled by the T421 done bit. + The timed sequence of the lights is Red—30 s on Green—25 son Amber—5 s on + The sequence then repeats itself. ‘The chart shown in Figure 7-36 shows the timed se- quence of the lights for two-directional control of traffic lights. Figure 7-37 shows the original traffic light program modified to include three more lights that control traffic flow in two directions, 95 ff 28 Figure 7-36 Timing chart for two-directional control of traffic lights, Programming Timers Chapter 7 149 Ladder logic program outputs 1p ToW Te on BELAY Tee ee an | Teese “I Prost bo fected 0 to TON TIER ON DELAY Ther BN | Timebose Preset ecomuated “0 ron TIER ON DENY Ter Ox | Timenase 40 Preset : muted 6 tow TIMER ON DEY Timer as Timevese “to Pest 8 Reamuoted “0 yo tao it ‘Noriout ya yaa Essie ate hts Green Northisouth Red — Eestvest Spy es Bt was | gn tn) 4f— => <2, oa) nO me | jas jp Amber re = Figure 7-37 Contral of traffic lights in uwa directions, 150 Chapter 7 Programming Timers Ci aa amu) Explain the difference between the timed and instantaneous contacts of a mechanical timing, Draw the symbol and explain the operation of each of the following timed contacts of a mechanical timing relay: a, On-delay timer—NOTC contact b. On-delay timer—NCTO contact ¢. Off-delay timer—NOTO contact, 4. Off-delay timer—NCTC contact, Name five pieces of information usually associated with a PLC timer instruction, ‘When is the output of a programmed timer energized? a, What are the two methods commonly used to represent a timer instruction within a PLC’s ladder logic program? b. Which method is preferred? Why? a, Explain the difference between the operation of ‘a nonretentive timer and that of a retentive timer. , Explain how the accumulated count of pro- ‘grammed retentive and nonretentive timers is reset to zero, 7. State three advantages of using programmed PLC timers over mechanical timing relays. 8. Fora TON timer: a, When is the enable bit of a timer instruction true? b. When is the tim tion true? ¢. When does the done bit of a timer change state? 9, Fora TOF timer: a. When is the enable bit of a timer instruction true? b, When is the timer-timing bit of a timer instruec- tion true? ¢. When does the done bit of a timer change state? timing bit of a timer instrue- 10. Explain what cach of the following quantities asso: ciated with a PLC timer instruction represents: a, Preset time b, Accumulated time ¢. Time base 11. State the method used to reset the accumulated time of each of the following: a. TON timer b. TOF timer ¢. RTO timer CHAPTER 7 PROBLEMS 1 ‘a, With reference to the relay schematic diagram in Figure 7-38, state the status of each light (on or off) after each of the following sequential events: I, Power is first applied and switch S1 is open. IL, Switch $1 has just closed. IIL. Switch $1 has been closed for 5's TV. Switch S1 has just opened. '. Switch $1 has been opened for 5 s. b, Design a PLC program and prepare a typical VO connection diagram and ladder logic program that will execute this hardwired control circuit correctly. Design a PLC program and prepare a typical /O connection diagram and ladder logic program that will correctly execute the hardwired relay control circuit shown in Figure 7-39, Study the ladder logic program in Figure 7-40 and answer the questions that follow: a. What type of timer has been programmed? 1b, What is the length of the time-delay period? Relay sehemate diagram Figure 7-38 Relay schematic diagram for Problem 1 Programming Timers Chapter 7 151 ur (cos) Figure 7-39 Herdwined relay control cirout for Problem 2. ‘¢. What is the value of the accumulated time when power is first applied? 4d. When does the timer start timing? ‘e. When does the timer stop timing and reset itself? £. When input LS1 is first closed, which rungs are true and which are false?” g. When input LS1 is first closed, state the status (on or off) of each output, 1h, When the timer’s accumulated value equals the pre- set value, which rungs are true and which are false? i, When the timer's accumulated value equals the preset value, state the status (on or off) of each output. 4. Suppose that rung 1 is true for 5 s and then power is lost. What will the accumulated value of the counter be when power is restored? Study the ladder logic program in Figure 7-41 and answer the questions that follow: ‘a, What type of timer has been programmed? b. What is the length of the time-delay period? ‘c. What is the value of the accumulated time when power is first applied? 4d. When does the timer start timing? ‘e. When does the timer stop timing and reset itself? f. When input LS1 is first closed, which rungs are true and which are false?” g When input LS1 is first closed, state the status (on or off) of each output, 1h, When the timer’s accumulated value equals the pre- set value, which rungs are true and which are false? i, When the timer’s accumulated value equals the preset value, state the status (on or off) of each, output. Suppose that rung 1 is true for 5 s and then power is lost. What will the accumulated value of the counter be when power is restored? i Study the ladder logic program in Figure 7-42, and answer the questions that follow: ‘a, What type of timer has been programmed? b. What is the length of the time-delay period? ‘c. When does the timer start timing? b st ton | ew ‘HH ee wtO reset whey we soa , ak oa aca os 4 a te x : 24 © " “+t <> a Figure 7-40 Ladder logic program for Problem 3. 152 Chapter 7 Programming Timers Input u ts Loder eoeprerom vous or | a THe OFF DELAY TA timer uo POH 21st Time base 1 | SOLA Pest Le ‘Accumulated ° re 4 so.e. re x Figure 7-41 Ladder lagic pragram for Prablem 4. 4. When is the timer reset? . When will rung 3 be truc? f. When will rung 5 be truc? g- When will output PLA be energized? hh, Assume that your accumulated time value is up to 020 and power to your system is lost. What will your accumulated time value be when power is restored? inputs Ladaer loge program oupus Figure 7-42 Ladder u PBL 4s, a logic program for L z eS Problem o— Pat sk Pl ar P82 Aexnvenmeron RETENTIVE TMERON | Timer 13s} EP Time base Da Preset, 50 L-@y) Accumultes 3 wef Tes eu | 5) PL PL T4S0N pe Programming Timers Chapter 7 153 6. 154 tos eens ous PBR Tad 2 yoo oo LL 42 oat L__¢e5| i Paz —RTO fl RETENTIVE TIMER ON 3 Tinebese pimcoas Accumloted of-@9 oo ESE BPO ‘Accumulated of © me : bn Figure 7-43 Ladder lagic program for Problem 6. i, What happens if inputs PBI and PB2 are both ‘rue at the same time? Study the ladder logic program in Figure 7-43 and. answer the questions that follow: a, What is the purpose of interconnecting the two timers? 1b, How much time must elapse before output PL is energized? ‘c. What two conditions must be satisfied for timer ‘74:2.to start timing? 4d. Assume that output PL is on and power to the system is lost. When power is restored, what will the status of this output be? ‘e. When input PB2 is on, what will happen? f. When input PBI is on, how much accumulated 1¢ must elapse before rung 3 will be true? You have a machine that cycles on and off during its operation. You need to keep a record of its total run time for maintenance purposes. Which timer would accomplish this? Write a ladder logic program that will tum on a light, PL, 15 s after switch S1 has been turned on. Study the on-delay timer ladder logic program in Figure 7-44, and from each of the conditions stated, determine whether the timer is reset, tim- ing, or timed out or if the conditions stated are not, possible. a, The input is true, and EN is 1, TT is 1, and DNis0. Chapter 7 Programming Timers b. The input is true, and EN is 1, TT is 1, and DNis L . The input is false, and EN is 0, TT is 0, and DNis0. 4. The input is true, and EN is 1, TT is 0, and DNis L 10, Study the off-delay timer ladder logic program in Figure 7-45, and from each of the conditions stated, determine whether the timer is reset, timing, or timed out or if the conditions stated are not possible. a. The input is true, and EN is 0, TT is 0, and DNis L Ton ‘opt [Ter on DELAY Timer 40 Ley Tine bose Bp O7 Preset 0 Accumulated of-e) on Figure 7-44 On-delay timer ladder logic program for Problem 9. tor treat [tie oFF DELAY timer seo) Tine bse ep OO Preset 0 Accumulated of © 140 cr 140 T 140 oN Figure 7-45 Off-delay timer ladder logic program for Problem 10. u 2 2B. b. The input is true, and EN is 1, TT is 1, and DNis 1 ¢. The input is true, and EN is 1, TT is 0, and DNis 1 4. The input is false, and EN is 0, TT is 1, and DNis | . The input is false, and EN is 0, TT is 0, and DNis0. Write a program for an “anti-tie down circuit” that will disallow a punch press solenoid from operat- ing unless both hands are on the two palm start buttons. Both buttons must be pressed at the same time within 0.5 s, The circuit also will not allow the ‘operator to tie down one of the buttons and operate the press with just one button. (Hint: Once either of the buttons is pressed, begin timing 0.5 s, Then, if both buttons are not pressed, prevent the press sole- noid from operating.) Modify the program for the control of traffic lights in two directions so that there is a 3-s period when both directions will have their red lights illuminated. Write a program to implement the process illus- trated in Figure 7-46, The sequence of operation is to be as follows: + Normally open start and normally closed stop pushbuttons are used to start and stop the process. + When the start button is pressed, solenoid A ener- gizes to start filling the tank. + As the (ank fills, the empty level sensor switch closes. ‘+ When the tank is full, the full level sensor switch closes. Motor swith Qj—sore starvstop conta station Figure 7-46 Process for Problem 13, + Solenoid A is de-energized. + The agitate motor starts automatically and runs for 3 min to mix the liquid. + When the agitate motor stops, solenoid B is ener- agized to empty the tank + When the tank is completely empty, the empty sensor switch opens to de-energize solenoid B. + The start button is pressed to repeat the sequence. 14, When the lights are turned off in a building, an exit, door light is to remain on for an additional 2 min, and the parking lot lights are to remain on for an additional 3 min after the door light goes out. Write a program to implement this process. 15, Write a program to simulate the operation of a se- quential taillight system, The light system consists of three separate lights on each side of the car. Each set of lights will be activated separately, by either the left or right turn signal switch. There is to be a 1-s delay between the activation of each light, and a 1-s period when all the lights are off. Ensure that ‘when both switches are on, the system will not op- erate, Use the least number of timers possible. The sequence of operation should be as follows: + The switch is operated. + Light 1 is illuminated, + Light 2is illuminated 1 s later. + Light 3 is illuminated 1 s later, + Light 3 is illuminated for 1s. + All lights are off for I. + The system repeats while the switch is on. Programming Timers Chapter 7 155

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy