The PLC Timer
The PLC Timer
The I/O timer instructions for writing the PLC program is important. In the Ladder Diagram
(LD) PLC programming, the PLC timer can be set from millisecond (ms) to hour (hr) time
range.
Basic Internal Circuit of PLC Timer
The working of the timer circuit is based on the four main parts. Each of the internal parts of
the timer circuit has various features and functions.
Page 1 of 9
Here are some of the basic terminologies you need to understand about timer used in the PLC.
1. Input and Output Modules
The module which interacts with the input signal is called as Input Module. Input module
requires to connect to the timer circuit for providing the input signal.
The module which interacts with the output signal is called as Output Module. The output
module is required to connect the timer circuit.
2. Power Supply Module
The power module provides a power supply for the proper functioning of the timer circuit. It
can connect with the ac voltage source (like 120, 230 V AC) or dc voltage source (like 5,12,
24 V DC).
3. Internal Timer Circuit
The timer circuit performs the set and resets functions. If the auxiliary power supply is ‘on’,
the timer will give the momentary input pulse for the set and reset operation.
4. Timer Digital Display
The digital timer displays the set and elapsed timing value. For the automation purpose, the
values can be displayed in a few milliseconds (ms). This will be easy for tracking your
automation system.
Page 2 of 9
2. Off Delay Timer (TOFF)
An off-delay (TOFF) timer is a PLC programming instruction which use to switch off the
output or system after a certain amount of time.
See here, a basic structure of Allen Bradley PLC Off delay timer programming instruction.
Page 3 of 9
Each timer instruction has three very useful status bits. These bits are…
1. Enable bit (EN)
2. Timer Timing bit (TT)
3. Done Bit (DN).
In the Allen Bradley and Siemens PLC, the output bit is often called the timer’s ‘Done bit’.
And it indicates the timer has reached its preset time.
1. Addressing for ABB PLC
In the ABB PLC programming, we can simply write the I/O timer address of the ladder
diagram. We can set the timer value in ranges from ‘T0‘ to ‘T255‘.
2. Addressing for AB (Rockwell) PLC
For the AB PLC, the timer has the address ranging from ‘T4:0′ upto ‘T4:255‘, where, T4 is
the file type.
Addressing format for timer instruction with the three status bits.
File tpye: Element Number/ Bit status
1. Enable bit (EN) address is ranging from ‘T4:0/EN’ upto ‘T4:255/EN’.
2. The addressing for Timer timing bit (TT) is ranging from ‘T4:0/TT’ upto ‘T4:255/TT’.
3. Done bit (DN) address is ranging from ‘T4:0/DN’ upto ‘T4:255/DN’.
3. Addressing for Siemens PLC
In the Siemens, LD program can be written with the five types of timers.
Pulse timer (S_Pulse)
Pulse extended timer (S_PExT)
On delay timer (S_ODT)
On delay extended timer (S_ODTS)
Off delay timer (S_OffDT)
The general block diagram of the timer (In Siemens PLC),
Page 4 of 9
Where,
S – Set value or signal for the timer
TV – Time Variable. It is used to store time value in the form of S5T#tv. You can enter
the time value from 1 to 9990 seconds.
R- Reset value of the timer
Q – Output of the timer
BI – Current time in binary code
BCD – Current time in binary decimal code
4. Addressing for Delta PLC
For the WPLSoft software (Delta PLC), you can use timer addressing ranging from ‘T0′ to
‘T127‘.
In Delta PLC, input timer address is shown like general representation (T0, T1,…….. T127).
And Output coil is written in the form of
T(Address rang) K(10*timer value), where, ‘T0’ is timer address and ‘K’ is the constant term.
Delta PLC timer block diagram:
For Delta PLC, the timer starts for a 10-second. It should be written in the form of ‘T0 K100’.
5. Addressing for Mitsubishi PLC
Both, Mitsubishi PLC and Delta PLC, use the same timer addressing format.
Page 5 of 9
An Example Based on PLC Timer Instruction
The very basic and real-life example is controlling traffic signals using PLC automation. After
a certain (fixed) time, each side signal has to turn on and off. At any given time, only one side
traffic signal should be on.
This logic can be implemented using simple PLC timers.
Design Requirement
In PLC software, the ladder diagram programming language is used. As a part of this project,
we have to write the function of the PLC program which helps us to controls the signal
according to the time duration.
This project is based on three different compact PLC software. We need useful software
functions like input (I), output (O), memory (M), and timer (T) for writing the LD program.
These input and output functions consider as switches and lamps in the compact PLC,
respectively.
Prerequisite: Basic Parts of Ladder Diagram in PLC Programming
PLC Tools Used in the Project
1. Two Push-Button [PB1 & PB2]
2. Three Lamp Signal [Q1, Q2 & Q3]
3. One Memory [M]
4. Three Timers [T1, T2 & T3]
This is how the LD diagram looks like with these components on ABB PLC.
Page 6 of 9
An explanation of each connected LD diagram components is as follows:
Push-Button [PB]
In the PLC programming, the input (I) expresses as the push button (PB). There are two push
buttons- PB1 and PB2. The PB1 (I1) get NO (Normally Open) contact and PB2 (I2) get NC
(Normally Closed) contact.
The PB1 is used for the start signal. And PB2 is used for the stop the signal or emergency off
purpose. Both the inputs are connecting with the timers (T).
Output Coil or Lamp [Q]
In the LD programming, there are three outputs (Q1, Q2, and Q3), considered as lamp or output
coil.
The Q1 is considered as the red lamp.
The Q2 is considered as the yellow lamp.
And Q3 is considered as the green lamp.
These three lamps (Q1, Q2, and Q3) are connected with the different timers (T1, T2, and T3),
respectively.
Memory [M]
It is used for latching process and to store extra energy supply. This memory depicts input or
output functions (or coil).
Timers [T]
There are three timers (T1, T2.and T3) is connecting with the three output as per the duration
or time requirement. These timers follow delay timer.
T1 is connected to the red lamp (Q1) for the 5 seconds.
T2 is connected to the yellow lamp (Q2) for the 10 seconds.
And T3 is connected to the green lamp (Q3) for the 15 seconds.
Running Program on Different PLC Softwares
You can write a program on the different PLC software available. However, you must
remember the rules of writing a ladder diagram program.
I have written this traffic control system program on ABB, AB and Delta compact PLC
software. I have already shown the PLC program on ABB software above. Let’s check the LD
program on other two PLC software brands.
Page 7 of 9
Program on AB PLC Software
Page 8 of 9
Step 3: When the timer T2 (NO contact) gets NC, timer T3 gets activated. After that, the time
T3 is been set for 15 seconds. The green lamp (Q3) gets ON. red lamp (Q1) and a yellow lamp
(Q2) gets OFF.
Step 4: The process continues by using the NC contact timer T3 which is again connected to
the first rungs.
Step 5: If any interrupt or emergency occurred, in between, the system will be shut off for the
particular duration. This situation is controlled by the PB2.
Result Analysis
Only Red Lamp gets ON for the 5 seconds.
When Red Lamp goes off, Yellow Lamp gets ON for the 10 seconds.
When both the Red Lamp and Yellow Lamp goes off, Green Lamp gets on for the 15
seconds.
This cycling process will continue.
Use cases of This Project in Future
This project is a small demo to control the signals. To further extend, it can be used for
controlling the traffic signal.
You can tweak the timer and set different times for each signal, based on the traffic on
a particular route.
This simple automation can reduce human interaction for handling the traffic at signals.
It also reduces the overall cost for controlling traffic single manually.
Apart from the traffic signal, you can also extend this project for any signal
management project where you need to shift the signals after a certain time frame.
This is the simple Traffic Control System using PLC which is done with the help of PLC
programming and Ladder diagrams.
Page 9 of 9