Chapter 3
Timer and Counter Instructions (TON, TOF, RTO, TONR, TOFR, RTOR, CTU, CTD, CTUD, RES)
144
Example:
After limit_switch_1 goes from disabled to enabled 10 times, the .DN bit is set
and light_1 turns on. If limit_switch_1 continues to go from disabled to enabled,
counter_1 continues to increment its count and the .DN bit remains set. When
limit_switch_2 is enabled, the RES instruction resets counter_1 (clears the status
bits and the .ACC value) and light_1 turns off.
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011