Programming a TRAFFIC LIGHT CONTROL system with SIMATIC STEP 7 / WinCC and PM Designer software

Programming a TRAFFIC LIGHT CONTROL system with SIMATIC STEP 7 / WinCC and  PM Designer software

Author: Seyedreza Fattahzadeh 
Product Group eBook 
Format: PDF file
Number of pages:135

Included Application programs:

A Main PLC control program +

A  WinCC explore based software as a PC based HMI software for this project

A PM Designer based software to manage a HMI application for this project

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.

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. Theseare 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.

Step 2: Programming any type of PLC, breaking, fixing it, going back to step 1 until to be able to write a control PLC program for a relatively simple standard PLC-based circuit in about 30 minutes at the most! As an example, my AB, S7-200, and S7-300 e-books come with some carefully designed complementary projects all with solutions.

 Step 3: Applying for an Entry Level PLC Programming job

By writing programs consisting of few networks are for the time one want to learn is for the time you are taking an introductory course in collage to learn how to start programming a PLC by learning how each PLC instruction functions , 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, and asks you to either alter an existing PLC program or he will assign you a Functional Specification related to some new system and will expect you to develop the control program and implement the hardware/software to satisfy the need. 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.

That is why most PLC based hiring advertisements ask job looking individuals to be able to satisfy  some typical requirements such as  for example future PLC programmers must "have proven experience in PLC logic and programming with any of the following PLCs: Allen Bradley, Siemens, Mitsubishi  etc.  Must be able to create and read logic and flow diagrams for program design, programming, simulation and testing, and start-up" A minimum of xx years experience in a similar position is required.  Experience in Automotive, Food Processing, Bio-Tech, Pharmaceutical, Semiconductor".

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 aTraffic Light Control system with a typical mid range PLC in our case, SIMATIC S7-300 model, which is accompanied with some application programs developed based on WinCC Explorer and a typical HMI display platforms.


According to the project requirement, the control program on PLC must be able to control (5 input and 41 output signals):

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

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

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

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

With all these PCB wired to PLC's I/Os, 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 diagrams 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 project has consisted of 177 networks that most of time each network is consisted of more than 5 to 10 simple instructions such as AND, OR , and usage of Timers, counters instructions etc. So to learn to develop a PLC control program to control all these numerical LED displays and stop lights all in harmony is not easy! And when you become experienced enough in the PLC programming to develop a control programs similar to the one suggested for this project,  on your own, that is the time that you can tell your future 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 programs to allow a system operator to monitor all the activities related to the project on a PM Designer or WiCC Explorer based HMI display devices. So, by investigating how these two application software are functioning, you can get the primary knowledge to interface a PLC to a typical HMI or a PC based monitoring device.

2- The PM Designer software based 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 this project 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 the WinCC Explorer-basedprogram

The third program which also comes with the project guides to learn to develop a program using SIMATIC WinCC Explorer to implement a HMI screen on your PC's monitor. In this case, you can also view all countdown timers and traffic light etc functioning in an harmony and you can click on the START, STOP, and Emergency icon buttons with your computer's mouse to see the effect on the PLC running the main control program.

The topics discussed in this text are as following:

Overview of a Programmable Logic Controller (PLC), How the Ladder Logic program is supposed to function?, a typical 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, Developing main control software for S7-300 PLC, Coding for the second intersection, Coding for the third intersection, The Emergency mode, Controlling and addressing the countdown timer displays, the Coding to display number 00 when system is on its emergency mode, Measuring speed of a passing car and comparing it with 30 Km/h speed limit, 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 and application of  a PanelMaster made LCD touch screen HMI device, Application of the WinCC Explorer as an HMI task, developing an HMI application with SIMATIC WinCC Explorer program,

To watch the performance of the project tested in our lab, play the movie