PLC Timer Instructions
A timer is a PLC instruction that measures the amount of time that has passed since an event occurred. There are two sorts of timer instructions: on-delay timers and off-delay timers. Single inputs initiate the timed function in both “on-delay” and “off-delay” timer instructions. The output of an “on-delay” timer is activated only after the input has been active for a certain amount of time.
PLC Timer Instructions
Consider this PLC software, which is designed to trigger an auditory alarm before beginning a conveyor belt.
The operator must press and hold the “Start” push-button for 10 seconds to start the conveyor belt motor, during which time a siren will play, advising people to move away from the conveyor belt that is about to start.
The motor does not start until after a 10-second delay.
The on-delay timer’s elapsed time (ET) value increments once per second until the preset time (PT) is reached, at which point its output (Q) activates, similar to a “up” counter. The preset time value in this programme is 10 seconds, therefore the Q output will not turn on until the “Start” switch has been depressed for 10 seconds. The output of the alarm siren, which is not engaged by the tim.
The fact that this timer is non-retentive is a crucial aspect of its operation.
When the input is de-activated, the timer instruction should not keep its elapsed time value.
Instead, whenever the input is de-activated, the elapsed time value should be reset to zero. When the operator releases the “Start” push-button, the timer will automatically reset.
A retentive ondelay timer, on the other hand, keeps track of the elapsed time even when the input is turned off. It can thus be used to keep track of “running total” times for a certain event.
Also Read : RTD Calculator : Calculate Temperature from Resistance
Most PLCs offer both retentive and non-retentive versions of on-delay timer instructions, allowing the programmer to select the best on-delay timer for the job.
The IEC 61131-3 programming standard, on the other hand, takes a slightly different approach to the question of retentive versus non-retentive clocks.
A timer instruction may be defined with an additional enable input (EN) that causes the timer instruction to operate non-retentively when active and retentively when de-activated, according to the IEC 61131-3 standard.
The enable (EN) input’s general concept is that the instruction behaves “normally” while the enable input is active (in this case, non-retentive timing action is considered “normal” according to the IEC 61131-3 standard), but when the enable input is de-activated, the instruction “freezes” all execution.
This “freezing” of the process maintains the current time (CT) value.
For example, we might use a “enabled” IEC 61131-3 timer command like this to add a retentive timer to our conveyor control system to record total run time for the conveyor motor:
The timer is enabled and allowed to time when the motor’s contactor bit (OUT contactor) is active.
When that bit is deactivated (becomes “false”), the timer instruction is disabled as a whole, causing it to “freeze” and keep its current time (CT) value ( Note 1 ).
This permits the motor to be started and stopped while the timer keeps track of the overall amount of time the motor has been running.
Note 1: On the timer instruction, the “enable out” (ENO) signal indicates the status of the instruction: it activates when the enable input (EN) activates and de-activates when the enable input (EN) de-activates or the instruction generates an error condition (as determined by the PLC manufacturer’s internal programming). In this particular programe, the ENO output signal is useless.
We could hard-wire an extra switch to the PLC’s discrete input card and add “reset” contacts to the programe like this if we wanted to provide the operator the opportunity to manually reset the total run time number to zero:
The timer is enabled (EN) but the timing input (IN) is disabled whenever the “Reset” switch is pressed, forcing the timer to (non-retentively) reset its current time (CT) value to zero.
The off-delay timer is the other major form of PLC timer command. The timing function of this timer instruction differs from the on-delay kind in that it begins as soon as the instruction is deactivated, rather than when the instruction is activated.
A cooling fan motor control for a large industrial engine is one use for an off-delay timer.
The PLC in this system initiates an electric cooling fan as soon as the engine starts rotating and keeps it running for two minutes after the engine has stopped to remove leftover heat:
When the input (IN) to this timer instruction is active, the output (Q) turns on the cooling fan motor contactor instantly (with no time delay).
As soon as the engine starts to rotate (as detected by the speed switch attached to the PLC’s discrete input), the engine is cooled.
The speed switch returns to its normally open position when the engine stops rotating, deactivating the timer’s input signal, which starts the timing sequence.
While the timer ticks from 0 to 120 seconds, the Q output remains active.
The output de-activates (turning off the cooling fan motor) when it reaches 120 seconds, and the elapsed time value remains at 120 seconds.
The following timing diagrams compare and contrast on-delay with off-delay timers:
While on-delay PLC instructions are often found in both retentive and non-retentive versions in the instruction sets of practically every PLC manufacturer and model, retentive off-delay timer instructions are almost unheard of. Off-delay timers are typically non-retentive only (Note 2 ).
Note 2: Retentive off-delay timers are possible with the enable (EN) input signals specified in the IEC 61131-3 programming standard (by de-activating the enable input while keeping the “IN” input in an inactive state), but keep in mind that most PLC implementations of timers do not have separate EN and IN inputs. This means that the only input available to activate t (for most PLC timer instructions) is the clock input.