Programming a Traffic Light Control System using SIMATIC S7-300 PLC, WinCC, and PanelMaster HMI displays

Programming a Traffic Light Control System using SIMATIC S7-300 PLC, WinCC, and PanelMaster HMI displays
0 votes, 0.00 avg. rating (0% score)
Programming a Traffic Light Control System using SIMATIC S7-300 PLC, WinCC, and PanelMaster HMI displays

Programming a Traffic Light Control System using SIMATIC S7-300 PLC, WinCC, and PanelMaster HMI displays


Product details:
Book Title: Programming a Traffic Light Control System using SIMATIC S7-300 PLC, WinCC, and PanelMaster HMI displays
Author: Seyedreza Fattahzadeh

Published on: 2014
Binding: E-book in PDF format would be shipped on a CD ROM
Format: PDF file
Number of pages: 135

Included Application programs:

Main PLC control program, WinCC and HMI software
ISBN: 978-0-9839005-5-9


This is a much repeated question from those who are interested to learn program a PLC that I often receive from my site visitors.
As an example, most of these guys out there are already some type of licensed tech   who are working in plants as electricians etc for different companies and would like to get some hands on experience with PLC’s. Most of them when they ask their company for training in the field they might get the response that “it’s not his job”?? Go Figure??? So, most of these guys would decide to learn on their own by the use of books such as the one from different PLC related sites but the problem is that they are not able to put what they have learned into a real life action.
Companies do not want to take a chance on training someone on there equipment and I don’t blame them. I would never let anyone work on something without proper guidance myself.

?So, their question from me is how can they get their hands on experience with PLC’s
Most of these guys are even willing to work for a company part time after their normal hours thinking that they have to give a little in order to get a lot!! But most of time even this I guess is not that much appealing to the employers anyway
I have always felt that once one learn the basics it is fairly easy to cross apply his knowledge. Both SIEMENS and AB are very widely used and have in my opinion the best software for programming PLC’s that I have ever seen. I was trained on SIEMENS stuff and I found it very easy to learn and use and didn’t care much for other manufacturer’s software. Several of my friends at work have cut their teeth on other platforms such as Automation Directs Direct SOFT and they think that AB or SIEMENS are harder to use. I use both now on a regular basis. I like both and find them on about the same level of usability. So I guess it is mainly a matter of opinion.

My suggestion for those who are looking to better themselves in their current jobs, or are in school and want to learn programming PLCs is that you would likely benefit the most from your learning process to take these few steps seriously:

Step 1: Get a self tech manual, an inexpensive PLC and software

From few years ago, I have authored few very good self teach manuals about both programming SIEMENS and AB family of PLCs.

These are sets of college to professional level Manuals and learning materials for PLC/robotics based control systems (in electronic format PDF format). The Manuals contain self study courses dealing with PLCs, control topics and focus on the Allen Bradley, and SIEMENS controllers when it comes to hardware or software applications.

I would suggest that you buy your self an inexpensive PLC and a software package like the SIEMENS SIMATIC S7-200, 300, or RSLogix 500 Starter Software. Most PLCs do operate in similar ways anyway. Look on Ebay used equipment and software. Throw together a bunch of switches, buttons, and lights and try to duplicate systems that you have seen in use around you or implement the little hardware sample exercises mentioned during content of the texts. That would give you some hands on programming experience. I feel that once you learn the basics it is fairly easy to cross apply your knowledge.

Step 2: Program the PLC, Break it, Fix it and continue reading the manual …

There are many PLC programming projects in the texts with solutions that you can try to write your version of programs to satisfy the problem’s defined set of conditions. By doing all these activities, at the end, you will learn and that is the goal of your learning project in Step 2.

Step 3: Applying for a job as a Professional PLC programmer

By writing small programs to learn how to use the PLC instructions is for the time you are taking an introductory course in collage to learn how to start programming a PLC to do BIG THINGS in future, BUT when you are applying for a job as a PLC programmer, the employer will NOT ASK you to write a PLC program just to “START”, and “STOP” a 3 phase electro motor, on the contrary , he will either take you to the field, show you some PLCs busy running and controlling some mechanical process and will ask you to either alter the existing program to suite the new needs coming soon or he will assign you a Functional Specification of some new system and will expect you to develop the control program and implement the hardware. He will expect you to understand the new plan and if you do not have any good question to ask, to get to work ASP and do it.

