Traffic lights noob.

solesillo

Member
Join Date
Nov 2011
Location
Santander
Posts
16
Hello, i know this is a 'too-repeated thread' in the forum, but i've tried to search my specific problem and i get no response at all.

I am a mechanical engineer, so I don't have a real interest in learning how to program PLCs, I did have it at first 'cause, honestly, is quite interesting, but time's showed me that Electronics should be understood in a part of my brain i don't know how to control yet, so I've abandoned my hope of completing the task by myself and start looking for help.

I need to program with S7-200 and Microwin, a traffic lights cross, NS and EW, with priority button for pedestrians and incoming signals for cars. one in each of the four traffic lights. The sensors and priority buttons, should substract 5 seconds of the other direction timing.

I already know how to make a single traffic light without priority buttons, as found here, http://isa.uniovi.es/~vsuarez/Download/problema_0203.pdf

In my task, I understand there will be 9 inputs:
-Start
- T.L. 1 Pedestrian button
- T.L. 2 Pedestrian button
- T.L. 3 Pedestrian button
- T.L. 4 Pedestrian button
- T.L. 1 traffic sensor
- T.L. 2 traffic sensor
- T.L. 3 traffic sensor
- T.L. 4 traffic sensor

Could you please help me and tip me what do I have to introduce to the circuit in order to make what i Want?
 
Do you know where can I hire it? I'd do it gladly. :ROFLMAO:

As you can see, i've asked for tips, in order to try to solve it myself, not the specific code (though i would love having it).
 
You said you already know how to the single with priority button. How did you do it? What is different? What would you need to add to make it meet the new requirements?

The first step of any automation project is to define your requirements. Alot of times, this can be done with a flow chart or a state diagram. What happens first? What happens next? How does it know to change? What if it fails or gets stuck?

That's why stop lights are often used as classroom examples - everybody already knows how they are supposed to work. What have you already learned in class? Homework does not usually lead to using something you haven't learned yet...
 
I will try to make this afternoon the state diagram and post it here.

Anyhow, both input signals, button for pedestrians and the traffic sensor will be the same at Microwin? (i0.x for example?) Or are the programmed different?

OZEE, maybe i wasn't too clear trying to explain, i know how to make it without any interaction, no sensors or buttons, that's the part i want to learn how.

Thanks ozee&iant!
 
I am trying to make the sequential flow chart, and i have a doubt. Should it start with any given order such as "NS Green, EW Red"? Or it has to be "Start" at the top? I mean, when I plug on the system, it should start with "NS Green, EW Red", so maybe that can be put at the top. I ask this 'cause all the SFC's i'm seeing do begin with Start.

Another thing i didn't comment, as an offtopic, I haven't had any classroom related to this, as I said i'm mechanical engineer, currently on Erasmus trying to make my Career Ending Project, and the coordinator,funny man, assigned me this one, with no help at all. That's why I really need help.

Thanks!
 
I am a mechanical engineer, so I don't have a real interest in learning how to program PLCs, I did have it at first 'cause, honestly, is quite interesting, but time's showed me that Electronics should be understood in a part of my brain i don't know how to control yet, so I've abandoned my hope of completing the task by myself and start looking for help.

I'm sorry if I sound negative here.

You have stated you don't have an interest in learning PLC's.

You have stated that you don't think you will ever understand how a PLC works.

You have also stated you have given up hope of ever completing this task.

What happens when you are given the next task? will you just take the easy road again, or worse still what happens when you have to write a 'real world' program?

IMHO you have completely given up. What are you trying to achieve?

Show us what you have done in the previous exercise and how you think the additional logic should be added.

If I had a colleague with the same type of comments you have in your post I would not be interested in helping.

It might be a language thing and if it is I apologise.

Mark
 
Last edited:
Should it start with any given order such as "NS Green, EW Red"? Or it has to be "Start" at the top? I mean, when I plug on the system, it should start with "NS Green, EW Red", so maybe that can be put at the top. I ask this 'cause all the SFC's i'm seeing do begin with Start.
Solesillo, Traffic lights do not normally have a Start button. You turn on the power and they run until the power is turned off. The start button in your posted link from the Universidad de Oviedo is not correct, and there is only one ouput for one Amber light. Every traffic light that I have seen has two Amber light outputs, one for each direction (they do not operate at the same time).

