On-delay timer TON
Times while the rung is true. DN turns on when ACC reaches PRE.
Global.StartDelayTON
PRE 3000 ACC 600 EN 1 TT 1 DN 0
| Tag | After two scans |
|---|---|
| StartDelay | PRE 3000 ACC 600 EN 1 TT 1 DN 0 |
How it works
Times while the rung is true. DN sets when ACC reaches PRE. Resets when the rung goes false.
Over time
How it's used
Use TON to wait before acting: start a conveyor after a warning horn, or confirm a sensor stays on.
Global.StartPBXIC
Global.HornTimeTON
PRE 1200 ACC 1200 EN 1 TT 0 DN 1
Global.HornTime.DNXIC
Global.ConveyorOTE
| Tag | Value |
|---|---|
| StartPB | 1 |
| HornTime | PRE 1200 ACC 1200 EN 1 TT 0 DN 1 |
| Conveyor | 1 |
StartPB has been on for 1.2 s. HornTime.DN turned Conveyor on.
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
- PRE typed in secondsPRE is in milliseconds. 3 seconds is 3000, not 3.
- Expecting the time to be keptA TON starts from 0 every time its rung goes false. Use an RTO to keep it.
- 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
- On-delay timingIntermediate · 25 min
- Off-delay and retentive timersIntermediate · 25 min