Timer On-Delay (TON)

[Command Table] [Main Course Page] [Group Index]

Use the TON instruction to turn an output on or off after the timer has been on for a preset time interval. The TON instruction begins to count timebase intervals when the rung mkaes a FALSE-to-TRUE transistion. As long as rung conditions remain true, the timer adjusts its accumulated value (ACC) each evaluation until it reaches the preset value (PRE). The accumulated value is reset when rung conditions go FALSE, regardless of whether the timer has timed out.

The TON command is used as an output on a rung which, unlike the TOF command, is only active (counting) when the rung conditions are TRUE. The Enable and Done bits work the same as the TOF command, the Enable bit is set only when the rung conditions are FALSE and remains set until the rung goes TRUE. Although the Enable bit works the same way, don't forget that the counter works opposite the TOF, it counts when the Enable bit is ON, and stops when the accumulated value is reached or when the Enable bit is OFF. The Done bit gets set when the rung conditions are FALSE and remains ON until the Accumulated value equals or is greater than the Preset value (while rung conditions are still FALSE).

There are four fields of the TON command, the first being the address of the counter (Timer field), for example T4:x (where x is the Timer number). Second is the Time Base, this is preset between two values, 1.0 second or 0.01 second for counting. The third field, Preset is the time you want to count (be sure to match the Preset time units with the Time Base time units). The last field is the Accumulated value, this is the time that passed during the TRUE rung condition. Usually this is set to 0, however it can be set to other values to increase, or reduce the time to reach the Preset value. Because the Preset and Accumulator bits are addressable, the values can be changed within the program (based on other rung instructions).

Programming Problem

Develop a ladder rung that will energize an output for x amount of time. In this example, a time of 5 seconds will be used.

In this example, a timer would be used. By using the TON instruction, the user can input a time to keep an output on for for. This value would be entered into the time preset field on the TON instruction. The time base would have to be changed to 1. In this is example, an XIC is being used. A switch or button would have to be closed for this example to work properly.

[Command Table] [Main Course Page] [Group Index]