Page 153 - Programmable Logic Controllers, Fifth Edition
P. 153

L1
                   S1           L2               Timing diagram           TON  TOF  RTO  CTU  CTD  RES  HSC
                                                                                             HSC
                            TD                          10 s
                         10 s                                                User  Bit  Timer/Counter  Input/Output  Compare
                             L1
                  TD1               Input                            Figure 7-8  Timer selection toolbar.
                                   Output  On
                                                        O
                Figure 7-7  Off-delay timer circuit that uses a normally   TOF (Timer Off Delay)—Counts time-based inter-
                closed, timed closed (NCTC) contact.                    vals when the instruction transitions from a true to
                                                                        false condition.
                  Figure 7-7 shows an off-delay timer circuit that uses a   RTO (Retentive Timer On)—Counts time-based
               normally closed, timed closed (NCTC) contact. The op-    intervals when the instruction is true and retains the
               eration of the circuit can be summarized as follows:     accumulated value when the instruction goes false or
                                                                        when power cycle occurs.
                 •  With S1 initially open, TD coil is de-energized so
                    TD1 contacts are closed and light L1 will be on.    RES (Reset)—Resets a retentive timer’s accumulated
                 •  When S1 is closed, TD coil is energized and TD1     value to zero.
                    contacts open instantly to switch light L1 off.     Several quantities are associated with the timer
                 •  When S1 is opened, TD coil is de-energized and the   instruction:
                    timing period starts. TD1 contacts are delayed from   •  Time Base  The time base of a timer is the unit
                    closing so L1 remains off.                            of time used by a timer to time an event. A timer
                 •  After the 10 s time-delay period has elapsed,  TD1    instruction times an event by counting the number
                    contacts close to switch the light on.                of times the time base has occurred. Depending on
                                                                          the manufacturer and type of PLC, time base values
               7.2  Timer Instructions                                    can be in 1 ms (0.001 s), 10 ms (0.01 s), 100 ms
                                                                          (0.1 s), or 1 second intervals. For example, if a timer
               PLC timers are instructions that provide the same func-    has a time base of 1 second and it is timing some-
               tions as on-delay and off-delay mechanical and electronic   thing that is 5 seconds long, the PLC will wait until
               timing relays. All PLC timers are output instructions. PLC   the time base has occurred 5 times before the timer
               timers offer several advantages over their mechanical and   times out. Conversely, if the PLC’s time base setting
               electronic counterparts. These include the fact that:      is 0.01 seconds, it will wait until the time base has
                 •  The entire timing function occurs inside the controller.  occurred 500 times before timing out. The smaller
                 •  Time settings can be easily changed.                  the time base, the better the accuracy of the timer.
                 •  The number of timers used in a circuit can be in-  •  Preset Value  The preset value of a timer repre-
                    creased or decreased through the use of program-      sents the time duration for the timing circuit. Total
                    ming changes rather than wiring changes.              timing interval = the preset value x time base. For
                                                                          example, for a timer with a preset value of 100 and
                 •  Timer accuracy and repeatability are extremely        a time base of 0.1s the time duration for the timer is:
                    high because time delays are generated in the PLC     Total timing interval = 100 × 0.1 s
                    processor.                                                              = 10 seconds

                  In general, there are three different PLC timer types: the   •  Accumulated Value  The accumulated value of
               on-delay timer (TON), off-delay timer (TOF), and retentive   the timer represents the amount of time that has
               timer on (RTO). The most common is the on-delay timer,     elapsed from the moment the timing started. It
               which is the basic function. There are also many other tim-  keeps track of how many times the time base has
               ing configurations, all of which can be derived from one or   occurred since the timer instruction was initiated.
               more of the basic time-delay functions. Figure 7-8 shows
               the timer selection toolbar for the Allen-Bradley SLC 500   Although each manufacturer may represent timers
               PLC and its associated RSLogix software.  These timer   differently on the ladder logic program, most timers  operate
               commands can be summarized as follows:                in a similar manner. One of the first methods used depicts
                                                                     the timer instruction as a relay coil similar to that of a me-
                  TON (Timer On Delay)—Counts time-based inter-      chanical timing relay. Figure 7-9 shows a coil- formatted
                  vals when the instruction is true.                 timer instruction.



               134        Chapter 7  Programming Timers







          pet73842_ch07_131-155.indd   134                                                                              05/11/15   4:21 PM
   148   149   150   151   152   153   154   155   156   157   158