Page 196 - Programmable Logic Controllers, Fifth Edition - Mobile version
P. 196

Inputs                  Ladder logic program  1 min timer
                                  L1                     Start SW
                                                                                 TON
                                                                                 TIMER ON DELAY         EN
                                    O     On
                                                                                 Timer           T4:1   DN
                                                                                 Time base         1.0
                                           Start SW                              Preset           60
                                                                                 Accumulated       0

                                                                                        Total
                                                         Start SW  T4:1  Sensor         parts
                                              Sensor                             CTU                    CU
                                                                                 COUNT-UP COUNTER
                                                                    DN           Counter         C5:1   DN
                                                                                 Preset             0
                                                                                 Accumulated       0
                                                         Start SW                                    C5:1
                                                                                                     RES




                                  Figure 8-36  Product flow rate program.
                                  Source: Photo courtesy Omron Industrial Automation, www.ia.omron.com.


                     •  Every time the motor stops due to an overload      A timer is sometimes used to drive a counter when
                       condition, the motor start circuit is locked out for   an  extremely  long  time-delay  period  is  required.  For
                       5 min.                                            example, if you require a timer to time to 1,000,000 s,
                     •  If the motor trips off more than 5 times in an   you can achieve this by using a single timer and counter.
                       hour, the motor start circuit is permanently locked   Figure 8-37 shows how the timer and counter would be
                       out and cannot be started until the reset button is   programmed for such a purpose. The operation of the pro-
                       actuated.                                         gram can be summarized as follows:
                     •  The lock-out pilot light is switched on whenever a   •  Timer T4:0 has a preset value of 10,000, and coun-
                       permanent lock-out condition exists.                  ter C5:0 has a preset value of 100.
                     Figure 8-36 shows a product part flow rate program.   •  Each time the timer T4:0 input contact closes for
                   This program is designed to indicate how many parts pass   10,000 s, its done bit resets timer T4:0 and incre-
                   a given process point per minute. The operation of the    ments counter C5:0 by 1.
                   program can be summarized as follows:                   •  When the done bit of timer T4:0 has turned on
                                                                             and off 100 times, the output light becomes
                     •  When the start switch is closed, both the timer and
                       counter are enabled.                                  energized.
                     •  The counter is pulsed for each part that passes the   •  Therefore, the output light turns on after 10,000 ×
                       parts sensor.                                         100, or 1,000,000, seconds after the timer input
                                                                             contact closes.
                     •  The counting begins and the timer starts timing
                       through its 1-minute time interval.
                     •  At the end of 1 minute, the timer done bit causes the   8-7 High-Speed Counters
                       counter rung to go false.                         The maximum counting frequency of a traditional PLC’s
                     •  Sensor pulses continue but do not affect the PLC   counter is limited by the scan time of the processor. When
                       counter.                                          the frequency of the input signal is higher than that of
                     •  The number of parts for the past minute is repre-  the scan time, it is necessary to utilize  a high-speed
                       sented by the accumulated value of the counter.   counter (HSC), to avoid errors. For example, using an
                     •  The sequence is reset by momentarily opening and   incremental encoder in a length-measuring application
                       closing the start switch.                         generally requires the use of a high-speed counter. The



                                                                                     Programming Counters  Chapter 8    177







          pet73842_ch08_156-183.indd   177                                                                              03/11/15   3:58 PM
   191   192   193   194   195   196   197   198   199   200   201