Inst ToolsInst ToolsInst Tools
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Search
  • Books
  • Software
  • Projects
  • Process
  • Tools
  • Basics
  • Formula
  • Power Plant
  • Root Cause Analysis
  • Electrical Basics
  • Animation
  • Standards
  • 4-20 mA Course
  • Siemens PLC Course
Reading: Complete PLC Project: Traffic Light Auto and Manual Automation
Share
Notification Show More
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • Design
  • PLC
  • Interview
  • Control System
Search
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > PLC Tutorials > Complete PLC Project: Traffic Light Auto and Manual Automation

Complete PLC Project: Traffic Light Auto and Manual Automation

Master the Traffic Light System's Auto and Manual Automation modes and complete PLC project for traffic management solutions.

Last updated: June 30, 2025 6:38 am
Editorial Staff
PLC Tutorials
No Comments
Share
7 Min Read
SHARE

This article will discuss the complete PLC project for the Traffic Light System that can be run in Auto or Manual mode using the XG-5000 software. When the system is running in Auto mode, the Green, Yellow, and Red lights will turn ON alternately at different time intervals as designed for our application. When the system is running in Manual mode, each light can only be turned ON or OFF using the respective buttons.

Contents
Program ObjectiveTraffic Light Auto and Manual AutomationProgram I/O DetailsComplete PLC Project

Program Objective

PLC project for traffic signals automation

The Traffic Light Sequence as follows:

a. Auto Mode:

In the auto mode, the Selector Switch position needs to be changed to “Auto” mode.

  • Initial Cycle: When the program is started in automatic mode, the green lamp will be ON first.  
  • Color Change Sequence: After the Green lamp is ON for 5 seconds, the Yellow lamp will turn ON for 3 seconds. Next, the Red lamp will turn ON for 4 seconds.
  • Cycle Repetition: After the Red lamp turns OFF, the cycle will repeat from the beginning, with the Green lamp turning ON again for 5 seconds, and so on.
  • Repeating Process: This color changing process will continue to repeat automatically as long as the program is Run in this mode and will stop if the “Stop” button is Pressed.

b. Manual Mode:

In this mode, the Selector Switch needs to be changed to the “Manual” mode, and each lamp can be turned ON or OFF individually using a button.

There are three buttons, each controlling one lamp (Green, Yellow, and Red).

Traffic Light Auto and Manual Automation

Complete PLC Project - Traffic Light Auto and Manual Automation

Program I/O Details

S.No.CommentInput (I)Output(Q)Memory BitTimer
 1STARTP0000   
 2STOPP0001   
 3SELECTOR_SWITCHP0002   
 4PB_GREENP0003   
 5PB_YELLOWP0004   
 6PB_REDP0005   
 7LAMP_GREEN P0040  
 8LAMP_YELLOW P0041  
 9LAMP_RED P0042  
 10TIMER1   T000
 11TIMER2   T001
 12TIMER3   T002
 13SYSTEM_ON  M0000 
 14IR_GREEN  M0001 
 15IR_YELLOW  M0002 
 16IR_RED  M0003 

Complete PLC Project

Traffic light PLC programming tutorial

RUNG 1 (START SYSTEM)

In this Rung, the memory bit SYSTEM_ON (M0000) will be in the HIGH state when the START button (P0000) is Pressed. Because it uses the SET Coil Instruction, the memory bit SYSTEM_ON (M0000) will remain in the HIGH state even though the START (P0000) button has been Released.

RUNG 4 (STOP SYSTEM)

In this Rung, the memory bit SYSTEM_ON (M0000) will be in the LOW state if the STOP (P0001) button is Pressed. Because it uses the RESET Coil Instruction, the memory bit SYSTEM_ON (M0000) will remain in the HIGH state even though the STOP (P0001) button has been Released.

Automatic and manual traffic light control using PLC

RUNG 7 (AUTO MODE)

In this Rung, when the NO contact of memory bit SYSTEM_ON (M0000) and the NO contact of Selector Switch SELECTOR_SWITCH (P0002) are in the HIGH state, then the memory bit IR_GREEN (M0001) will be in the HIGH state and the timer TIMER1 (T000) will Start counting up to 5 seconds.

When Timer TIMER1 (T000) has finished counting, the memory bit IR_GREEN (M0001) will be in the LOW state, and the memory bit IR_YELLOW (M0002) will be in the HIGH state. Timer TIMER2 (T001) will Start counting up to 3 seconds.

When Timer TIMER2 (T001) has finished counting, the memory bit IR_YELLOW (M0002) will be in the LOW state, and the memory bit IR_RED (M0003) will be in the HIGH state. Timer TIMER3 (T002) will Start counting up to 4 seconds.

