PLC

PLC Ladder logic example for beginners: Four-Way traffic light control using Siemens PLC

PLC Ladder logic example for beginners: Four-Way traffic light control using Siemens PLC

Let’s discuss the four-way traffic light control and solution based on PLC controller using ladder logic program. For this purpose, we have used Siemens PLC software TIA PORTAL V15 for developing the ladder logic program. This is one of the common examples for PLC programming beginners.

FOUR-WAY TRAFFIC LIGHT CONTROL DIAGRAM

CONTROL SOLUTION:

There are so many ways to develop a program for traffic light control using a ladder logic program. But here normal inputs, outputs and timers are used with time delay to switch on and switch off the desired outputs at desired sequence as shown in the table below.

This system is designed to control the traffic light automatically and to switch on and switch off according to the sequence of operation to control the traffic congestion.

SIEMENS TIA PORTAL V15 is used for developing this control philosophy.

LIST OF INPUTS AND OUTPUTS FOR FOUR-WAY TRAFFIC LIGHT CONTROL

For the four-way traffic light control system, we are using 12 outputs, 2 inputs, one memory and On-Delay timers as shown in the table below

CONTROL PHILOSOPHY ASSUMPTIONS:

This program is designed with the below-mentioned assumptions in mind

1. At one point in time, only one side of traffic is allowed
2. Only free left is allowed (Considering Right-hand driving condition)
3. The traffic light turns yellow before doing any signal switchover
4. Start/Stop buttons are Pushbuttons (Momentary contact)

SEQUENCE OF OPERATION

It describes the systematic steps to turn on the output of traffic light lamps. The sequence is shown below

LOGIC DESCRIPTION

In this project On delay, timer plays a major role in this program.

What is on delay timer?

The on-delay timers are mostly used in electric circuits. In the program part, on delay timer is most commonly used in the PLC ladder logic system. The on-delay means delayed switching on the outputs (NO) contact this means that timer does not change to close contact until the preset time is reached. This type of timer is called as ON DELAY timer

In this project, a ladder logic program is used. Here I am going to explain the logic of each rung, in Siemens rungs are represented as networks, so rungs will be explained as networks hereafter.

NETWORK 1

Control Philosophy: To start/stop the sequence

When the start pushbutton (%I0.0) is pressed NO contact gets energized, resulting the memory bit (%M0.0) turning “ON”

Since the memory bit is connected in the rung parallel to the start pushbutton, the memory bit will keep latched until someone push the stop pushbutton (%I0.1).

When the stop pushbutton (%I0.1) is pressed NC contact gets energized, resulting in the memory bit (%M0.0) turning “OFF”, which results in stopping the entire sequence.

NETWORK 2

Control Philosophy: At this step, the East traffic light will be Green and all other lights will be Red

When the memory bit is on and since the timer DB7 done bit is (NC) contact state. The timer DB0 starts to run according to the preset time.

Since the timer DB0 done bit is (NC) contact state as a result the output East Green (%Q0.0) will be on until it reaches the preset value of the timer DB0.

The same logic is applicable for the output North Red (%Q0.1) & West Red (Q0.2).

For the output North Red rung the timer done bit DB0 (NC) and the timer done bit DB3 (NO) contact is connected parallel.

And for the output West Red, the timer done bit DB2 (NC), and the timer done bit DB5 (NO) is connected parallel.

For the output South red Since the timer is done bit DB4 (NC) contact state, as a result, the output South Red (%Q0.3) will be on until it reaches the preset value of the timer DB4

NETWORK 3

Control Philosophy: At this step, East and North traffic light will be yellow and all other lights will be Red

Since the memory, bit is on and the timer DB0 done bit NO contact is energized resulting in the timer DB1 starting to run according to the preset time

Since the timer DB1 is in NC contact state as a result the output East yellow (%Q0.4) is on until it reached the preset value of the timer DB1. Once it attained the preset value the output will be off. In this rung its connected parallel to the timer DB1 done bit and DB6 done bit. Hence DB6 done bit is in NO contact state

Same for output North yellow since the timer DB1 done bit is in NC contact state as a result the output (%Q0.5) is on until it reaches to the preset value of the timer DB1.In this rung its connected parallel to the timer DB1 done bit and DB2 done bit .Hence DB2 done bit is in NO contact and DB3 done bit NC contact connected in series

NETWORK 4

Control Philosophy: At this step, the North traffic light will be green and all other lights will be Red

Since the memory bit is on and the timer DB1 done bit NO contact is energized, the timer DB2 seconds starts to run according to the preset time.Once the DB1 NO contact is energized the output East Red (%Q0.6) is on

Since the timer DB2 done bit is in NC contact state resulting output North green (%Q0.7) is on until it reaches to the preset value of timer DB2

NETWORK 5

Control Philosophy: At this step, the West and North traffic light will be yellow and all other lights will be Red.

Since the memory, bit is on and the timer DB2 done bit NO contact is energized the timer DB3 seconds starts to run according to the preset time.

Since the timer DB3 done bit is in NC contact state resulting the output West Yellow (%Q1.0) is on until it reaches the preset value of the timer DB3.In this rung timer DB5 done bit NC contact and DB4 done bit NO contact  is  connected in series and it both connect parallel to the DB3 done bit

NETWORK 6:

Control Philosophy: At this step, the West traffic light will be green and all other lights will be Red.

Since the memory, bit is on and the timer DB3 done bit NO contact is energized the timer DB4 seconds starts to run according to the preset time.

Since the timer DB4 done bit is in NC contact state as a result the output West green (%Q1.1) is on until it reaches the preset value of the timer DB4.

NETWORK 7:

Control Philosophy: At this step, South Yellow output will be on initially and South Green traffic light will be made on and all other lights will be Red.

Since the memory, bit is on and the timer DB4 done bit NO contact is energized the timer DB5 starts to run according to the preset time.

Since the timer DB5 done bit is in NC contact state resulting from the output South yellow (%Q1.2) is until it reached to the preset value of the timer DB5. In this rung   DB7 done bit NC contact and DB6 done bit NO contact connected in series and its connected parallel to DB5 done bit

Once the timer DB 5 done bit NO contact has energized the output South Green (%Q1.3) is on since the timer DB6 done bit NC contact connected series to DB5 done bit.

NETWORK 8

Control Philosophy: At this step, Timer DB7 is the purpose to run the program in cycle sequence