I have come up with a solution for those that do have the beginning knowledge on how to work with a typical PLC’s instructions BUT they need to practice on how to take a Functional Specification and turn it into a working PLC control program which is controlling lots of digital and analog functional blocks now.

The Project Functional Specification:

In this project, we are dealing with design and implementation of a Traffic Light Control system with a typical mid range PLC in our case, SIMATIC S7-300 model, WinCC and PanelMaster HMI displays.


According to figure 2, control program on PLC must be able to control (5 input signal and 41 outputs):

1- 8 x 2 digits countdown timers + 3 traffic signals on each PCB installed on each 4 intersections (and Main Street).

2- 1 x 6 digits seven segment display PCB + 2 sets of LEDs to display current TIME and DATE

3- 1 x 2 digits seven segment display PCB + 2 LED indicators to show the speed of passing car on main street (between two secondary intersections).

4- MAIN PCB which is feeding data to all PCBs and also connected to input signals such as 3 pushbuttons + 2 IR sensors.

With all these PCB wired to PLC’s I/O, the control program will control all displays and traffic signal lights independently. Number of PLC input / Output terminals are used 5 and 41 respectively!.  Schematic diagram of all PCBs are given in the text and you can even build any of them if you wish. Ladder Logic program developed for this phase has consisted of 177 networks that most of time each network is consisting of more than 5 to 10 simple instructions such as AND, OR ,Timers, counters… etc. So to develop a PLC control program to control all these numerical displays and Lights all in harmony is not easy! And when you do something like this on  your own, that is the time that you can tell the employer “YES I CAN DO IT” with lot’s of confidence. And since application of HMI devices nowadays in processes is a de facto standard, I have developed two more program software to allow system operator to monitor all activities related to this TRAFFIC LIGHT CONTROL system on a PanalMaster, and WiCC HMI device or on a PC’s monitor as well.

2- The PanelMaster application HMI program:

This second program which comes with the text, allows a typical HMI device to be connected to the PLC by which operator will be able to control or monitor all activities related to the TRAFFIC LIGHT CONTROL system independently.  All timings, data on all countdown timers, speedometer, state of signal lights, time, and date etc are shown on the HMI screen. The PDF file has a small tutorial guide to explain how those setting can be done to show all those data on the screen and relate those issued commands on the screen to the PLC program being executed. When the HMI program is loaded on to the device and executed, you are going to see a beautiful screen that shows all the activities going on related to the control of the system on the HMI device

3- Application of SIMATIC WinCC application program

The third program which comes with the project shows you how to develop a program using SIMATIC WinCC to implement a HMI screen on your PC’s monitor. In this case, you can also see all countdown timers and traffic light etc functioning in harmony and you can click on the START, STOP, and Emergency pushbuttons with your computer’s mouse and see the effect on the PLC running the control program.

Table of content:

Chapter 1

Overview of a Programmable Logic Controller (PLC)

How the Ladder Logic program is supposed to function?

Speedometer electronic circuitry

System hardware

Block diagram of the PLC system connected to HMI, main PCB etc

Schematic diagram of the main control PCB

Schematic diagram of 2 × 7-segment digits display PCB

Chapter 2

Developing main control software for S7-300 PLC

Coding for the second intersection

Coding for the third intersection

The Emergency mode

Controlling the countdown timer displays

Addressing the countdown timer displays

Coding to display number 00 when system is on its emergency mode

Using System Function Blocks to display current Time and Date

Measuring speed of a passing car and comparing it with 30 Km/h speed limit

Chapter 3 – Adding an HMI display to our traffic light system project

Installation of a typical HMI LCD touch control panel

Altering the control program to establish connection to HMI

Installation of a PanelMaster LCD touch control panel

Screen design of HMI device

Chapter 4- Application of the WinCC Explorer as an HMI task

Developing an HMI application with SIMATIC WinCC program

To watch the performance of the project tested in our lab, click on the following link :

One thought on “Programming a Traffic Light Control System using SIMATIC S7-300 PLC, WinCC, and PanelMaster HMI displays

  1. Good day ,
    kindly let me know if the book “Programming a Traffic Light Control System, using S7-300, WinCC” comes with an S7-300 demo software, if not please let me know where I can procure a student version of this software.
    thanking you in anticipation.
    yours sincerely: i.geerowar

Leave a Reply

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