We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 62
PLC Timer Instructions
A timer is a PLC instruction measuring the amount
of time elapsed following an event. Timer instructions come in two basic types: on- delay timers and off-delay timers. Both “on-delay” and “off-delay” timer instructions have single inputs triggering the timed function. An “on-delay” timer activates an output only when the input has been active for a minimum amount of time. PLC Timer Instructions Take for instance this PLC program, designed to sound an audio alarm siren prior to starting a conveyor belt. To start the conveyor belt motor, the operator must press and hold the “Start” push-button for 10 seconds, during which time the siren sounds, warning people to clear away from the conveyor belt that is about to start. Only after this 10-second start delay does the motor actually start (and latch “on”): Similar to an “up” counter, the on-delay timer’s elapsed time (ET) value increments once per second until the preset time (PT) is reached, at which time its output (Q) activates. In this program, the preset time value is 10 seconds, which means the Q output will not activate until the “Start” switch has been depressed for 10 seconds. The alarm siren output, which is not activated by the timer, energizes immediately when the “Start” push-button is pressed. An important detail regarding this particular timer’s operation is that it be non-retentive. This means the timer instruction should not retain its elapsed time value when the input is de- activated. Instead, the elapsed time value should reset back to zero every time the input de-activates. This ensures the timer resets itself when the operator releases the “Start” push-button. A retentive ondelay timer, by contrast, maintains its elapsed time value even when the input is de-activated. This makes it useful for keeping “running total” times for some event. Most PLCs provide retentive and non-retentive versions of on-delay timer instructions, such that the programmer may choose the proper form of on- delay timer for any particular application. The IEC 61131-3 programming standard, however, addresses the issue of retentive versus non-retentive timers a bit differently. According to the IEC 61131-3 standard, a timer instruction may be specified with an additional enable input (EN) that causes the timer instruction to behave non-retentively when activated, and retentively when de-activated. The general concept of the enable (EN) input is that the instruction behaves “normally” so long as the enable input is active (in this case, non-retentive timing action is considered “normal” according to the IEC 61131-3 standard), but the instruction “freezes” all execution whenever the enable input de- activates. This “freezing” of operation has the effect of retaining the current time (CT) value even if the input signal de-activates. For example, if we wished to add a retentive timer to our conveyor control system to record total run time for the conveyor motor, we could do so using an “enabled” IEC 61131-3 timer instruction like this: When the motor’s contactor bit (OUT contactor) is active, the timer is enabled and allowed to time. However, when that bit de-activates (becomes “false”), the timer instruction as a whole is disabled, causing it to “freeze” and retain its current time (CT) value ( Note 1 ). This allows the motor to be started and stopped, with the timer maintaining a tally of total motor run time. Note 1 : The “enable out” (ENO) signal on the timer instruction serves to indicate the instruction’s status: it activates when the enable input (EN) activates and de-activates when either the enable input de-activates or the instruction generates an error condition (as determined by the PLC manufacturer’s internal programming). The ENO output signal serves no useful purpose in this particular program, but it is available if there were any need for other rungs of the program to be “aware” of the run-time timer’s status. If we wished to give the operator the ability to manually reset the total run time value to zero, we could hard-wire an additional switch to the PLC’s discrete input card and add “reset” contacts to the program like this: Whenever the “Reset” switch is pressed, the timer is enabled (EN) but the timing input (IN) is disabled, forcing the timer to (non-retentively) reset its current time (CT) value to zero. The other major type of PLC timer instruction is the off-delay timer. This timer instruction differs from the on-delay type in that the timing function begins as soon as the instruction is deactivated, not when it is activated. An application for an off-delay timer is a cooling fan motor control for a large industrial engine. In this system, the PLC starts an electric cooling fan as soon as the engine is detected as rotating, and keeps that fan running for two minutes following the engine’s shut-down to dissipate residual heat: When the input (IN) to this timer instruction is activated, the output (Q) immediately activates (with no time delay at all) to turn on the cooling fan motor contactor. This provides the engine with cooling as soon as it begins to rotate (as detected by the speed switch connected to the PLC’s discrete input). When the engine stops rotating, the speed switch returns to its normally-open position, de-activating the timer’s input signal which starts the timing sequence. The Q output remains active while the timer counts from 0 seconds to 120 seconds. As soon as it reaches 120 seconds, the output de- activates (shutting off the cooling fan motor) and the elapsed time value remains at 120 seconds until the input re-activates, at which time it resets back to zero. The following timing diagrams compare and contrast on-delay with off-delay timers: While it is common to find on-delay PLC instructions offered in both retentive and non- retentive forms within the instruction sets of nearly every PLC manufacturer and model, it is almost unheard of to find retentive off-delay timer instructions. Typically, off-delay timers are non- retentive only (Note 2 ). Note 2 : The enable (EN) input signals specified in the IEC 61131-3 programming standard make retentive off-delay timers possible (by de- activating the enable input while maintaining the “IN” input in an inactive state), but bear in mind that most PLC implementations of timers do not have separate EN and IN inputs. This means (for most PLC timer instructions) the only input available to activate the timer is the “IN” input, in which case it is impossible to create a retentive off- delay timer (since such a timer’s elapsed time value would be immediately re-set to zero each time the input re-activates). How to Interchange ON Delay Timer and OFF Delay Timer in a PLC Timer functions are most important in PLC Programming. Logics play the important role in PLC Programming. According to PLC programmer’s skills, logic will get different in application. In this program, we are going to interchange the function of On Delay Timer and Off Delay timer. AB RSLogix 500 is used to implement the concepts. N Delay Timer and OFF Delay Timer PLC Timer Functions ON DELAY TIMER : In Layman Statement, Delaying the turning “ON” of the output is On Delay Timer. Example : See the image below; if you turn on Input, after 5 sec output will get turn on. It will not turn on immediately. In AB PLC, ON Delay Timer is having 6 parameters. They are •Enable Bit (EN): It will turn on when timer is on •Done Bit (DN): It will turn on once the timer accumulator value reaches preset value •Timer Timing bit (TT) : This bits enable when timer accumulator value is running •Preset (PRE): Integer value to set how long timer needs to run or limit starting from zero. •Accumulator (ACC): Running value of the timer •Time Base : You have options to chose timer base, Sec, cent sec, Mille sec. OFF DELAY TIMER : In Layman Statement, Delaying the turning “OFF” of the output is Off Delay Timer. Example: See the image below; if you turn on Input, output will turn ON immediately, when you turn OFF the input, It will take 5 sec to turn OFF the output. It will not turn OFF immediately. In AB PLC, OFF Delay Timer is having 6 parameters. They are •Enable Bit (EN): It will turn on when timer is on •Done Bit (DN): It will turn on once the timer is On and remains ON until timer accumulator value reaches preset value •Timer Timing bit (TT) : This bits enable when timer accumulator value is running •Preset (PRE): Integer value to set how long timer needs to run or limit starting from zero. •Accumulator (ACC): Running value of the timer •Time Base: You have options to choose timer base, Sec, cent sec, Millie sec. ist of Inputs and Outputs Program for ON Delay and OFF Delay Timers Ladder Logic Description ON DELAY TIMER AS OFF DELAY TIMER : 1. Rung 0000 :- Latching is done using output coil to stay ON even Input is turned off. Normally closed timer done bit is used to turn off the output once timer accumulator value reach preset and that make TON to act as TOFF. 2. Rung 0001 :-
since the Start Input is used as normally closed input,
Output Coil is attached as interlocking, so that it won’t turn on timer at the beginning of the program. OFF DELAY TIMER AS ON DELAY TIMER : 3. Rung 0003 :- Input 2 turned to turn on timer, Memory coil is used to trigger the timer to start count and to make TOFF to act as TON. Conclusion The above used timer concept is used to under the function of timer working. It may or may not used in real time application. Why is RTO used in the Place of TON Timer? Why is RTO used in the place of T-ON? Timers are one of the most used instructions in a PLC program.
To get started with the topic we need to know why the
timers are used in the first place.
Timers are used to keep a set of outputs ON/OFF for the
specified amount of time. For example, I had to run a heater for 15 seconds I would go for a timer to make it happen. So there are two types of an ON delay timer in RSlogix 500, •T-ON – TImer On delay timer. •RTO – Retentive TImer. Now consider an application we are programming requires a heater to be turned on for 15 seconds after a level sensor has sensed the level is high enough. w we’re gonna write the logic for that using a TON. Now we completed our logic, •I:0.0/0 – It is the sensor input address •o:0.0/0- It is the output for the heater. •T4:0/TT – It is called the timer timing bit. The following are the specifics on Timer block, •Timer – The timer address has to be specified here. •Time Base – The time base is the one that determines how the timer runs whether for milliseconds or microseconds or seconds. It basically multiplies with the preset value. I have mentioned here 1.0 •Preset – Here is where one should specify the time the timer has to be active. So (1.0*15 = 15 seconds) •Accumulator – Here is where you can see the value of the seconds the timer has run so far. When we go to run-time you can see that our process is working fine. The logic is working fine until when there is an emergency shut down or power shut down in a plant. Imagine that the PLC had to turn OFF. Then we had to turn ON again after few minutes. Now the process had to repeat where it left of meaning from 4th second the timer has to start running. But it won’t work like that once there is a shut down in a PLC system the timer had to reset on its own. You can see the above figure for understanding. Now to overcome this situation we’re gonna use an RTO timer to develop the logic. There is no difference in creating the instruction between TON and RTO, except we have to use a Reset here to reset the timer. So now everything is working fine and the PLC system goes off. You can see in the above image that the accumulator value is getting stored even after the PLC goes OFF. So now when the system is turned ON again the program will be executed from where it left off the timer will run from 5th second as you can see below. Even when the sensor goes OFF the timer will store the accumulator value till it ran. Until the timer is being reset the accumulator value stays. Once it is reset the accumulator value becomes zero. Note that the input to reset should always act like a push button or One-shot (ONS) and both the input to the timer and the input to the Reset shouldn’t be On at the same time. This is the reason why RTO is used mostly in real- time applications.