Click here to learn the biblical way to get to heaven! (The most important page on this site)


Disclaimer: This document is written in the hope that you can utilize for your own education to gain knowledge of PLC systems (should you decide to utilize this document). Although I believe the information in this document to be accurate, it is YOUR responsibility to verify this information before implementing it in any way, especially when damage to personnel or equipment could result. By continuing to read this document, you agree to hold no one who writes, modifies, or distributes this document liable in any way (even negligence). Due to the wide variety of plant applications, some of the examples in this document may be prohibited at your location, or could cause damage to equipment, or harm personnel.
[Visit my Church Website] -- [Return to Index Page] -- [View Training Courses] -- [Contact ATI for Training] *Copyright 2005
Author: Ricky Bryce (Montgomery County, IL)
VPS Hosting Referral Code MJDCDJYou can have your very own virtual server though VPSLink! Using REFERRAL code MJDCDJ you will receive a 10% discount on your new account, and I will get a service credit on my account. My personal preference is the Link 2 package running XEN for starting out (You can upgrade any time). You can choose from a variety of Linux distributions such as CENTOS, Fedora, Debian, and Ubuntu. This is a great package for learning Linux, and setting up your own web page, or email server.

Timers


Timers are generally used for delaying an event from taking place, or to delay a device from shutting off either on an on transition or an off transition. There are three types of timers: The Timer ON delay (TON), Timer Off delay (TOF), and the Retentative Timer On delay (RTO).


Timers can be created as Controller Tags or Program Tags. A tag of the TIMER data type consists of the following components: Preset word (PRE), Accumulate word (ACC), Done bit (DN), Timer Timing bit (TT), and Enable bit (EN). For Timers, the Enable bit follows the rung condition.





The entire timer is addressed by it's element (example: T4:0) Pieces of the timer can be used in logic however such as the DN bit on an XIC (T4:0/DN), or the Accumulated value in a MOV statement (T4:0.ACC)



Timer On Delay (TON)



The Timer On delay delays an event from taking place. Once the timer becomes true, the enable bit becomes true instantly. The timer will also start timing instantly, so the TT bit becomes high. Since the timer is timing, the accumulated value will increment.



Once the Accumulated value reaches the preset, the done bit (DN) will go high, and the timer will stop timing. The accumulated value remains at (or near) the preset until the rung goes false again. Here is what a typical timer might look like in logic:



When the switch is energized, the timer will begin timing. When the ACC value reaches the PRE value, the DN bit goes high, and the main motor will start. Since the Time Base is .001, therefore 5000 (preset) times .001 (timebase) = 5 second delay.





Timer Off Delay (TOF)


The Off Delay Timer is generally used to delay an event from shutting off. Image a lube system on a large motor. As long as the main motor is turning, the lube pump should be running. When the main motor shuts off, you wouldn't want to shut off the lube pump immediately because the main motor needs time to coast down to zero RPM's. The Main motor could run off the EN bit, and the Lube motor could run off the DN bit.


On the Off delay timer, as soon as the rung goes true, The EN bit goes true as it does for all timers. Since the Off delay timer does not delay the DN bit from shutting off, the DN bit goes high immediately. Remember, the TOF instruction delays the DN bit from shutting off, not turning on. (Plus if we are delaying the DN bit from shutting off, it needs to be high to begin with). While the rung is true, the timer is not timing, and the ACC value is at zero.


When the rung is shut off, the EN bit shuts off immediately. The ACC value will start timing until it reaches PRE then the DN bit will shut off.


Here is what the TOF instruction might look like in logic:




When the motor switch is energized, both the main motor and the lube motor will energize immediately. When the main motor switch is shut off, the main motor shuts off immediately, but since the TOF delays the DN bit from shutting off, the Lube motor will shut off 30 seconds later. Warning: Using the RES instruction on a TOF instruction could cause unpredictable operation.


Retentative On Delay Timer (RTO)


The RTO instruction works a lot like the TON instruction with one main exception: When the rung goes false on the RTO instruction, it will retain the ACC value. When the rung becomes true again, the ACC value will pick up from where it left off. One good application for the RTO would be an hour meter to indicate total runtime for machinery.


Since the RTO does not reset itself when the rung goes false, the RES instruction must be used to reset a timer. Here is a practical application:






In this example, once the machine accumulates 1 hour of run time, a light might come on indicating that a lubrication needs to be engaged. Once the operator lubricates the machine, he can reset the hour meter.