TON On-delay timer (TON)
Also called: timer on delay, TON timer, delay on, on delay
On-delay timer: Q / DN turns 1 once IN / EN has been 1 for PT / PRE.On-delay timer: Q turns 1 once IN has been 1 for PT.On-delay timer: DN turns 1 once EN has been 1 for PRE.
What it does
The TON timer delays turning on: when power reaches the instruction, it counts time in ET / ACC; when ET / ACC reaches the preset (ET / ACC ≥ PT / PRE), Q / DN turns 1. As soon as the rung drops, everything goes back to 0.The TON timer delays turning on: when power reaches the instruction, it counts time in ET; when ET reaches the preset (ET ≥ PT), Q turns 1. As soon as the rung drops, everything goes back to 0.The TON timer delays turning on: when power reaches the instruction, it counts time in ACC; when ACC reaches the preset (ACC ≥ PRE), DN turns 1. As soon as the rung drops, everything goes back to 0.
When to use it
To wait before acting: delayed start, sensor confirmation (debounce), alarm when a condition lasts too long.
Operands
| European mnemonic | American mnemonic | Name | Data type | Direction | Required | Access | Meaning |
|---|---|---|---|---|---|---|---|
| Instance | Instance | Instance (the timer’s memory) | IEC_TIMER / TIMER | Input | Yes | — | Instance (T1…): the timer's memory. One instance per timer. |
| IN | EN | Enable | BOOL | Input | Yes | Read (T1.IN / T1.EN) | The bit that says the instruction is active: the rung’s power reaches the instruction. |
| PT | PRE | Preset | TIME / DINT | Input | Yes | Read and write (T1.PT / T1.PRE) | Preset: the time to reach. A constant on the box is only the starting value; the program can change it with a MOVE / MOV. |
| Q | DN | Done | BOOL | Output | No | Read (T1.Q / T1.DN) | When ET / ACC reaches the preset (ET / ACC ≥ PT / PRE), Q / DN turns 1. |
| ET | ACC | Accumulator: elapsed time | TIME / DINT | Output | No | Read (T1.ET / T1.ACC) | Accumulator: the elapsed time, from 0 up to PT / PRE. |
| — | TT | Timing | BOOL | Output | No | Read (T1.TT) | 1 while the timer is timing. American style only: not in the European style. |
| Mnemonic | Name | Data type | Direction | Required | Access | Meaning |
|---|---|---|---|---|---|---|
| Instance | Instance (the timer’s memory) | IEC_TIMER | Input | Yes | — | Instance (T1…): the timer's memory. One instance per timer. |
| IN | Enable | BOOL | Input | Yes | Read (T1.IN) | The bit that says the instruction is active: the rung’s power reaches the instruction. |
| PT | Preset | TIME | Input | Yes | Read and write (T1.PT) | Preset: the time to reach. A constant on the box is only the starting value; the program can change it with a MOVE. |
| Q | Done | BOOL | Output | No | Read (T1.Q) | When ET reaches the preset (ET ≥ PT), Q turns 1. |
| ET | Accumulator: elapsed time | TIME | Output | No | Read (T1.ET) | Accumulator: the elapsed time, from 0 up to PT. |
| Mnemonic | Name | Data type | Direction | Required | Access | Meaning |
|---|---|---|---|---|---|---|
| Instance | Instance (the timer’s memory) | TIMER | Input | Yes | — | Instance (T1…): the timer's memory. One instance per timer. |
| EN | Enable | BOOL | Input | Yes | Read (T1.EN) | The bit that says the instruction is active: the rung’s power reaches the instruction. |
| PRE | Preset | DINT | Input | Yes | Read and write (T1.PRE) | Preset: the time to reach. A constant on the box is only the starting value; the program can change it with a MOV. |
| DN | Done | BOOL | Output | No | Read (T1.DN) | When ACC reaches the preset (ACC ≥ PRE), DN turns 1. |
| ACC | Accumulator: elapsed time | DINT | Output | No | Read (T1.ACC) | Accumulator: the elapsed time, from 0 up to PRE. |
| TT | Timing | BOOL | Output | No | Read (T1.TT) | 1 while the timer is timing. American style only: not in the European style. |
Readable anywhere in the program, for example T1.Q / T1.DN. Writable members can be changed by the program (MOVE).Readable anywhere in the program, for example T1.Q. Writable members can be changed by the program (MOVE).Readable anywhere in the program, for example T1.DN. Writable members can be changed by the program (MOVE).
Timing diagram
Timing diagram checked against the simulator (the same engine as the editor).
Example
H1 turns on once S1 has been 1 for 3 s.
Try it in the simulatorThe example opens in the free simulator; your own program stays as it was.
Behaviour in detail
- If IN / EN drops before the end, ET / ACC goes back to 0: the timer starts over next time (second pulse of the timing diagram).If IN drops before the end, ET goes back to 0: the timer starts over next time (second pulse of the timing diagram).If EN drops before the end, ACC goes back to 0: the timer starts over next time (second pulse of the timing diagram).
- ET / ACC stops at PT / PRE; it never goes past the preset.ET stops at PT; it never goes past the preset.ACC stops at PRE; it never goes past the preset.
- In the American style, TT is 1 while timing and Q / DN at the end: never both at once.In the American style, TT is 1 while timing and Q at the end: never both at once.In the American style, TT is 1 while timing and DN at the end: never both at once.
- Time advances with the real scan duration: accuracy is about one scan.
- The block runs on every scan, even when the rung is 0.
European (IEC) and American styles
European: duration written T#3s, outputs Q and ET.
American: preset PRE in milliseconds (3000), accumulator ACC and bits DN (done), TT (timing) and EN (rung). Same behaviour.