Instead of a Start button, to "start" you traffic light cycle, use a self-resetting timer that recycles when it reaches the end of its time. Then use this timer to trigger the other timers (if you use 4 or 6 timers.) If you choose to use only one timer, then it becomes the device that starts the traffic lights cycling.

New trainees always start with a list of their Inputs (buttons ans sensors as you did). After you have a little experience, you will figure out that it is the PLC OUTPUTs that are more important (the outputs do the work). Therefore, FIRST make a list of all the oututs that you will need. There should be at least 6.
 
Last edited:
Solesillo, Traffic lights do not normally have a Start button. You turn on the power and they run until the power is turned off. The start button in your posted link from the Universidad de Oviedo is not correct, and there is only one ouput for one Amber light. Every traffic light that I have seen has two Amber light outputs, one for each direction (they do not operate at the same time).

Instead of a Start button, to "start" you traffic light cycle, use a self-resetting timer that recycles when it reaches the end of its time. Then use this timer to trigger the othe timers (if you use 4 or 6 timers.) If you choose to use only one timer, then it becomes the device that starts the traffic lights cycling.

So that means that in the SFC shouldn't appear the 'start' button, and i have to make it start with NS green for example.

I guess that the start button in my link is cause its a single traffic light to turn it on/off, and there's only 1 green/red/amber, plus the pedestrians red&green.

MarkNightingale, maybe I was the one too negative on my first post, or didn't express too well. What i meant is that I wanted to learn how to modify existing projects.

The thing is that there ain't gonna be a 'next task', I will end my career with this assignment, that's why I joked about hiring a plc programmer. It's quite an interesting world, quite useful, but not my field, that why I am not pretending to learn from the very beginning. At least i'm not hiding my intentions and telling my situation.

As soon as i make the flow chart ill put it here so you can tell me if it's correct. Thanks.
 
The best way to start is to write the logic for the basic two-way traffic light.

Then in the next step, add the logic for the pedestrian lights and the traffic sensors. You list 4 buttons and 4 sensors, so are there also 4 pedestrian lights?

Here again, first list the outputs. Then figure out what inputs are needed to make the outputs work.

I am doing a basic S7-200 program for you.
 
The inputs would be:
- T.L. 1 Pedestrian button
- T.L. 2 Pedestrian button
- T.L. 3 Pedestrian button
- T.L. 4 Pedestrian button
- T.L. 1 traffic sensor
- T.L. 2 traffic sensor
- T.L. 3 traffic sensor
- T.L. 4 traffic sensor

As you've said, if we avoid using the Start input, then as soon as we connect would start on NS Green for example, so 8 inputs instead of 9.

The outputs would be:
- Green light NS
- Yellow light NS
- Red light NS
- Green Pedestrian light NS
- Red Pedestrian light NS
- Green light EW
- Yellow light EW
- Red light EW
- Green Pedestrian light EW
- Red Pedestrian light EW

Am i missing any output?
 
Am i missing any output?
I do not know. It is your light, put how many you think it needs. I have done Pedestrian crossings with only 2 Walk lights (one each for each NS and EW directions).
 
Here is a basic traffic light for the Siemens S7-200, using 1 timer. The ZIP file contains the MicroWin16 program files.
 
Last edited:

Similar Topics

I am currently am in a PLC class and need urgent help on how the ladder logic would be laid out. I understand how to get the traffic lights to...
Replies
19
Views
442
Hi all, I need help to create this program I have problems with the flasher. Develop the program below using RSLogix 500 software. Be sure to...
Replies
10
Views
854
Hello everyone... I am new to the PLC world and I would really love it if you gave me some interest about the problem I am dealing with for about...
Replies
15
Views
4,052
Good afternoon, I am studying my HNC and we have PLC classes. I am a beginner, the course has started in August and we are going to have an...
Replies
15
Views
3,863
Hi totally new to plc programming Would anyone have a zelio program for the below they could share, or any assistance would be helpful On signal...
Replies
11
Views
3,683
Back
Top Bottom