148 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 3 Timer and Counter Instructions (TON, TOF, RTO, TONR, TOFR, RTOR, CTU, CTD, CTUD, RES)
Example: A conveyor brings parts into a buffer zone. Each time a part enters,
limit_switch_1 is enabled and counter_1 increments by one. Each time a part
leaves, limit_switch_2 is enabled and counter_1 decrements by one. If there are
100 parts in the buffer zone (counter_1.dn is set), conveyor_A turns on and stops
the conveyor from bringing in any more parts until the buffer has room for more
parts.