Retentive timer RTO

Like TON, but keeps ACC when the rung goes false. Clear it with RES.

TagAfter two scans
PumpHoursPRE 60000 ACC 600 EN 1 TT 1 DN 0

How it works

Times while the rung is true. DN sets when ACC reaches PRE. ACC and DN keep their values when the rung goes false, until a RES clears them.

How it's used

Use RTO to add up time across several runs, such as total heating time.

TagValue
Heating0
ResetPB0
HeatTimePRE 60000 ACC 600 EN 0 TT 0 DN 0

Heating turned off. HeatTime kept its ACC.

Operands

OperandData typeRead or write
TimerTIMERReads and writes

Inside a TIMER tag

MemberTypeMeaning
.PREDINTPreset: the time to reach, in ms
.ACCDINTAccumulated: the time so far, in ms
.ENBOOLOn while the rung is true
.TTBOOLOn while the timer is timing
.DNBOOLDone: on when ACC reaches PRE

Common mistakes

  • No way to clear itAn RTO keeps ACC and DN until a RES on the same TIMER tag clears them.
  • Using one TIMER tag in two timersEach timer writes ACC, TT and DN, so the first one in the scan changes them before the next one runs. Problems shows this as written by 2 timers. Give each timer its own tag, unless you want that order.

Learn it in a lesson