PLC Instructions II ‘Timers’


Timer is an instruction that waits a set amount of time before doing something (control time). Timers count fractions of seconds or seconds using the internal CPU clock. The time duration for which a timer has been set is termed the preset and is set in multiples of the time base used.

Most manufacturers consider timers to behave like relays with coils which when energized result in the closure or opening of contacts after some preset time. The timer is thus treated as an output for a rung with control being exercised over pairs of contacts elsewhere. Others treat a timer as a delay block which when inserted in a rung delays signals in that rung reaching the output.

Timers Types
 On-Delay timer- simply “delays turning on”. It is called TON, TIM or TMR.
 Off-Delay timer- simply “delays turning off”. It is called TOF and is less common than the on-dellay type.
 The on/off delay timers above would be reset if the input sensor wasn’t on/off for the complete timer duration.
 Retentive or Accumulating timer- holds or retains the current elapsed time when the sensor turns off in mid-stream. It is called RTO or TMRA.
 This type of timer needs 2 inputs.

We need to know 2 things when using timers:
1. What will enable the timer?
Typically this is one of the inputs (a sensor connected to one input).
2. How long we want to delay before we react?
Wait x seconds before we turn on a load.

When the instructions before the timer symbol are true the timer starts “ticking”.
When the time elapses the timer will automatically close its contacts.
When the program is running on the plc the program typically displays the current value.
 Typically timers can tick from 0 to 9999 (16-bit BCD) or 0 to 65535 times (16-bit binary).

Timer Accuracy
There are software and Hardware Errors when using a timer.

 Software Errors
 Input error depending upon when the timer input turns on during the scan cycle.
 Output error depending upon when in the ladder the timer actually “times out” and when the plc finishes executing the program to get to the part of the scan when it updates the outputs.
 Total software error is the sum of both the input and output errors.

 Hardware Error
 There is a hardware input error as well as a hardware output error. The hardware input error is caused by the time it takes for the plc to actually realize that the input is on when it scans its inputs. Typically this duration is about 10ms (to eliminate noise or “bouncing” inputs).
 The hardware output error is caused by the time it takes from when the plc tells its output to physically turn on until the moment it actually does. Typically a transistor takes about 0.5ms whereas a mechanical relay takes about 10ms.