Everything around us is evolving towards automation. Here, our PLC (Programmable Logic Controller) has played a big role. In PLC automation, there are different specifications of different types of PLC programming instructions for us to use. Among these PLC ladder diagram (LD) programming instructions, the timer instruction is one of the most important instructions, and it plays a very important role. This time, I will describe the PLC timer in detail through programming instructions and functions.
Let’s start from the beginning.
What is a PLC timer?
- The basic internal circuit of PLC timer 1. Input and output module 2. Power supply module 3. Internal timer circuit 4. Timer digital display
- What is the type of PLC timer? 1. Turn on the delay timer (TON) 2. Turn off the delay timer (TOFF) 3. Retentive on/off timer (RTO)
- Timer instruction address of multiple SCADA brands 1. Address for ABB PLC 2. Address for AB (Rockwell) PLC 3. Address for Siemens PLC 4. Address for Delta PLC 5. Address for Mitsubishi PLC
- Example based on PLC timer instruction
- What are the applications of timer instructions?
What is a PLC timer?
The PLC timer is an instruction to control and operate equipment within a specific period of time. Using a timer, we can perform any specific operation within a specific period of time. We can set up time-based activities with the help of PLC programming timer instructions. Each PLC has different timer functions. Timer instructions are used to provide programming logic and decide when to open or close the circuit. It has normally open (NO) or normally closed (NC) contacts. Let us see here the representation of the input and output timers NO and NC contacts in LD programming. The timer output contacts are displayed in coil form, box form or rectangular form. In AB and Siemens PLC, it is represented by a box shape. If you want to perform work or equipment activities within a specific time frame, you must be familiar with timers. For this, we must learn the I/O timer instructions used to write PLC programs. In Ladder Diagram (LD) PLC programming, we can set the PLC timer from milliseconds (ms) to hours (hr).
Let us look at the internal circuit of the timer.
The basic internal circuit of the HMI timer
Now, we are looking at the internal timer circuit of the PLC. The operation of the timer circuit is based on four main parts.
Each internal part of the timer circuit has various functions. This is how they are connected and constructed in a given graph.
The following are some basic terms we need to know about timers used in PLCs.
1. Input and output modules
The module that interacts with the input signal is called the input module. The input module needs to be connected to the timer circuit to provide input signals.
The module that interacts with the output signal is called the output module. The output module needs to be connected to the timer circuit.
2. Power module
The power module provides power for the normal operation of the timer circuit. It can be connected to an AC voltage source (for example, 120, 230 V AC) or a DC voltage source (for example, 5, 12, 24 V DC).
3. Internal timer circuit
The timer circuit performs set and reset functions.
If the auxiliary power supply is “on”, the timer will provide instantaneous input pulses for setting and reset operations.
4. Timer digital display
The digital timer displays the set and elapsed timing values.
For automation, these values can be displayed within a few milliseconds (ms). This will make it easy to track your automation system.
What is the type of PLC timer?
For ladder diagram programming, the classification of the PLC programming timer is-
1. Turn on the delay timer (TON)
A delay timer (TON) is a programming instruction used to start instantaneous pulses within a set period of time.
Let us look at the simple structure of AB PLC delay timer programming instructions.
2. Turn off the delay timer (TOFF)
The time delay (TOF) timer is a PLC programming instruction used to turn off the output or the system after a certain period of time.
See here, the basic structure of AB PLC close delay timer programming instruction.
3. Retentive on/off timer (RTO)
RTO main function for saving or storing settings (cumulative) time.
RTO will be used when the cascade status changes, power loss or any interruption in the system.
In AB PLC, the retentive timer instructions are as follows.
We can briefly understand various types of PLC timers through examples.
Timer instruction address of multiple PLC brands
We have seen that three timers provide a delay function to control the operation of the PLC. The timer handles four main values.
- Timer address
- default value
- Basic timer value
- Cumulative value
Each timer instruction has three very useful status bits. These bits are…
- Enable bit (EN)
- Timer timing position (TT)
- Done bit (DN).
In AB and Siemens PLC, the output bit is usually called the “done bit” of the timer. And it indicates that the timer has reached its preset time.
1. Addressing ABB PLC
In ABB HMI programming, we can simply program the I/O timer address of the ladder diagram. We can set the timer value between ” T0 ” and ” T255 “.
You can see the I/O contact representation diagram above.
2. Addressing AB (Rockwell) PLC
For AB PLC, the address range of the timer is from ” T4:0″ to ” T4:255 “.
Among them, T4 is the file type.
The addressing format of the timer instruction with three status bits.
- The address range of the enable bit (EN) is from’T4: 0 / EN’ to’T4: 255 / EN’.
- The addressing range of the timer timing bit (TT) is from’T4:0 / TT’ to’T4: 255 / TT’.
- The completion bit (DN) address ranges from’T4:0 / DN’ to’T4: 255 / DN’.
3. Address of Siemens PLC
In Siemens, five types of timers can be used to write LD programs.
- Pulse timer (S_Pulse)
- Pulse extension timer (S_PExT)
- Delay timer (S_ODT)
- Delay extended timer (S_ODTS)
- Off delay timer (S_OffDT)
The general block diagram of the timer (in Siemens ),
S-the set value or signal of the timer
TV-time variable. It is used to store time values in the following form:
You can enter a time value between 1 and 9990 seconds.
R-timer reset value
BI-current time in binary code
BCD-current time (binary decimal code)
4. Addressing Delta PLC
For WPLSoft software (Delta ), you can use timer addressing, ranging from ‘ T0′ to’ T127 ‘.
In Delta PLC, enter the timer address as shown in the general representation (T0, T1, … T127). And the form of the output coil is
“T0” is the timer address, “K” is a constant item
Block diagram of Delta PLC timer:
For Delta PLC, the timer will start for 10 seconds. It should be written in the form of “T0 K100”.
5. Address of Mitsubishi PLC
Both Mitsubishi PLC and Delta HMI use the same timer addressing format.
Example based on PLC timer instruction
The most basic and practical example is the use of PLC to automatically control traffic signals.
After a certain (fixed) time, each side signal must be turned on and off. Only one traffic light should be turned on at a time.
A simple PLC timer can be used to implement this logic.
What are the applications of timer instructions?
These are some basic applications of timers that can be used in the PLC automation environment.
- Used for delayed action
- Used to run or stop operations according to user commands.
- The RTO timer helps to record or maintain intermediate time values.
All this is related to the PLC timer. This is a topic that can be said a lot. I just talked briefly this time. If you have any questions, please feel free to ask in the comments.
If you want a detailed application of the PLC , we will talk about it later.