Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 127
Timer and Counter Instructions (TON, TOF, RTO, TONR, TOFR, RTOR, CTU, CTD, CTUD, RES) Chapter 3
Execution:
Condition Relay Ladder Action
Prescan The .EN, .TT, and .DN bits are cleared.
The .ACC value is not modified.
The rung-condition-out is set to false.
Rung-condition-in is false The .EN and .TT bits are cleared.
The .DN bit is not modified.
The .ACC value is not modified.
The rung-condition-out is set to false.
Postscan The rung-condition-out is set to false.
Examine .DN bit.
.DN Bit = 1
.DN Bit = 0
.EN bit is set.
.TT bit is set.
last_time = current_time
Rung-condition-in is true
Examine .ACC
.ACC ≥ .PRE
.ACC < .PRE
.TT bit is set.
.ACC = .ACC + (current_time - last_time)
last_time = current_time
.ACC value rolls over.
No
Yes
.ACC = 2,147,483,647
Examine .EN Bit.
.EN Bit = 0
.EN Bit = 1
Rung-condition-out is set to true.
End
.DN is set.
.TT bit is cleared.