Next, when Timer TIMER3 (T002) has finished counting, Timer TIMER1 (T000) will be Reset due to the interlock of Timer TIMER3 (T002).

PLC based smart traffic management system

RUNG 32 (OUT LAMP GREEN)

In this Rung, when the NO contact of memory bit SYSTEM_ON (M0000) is in the HIGH state, the NC contact of Selector Switch SELECTOR_SWITCH (P0002) is in the LOW state and the PB_GREEN (P0003) button has been Pressed, then the LAMP_GREEN (P0040) output will be ON. .

Or, if the NO contact of the memory bit IR_GREEN (M0001) is in the HIGH state, then the LAMP_GREEN (P0040) output will be ON.

RUNG 39 (OUT LAMP YELLOW)

In this Rung, when the NO contact of memory bit SYSTEM_ON (M0000) is in the HIGH state, the NC contact of Selector Switch SELECTOR_SWITCH (P0002) is in the LOW state, and the PB_YELLOW (P0004) button has been Pressed, then the output LAMP_YELLOW (P0041) will be ON.

Or, if the NO contact of memory bit IR_YELLOW (M0002) is in the HIGH state, then the LAMP_YELLOW (P0041) output will be ON.

Complete PLC project for traffic control system

RUNG 46 (OUT LAMP RED)

In this Rung, when the NO contact of memory bit SYSTEM_ON (M0000) in the HIGH state, the NC contact of Selector Switch SELECTOR_SWITCH (P0002) in the LOW state and the PB_ RED (P0005) button has been Pressed, the output LAMP_ RED (P0042) will be to be ON.

Or, if the NO contact of memory bit IR_RED (M0003) is in the HIGH state, then the LAMP_RED (P0042) output will be ON.

Read Next:

  • PLC Program for Traffic Light Sequence
  • Siemens LOGO PLC Programming Course
  • Functional Block Diagram of Studio 5000
  • Why is 24 Volts Commonly used in PLC?
  • Functional Block Diagram for Traffic Lights

Don't Miss Our Updates
Be the first to get exclusive content straight to your email.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
You've successfully subscribed !

Continue Reading

How to Configure PID Controller in Various Schneider PLCs?
One-Shot Rising and Falling Edge Instructions in Rockwell PLC
How Engineers Effectively do Problem-solve and Troubleshoot?
Documentation and Change Control of PLC or DCS Systems
Dosing Pump PLC Logic
ESG in Industrial PLC Automation Systems
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

128.3kFollowersLike
69.1kFollowersFollow
210kSubscribersSubscribe
38kFollowersFollow

Categories

Explore More

Vijeo Designer software – Import and Export
What is Trace Function in Tia Portal?
How to use Sub Routines with Allen Bradley PLC
Process Interlocks and Trips
PID Simulator Download
Automatic Curtain Control – PLC Programming Solution
Comparator in PLC Programming
Ladder Logic Example of Two Motors Interlinked with another Motor

Keep Learning

Siemens TIA Portal program blocks

Tia Portal – Optimized and Standard Data Block Access

PLC Programming Software

What Factors Affect the Choice of PLC Programming Software?

HMI

Learn about SCADA and HMI Systems

ControlLogix

Difference Between CompactLogix and ControlLogix

Rewire Tool

What is Rewire Tool in Simatic Manager?

PLC Cabinet

PLC Programming Videos

PLC Program with 2 Toggle Switches and 4 Motors

PLC Program with 2 Toggle Switches and 4 Motors

PLC control 4 machines with 1 button

CX-Programmer Tutorial: 1 Button To Activate 4 Different Machines

Learn More

Digital output block add-on for Variable speed drive

Steps to Import PlantPAx Add-On Instructions in Studio 5000

HVAC System

What is HVAC System?

Testing and Validation in PLC Development

Testing and Validation in PLC Development

Triangle A-B-C- with Arc “A-C”

Instrument Tube Fitting Installation – Part 2

Multiple Position Calibration of Temperature Chamber (Mapping)

Multiple Position Calibration of Temperature Chamber

Function Module in Siemens PLC

What is Function Module in Siemens PLC?

Sampling Circuits Objective Questions

Sampling Circuits Objective Questions

Retentive ON delay timer using PLC Logic

Retentive ON Delay Timer using PLC

Menu

  • About
  • Privacy Policy
  • Copyright

Quick Links

  • Learn PLC
  • Helping Hand
  • Part Time Job

YouTube Subscribe

Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?