Retentive timer RTO
Like TON, but keeps ACC when the rung goes false. Clear it with RES.
Global.PumpHoursRTO
PRE 60000 ACC 600 EN 1 TT 1 DN 0
| Tag | After two scans |
|---|---|
| PumpHours | PRE 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.
Global.HeatingXIC
Global.HeatTimeRTO
PRE 60000 ACC 600 EN 0 TT 0 DN 0
Global.ResetPBXIC
Global.HeatTimeRES
| Tag | Value |
|---|---|
| Heating | 0 |
| ResetPB | 0 |
| HeatTime | PRE 60000 ACC 600 EN 0 TT 0 DN 0 |
Heating turned off. HeatTime kept its ACC.
Operands
| Operand | Data type | Read or write |
|---|---|---|
| Timer | TIMER | Reads and writes |
Inside a TIMER tag
| Member | Type | Meaning |
|---|---|---|
| .PRE | DINT | Preset: the time to reach, in ms |
| .ACC | DINT | Accumulated: the time so far, in ms |
| .EN | BOOL | On while the rung is true |
| .TT | BOOL | On while the timer is timing |
| .DN | BOOL | Done: 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
- Off-delay and retentive timersIntermediate · 25 min