PLC Timer Programming for BeginnersLearn about PLC timers, how they work, the different types of timers, and some examples of how they are used.
In this article, we will be talking about the PLC timer. We will explain what PLC timers are, how they work, the different types of timers, and give some examples of how they are used.
PLC timers are internal PLC instructions that can be used to delay input and output signals in the PLC program.
These timers operate like relay timers but you cannot hold a PLC timer in your hand and they do not need to be connected to wires to operate.
Types of PLC timers
There are three main types of PLC timers:
– The on-delay timer,
– The off-delay timer,
– The retentive on-delay timer.
PLC timer values
All of these PLC timers have a timer file name, a preset value, an accumulated value, a timer enabled bit, a timer timing bit, and a timer done bit.
Timer file name
The timer file name is a PLC tag. This tag is where you can find the timer’s preset and accumulated values and the timer enabled, timing, and done bits.
Some PLCs create the timer file name for you and other PLCs have you create the timer file name.
For all of my timer examples, I will use the timer file name Timer1. I will also use a selector switch to enable and disable the timers.
Timer preset value
The timer preset value is the number that shows the delay length of the timer.
This number can be changed by just typing it in or you can have the PLC write a number into this value. This number does not change during the timer’s normal operation.
Timer accumulated value
The timer accumulated value is the number that shows how long the timer has been timing.
The timer accumulated value does not function the same on all of these timers. I will explain how this value accumulates time as I explain how each timer works.
Timer enabled bit
The timer enabled bit will be on when the timer is enabled.
Timer timing bit
The timer timing bit will be on when the timer is timing.
Timer done bit
The timer done bit does not function the same on all of these timers. I will explain how the timer done bits works as I explain how each timer works.
PLC timer examples
But the things you will learn here in these examples can be applied to any other PLC software. Because the overall timer functions are pretty much the same for any other PLC brand.
For the first example, I will talk about the on-delay timer.
Let’s start by placing a new on-delay timer instruction on a PLC rung with a selector switch input.
Type the timer file name Timer1.
Next, enter the timer preset so that it equals ten seconds. Notice that I typed ten thousand, I did this because the time base of the timer I used is in milliseconds and ten thousand milliseconds equals ten seconds.
Not all PLC timers use the same time base, some have time bases that cannot be changed while others will give you multiple time base options.
This PLC on-delay timer is now set up and ready to use.
How does an on-delay timer work?
Next, I will discuss what happens to the PLC on-delay timer when the selector switch gets turned on and off.
– When you turn on the selector switch, the timer enabled bit and timer timing bit turn on and the timer’s accumulated value starts accumulating time.
– If you leave the selector switch on, the timer’s accumulated value will reach ten thousand. When it does, the timer will stop accumulating time, the timer timing bit will turn off, and the timer done bit will turn on.
– At this point, when you turn off the selector switch the timer accumulated value will reset back to zero, and the timer enabled and timer done bits will turn off.
– If you turn off the selector switch before the timer is done timing, the timer accumulated value will reset back to zero and all of the timer bits will be off.
On-delay timer applications
On-delay timers are used a lot in PLC programs and in many different ways. For example, an on-delay timer can be used on a conveyor’s start button.
The timer could be set up so that the start button would need to be pushed and held for five seconds before the conveyor would start.
Another on-delay timer could also be set up to sound a conveyor start-up warning horn and light.
Now let’s talk about off-delay timers.
Setting up an off-delay timer is the same as an on-delay timer, place the timer off-delay instruction on a PLC rung with a selector switch input and type ten thousand in the timer’s preset.
How does an off-delay timer work?
Next, I will discuss what happens to the PLC off-delay timer when the selector switch gets turned on and off.
– When you turn on the selector switch, the timer’s accumulated value resets to zero, and the timer enabled bit and the timer “done bit” turn on.
– When you turn off the selector switch, the timer accumulated value will start accumulating time, the timer enabled bit will turn off, the timer timing bit will turn on and the timer done bit will stay on.
– If you leave the selector switch off, the timer’s accumulated value will reach ten thousand. When it does, the timer will stop accumulating time, the timer timing bit and the timer done bit will turn off.
– If you turn on the selector switch before the timer is done timing, the timer accumulated value will reset back to zero, the timer enabled bit will turn on, the timer timing bit will turn off and the timer done bit will stay on.
Off-delay timer applications
Off-delay timers are used when you need something to stay running longer than everything else. For example, cooling fans and pumps might continue to run after a machine pauses from doing work.
Retentive on-delay timer
Retentive on-delay timers are a lot like on-delay timers. They get set up the same way and the bits react in the same way.
The only major difference with retentive on-delay timers is how the timer accumulated value acts when you turn the selector switch on and off and that it needs a reset bit.
How does an retentive on-delay work?
– For an retentive on-delay, when the selector switch is turned on, the retentive on-delay timer accumulated value starts accumulating time, the timer enabled bit turns on, and the timer timing bit turns on.
– If the selector switch is left on, the accumulated value will reach ten thousand, the timer will stop accumulating time, the timer enabled bit will stay on, the timer timing bit will turn off, and the timer done bit will turn on.
– At this point, if the selector switch is turned off, the accumulated value will stay ten thousand, the timer enabled bit will turn off, the timer timing bit will stay off, and the timer done bit will stay on.
– If the selector switch is turned back on, only the timer “enabled bit” will turn on, everything else will stay the same.
To reset the accumulated value of a retentive on-delay timer, a timer reset bit will need to be added to the PLC program. I will use a momentary push button to trigger this reset bit.
– When the selector switch is off and the timer reset button is pushed, the timer accumulated value will reset to zero and the timer done bit will turn off.
Retentive on-delay Applications
Retentive on-delay timers can be used to track the runtime of equipment. They can be set up to trigger an indicator light to let someone know the equipment has run long enough and requires maintenance to inspect and clean it.
In review, by reading this article you have learned about:
– The three main types of PLC timers:
- Retentive on-delay.
– You also learned that these timers have:
- A preset value,
- An accumulated value,
- An enabled bit,
- A timing bit,
- A done bit.
– You have also learned some examples of where these timers are used.
Please let us know if you have any questions about the three main types of PLC timers in the comments below and we will get back to you in less than 24 hours.
Got a friend, client, or colleague who could use some of this information? Please share this article.
In this blog post, you’ll learn about the mindset that helped me getting a PLC programming job with NO experience. This is my personal experience as someone who searched for a job in this field and as an employer who reviews resumes and interviews candidates for a variety of projects. So let’s get started!
In the world of industrial automation, a Factory Acceptance Test or FAT is simply a test for a newly manufactured control system that takes place at your factory or your workshop before you ship the control panel to the customer. With a Factory Acceptance Test, you...
In this article, we're going to talk about different types of pressure switches and how they operate. Ok… Let’s go… Pressure sensor familyDepending on who you talk to, pressure switches fall under the Pressure Sensor category. Some people will tell you that a Pressure...
Learn how to program PLCs, install and wire industrial devices, and at the same time purchase them online.
+31 10 316 6400
Mon - Fri 8:30 am to 5:30 pm (CET)
Rotterdam Science Tower, Marconistraat 16,
3029AK Rotterdam, Netherlands
© 2021 RealPars B.V. All rights reserved.
Created with coffee and tea in Rotterdam.