122 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)
Execution:
Condition Relay Ladder Action
Prescan The .EN, .TT, and .DN bits are cleared.
The .ACC value is set to equal the .PRE value.
The rung-condition-out is set to false.
Rung-condition-in is true The .EN, .TT, and .DN bits are set.
The .ACC value is cleared.
The rung-condition-out is set to true.
Postscan The rung-condition-out is set to false.
Examine .DN bit.
.DN Bit = 0
.DN Bit = 1
.EN bit is cleared.
last_time = current_time
Rung-condition-in is false
Examine .ACC
.ACC ≥ .PRE
.ACC < .PRE
.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 = 1
.EN bit = 0
Rung-condition-out is set to
false.
End
.DN is cleared
.TT bit is cleared
.EN bit is cleared
.TT bit is set.