Timing and Counting Values Beyond 9999

Home | Sitemap/Articles


PREV: Counter Operation in a PLCNEXT: Sequencers Used to Control the Batch Mixing for the Carbon Brush Application

AMAZON multi-meters discounts AMAZON oscilloscope discounts


One problem with counters and timers in PLCs is that their preset values are generally restricted to 9999 or less in the smaller units and 65,535 in the larger units. In modern manufacturing facilities, it's not uncommon for machines to produce over 100,000 products or parts each day, and if a timer is used to keep track of operating hours on a machine, the value can exceed 6000 hours per year. If the PLC is restricted to the smaller amounts, you can see that the preset values for counts in the counter and seconds in the timer will easily be exceeded. It is easy to add a second counter to the timer or production counter to allow the PLC to time or count an unlimited number.

AMAZON multi-meters discounts AMAZON oscilloscope discounts

ill. 20a below shows an example of a timer that has a counter added to it to provide the extended values. ill. 20b shows two counters that work together to provide counts up to 20,000, and ill. 20c shows an example of two counters that can count up to 300,000. When timers and counters use extra counters to extend their capacity, the extra counter is called a cascaded counter.

In the example in ill. 20a, the first rung shows a normal RTO timer with the address of 904. A set of enable contacts is connected in series with timer RTO 904. The preset value of this timer is set to 600 to represent 60 seconds. When the timer times out, its status contacts 904 in the second rung will close and add 1 count to counter 905. The preset value of counter 905 is set at 60 to represent 60 minutes per hour. Each time the 904 timer times out, 60 seconds (1 minute) has passed and its 904 contacts in the third rung will reset the timer so it will start its timing cycle again. The AC value in the counter will always be the number of hours the timer has operated. Additional counters can be added to count 24 hours per day, 7 days per week, and 52 weeks per year. You can see that any number of counters can be cascaded by simply using the status contacts of the counter before it to enable it.

ill. 20b shows counter 906 being enabled by contacts 007. Each time the contacts transition they will add 1 to the AC value in counter 906. When the AC value in counter 906 reaches 9999, it will close its overflow contacts 956 in the second rung. The 956 contacts will remain closed, which will allow enable contacts 007 to increment the second counter 907. When the second counter AC value reaches 9999, both counters can be reset by the third and fourth rungs. A manual reset could also be added to prevent the AC value in both counters from being lost. The grand total of both counters would be the sum of counters 906 and 907.

Figure 3-20c shows a way to use two counters to count values up to 99,999,999. This is accomplished by using the status contacts of the first counter to provide a pulse to the second counter each time the first counter’s AC value reaches the PR value. In this example, the PR value is set at 9999. Each time the first counter has 9999, its status bit 908 in the second rung will close. The 908 status contacts in the third rung will also close. This will reset the 908 counter and allow it to start counting again. The 909 counter can be pulsed 9999 times so this means that the two counters can count up to 99,999,999 together.


ill.20: (a) Example of a counter added (cascaded) to a timer to provide timer values above 9999 seconds. (b) Two counters cascaded to count up to 20,000. (c) Two counters cascaded to count up to 99,999,999. ENABLE SWITCH; MAIN TIMER; CLOSES ONCE EVERY TIME TIMER TIMES OUT; CASCADE COUNTER; CLOSES AFTER MAIN COUNTER IS FULL; CLOSES AFTER MAIN COUNTER REACHES 9999.

If the PR value for each counter is set at 1000, the total count can be read by placing the AC value of counter 909 to the left of the AC value of counter 908 and reading the values as a six-digit number. E.g., if counter 909 has a value of 102, and counter 908 has a value of 358, the grand total for both counters would be 102,358. If you place 1000 in each counter PR value, the capacity of each counter is diminished, but it's much easier to total the count quickly.

Top of Page PREV: Counter Operation in a PLCNEXT: Sequencers Used to Control the Batch Mixing for the Carbon Brush Application

Monday, August 25, 2008 13:09