Traffic Light using Compare Inst.

ELarsen

Member
Join Date
Dec 2002
Location
Gardena, CA
Posts
35
I know how you hate this subject, but I need assistance. I need a 2 sec time frame when the both red lights are on. This should happen twice in one complete cycle. I have managed to do this at one point in the program, but I need it to occur at the end of the cycle as well. I am not looking for an answer, just guidance. I already know its going to be a (d'oh) on my part, but I am stuck. I am going try and attach what I have done so far. As always, thanks in advance

Ed

ladder.jpg
 
Draw out a time line, one for each light, showing when they should be on. Use lots of graph paper. Then think a little differently. Remember that the end of one full time cycle is the beginning of the next.
 
As an added hint, after you have the cyclce drawn out on graph paper, wrap it into a tube with the end of the cycle touching the beginning.
Graphing is the key. We a visual creatures and looking at the timing diagram will really help.

Keith
 
Well this is what I did, and it seems to work. I was curious is this what you guys had in mind for a solution? Thanks to bernie, testsubject and kamanges. Graphing really did help. I made this far more difficult than I needed too.....d'oh on me. I have learned alot today. Many thanks

Ed

ladder.jpg
 
Don't say "d'oh on me". It's only if it's something you should have known. But as you say "Graphing really did help" and "I have learned alot today". The graphing allowed you to step back one level away from your project and look at it in a different way. Follow this the next time you are at a standstill in amy type project. Maybe not always graphing but some method of steppping back and asking yourself "What am I really trying to accomplish here". That will be the real lesson to learn.
 
You are very close to the answer!

What your last post lacked is a way to have both red lights on at the same time. I have attached a jpeg of your program alterd to do both red but you may want or need to adjust other times to suit your needs. However, using the LogixPro simulator, it does work.
Besides, it gives me a way to practice posting pics.

tlplcs.jpg
 
Randy,

Ed's post shows rung 4 having an LEQ with 280 as Source B which then covers the overlap. I assume you missed that.

Ed,

Good Job! That is exactly what I had in mind. As Bernie said, being able to take that step back and view the big picture will teach you volumes.
 
Randy,

Unfortunately, I do not have the software nor a SLC-500 to test this one.

After looking at Ed's last image, I do not see how it would not work though.

He has T4:1/PRE set to 280 (your example shows 260).

If O:2/0 is on from 0 to 140 and 260 to 280(Rung 1)

and

O:2/4 is on from 120 to 280 as his post shows (Rung 4), this should have them overlapping on both ends.

Am I missing something? :unsure:

I am not trying to start a flame war, I just want to make sure I am not missing something.

Bob
 
Last edited:
I've always thought this would be the easiest way to do the traffic light problem (with compares).

Just to play devil's advocate though, if your instructor is wanting you to demonstrate your knowledge of timers he/she may be disappointed to see the problem using only one master timer with compares. :D

grs
 
ELarsen, I want to thank you for restoring my faith in the educational system and today's students. Your inquiry was exactly what we keep asking other students to do. Congratulations!
 
My congrats as well!

I will add my congratulations to Tom's for Elarsen having done work and asking for help the way we here have proposed to so many. Ed will go far in the world of PLCs.
testsubject said:
I am not trying to start a flame war, I just want to make sure I am not missing something
I understand your questions and you should understand that the program that Ed wrote, as well as my version, is intended to run on the Traffic Light Simulator in LogixPro. I do not have a PLC of any description here at home and that is where I do a lot of my work. I use LogixPro in my course on PLCs that I teach three times a year at the community college where I work. You can get the LogixPro software from Bill Simpson's site and even use it for free for 15day trial if you like. It is so reasonable though, you ought to buy it and you will find how useful it is. Especially if you are an AB hand like I am. It is written to emulate the SLC500 RSLogix that AB sells. I have found that my students take to programming with greater ease when exposed to it through LogixPro. Bill also provides student lab assignments for you to use, and I can tell you they are first rate.
The one thing that Ed left out of his last version was a way to have both red lights on at the same time each time they are turned on in the program. Originally, each was on at different times and in different rungs so all I did is expand on his attempt to get them both on each time they either one are on.
 

Similar Topics

Hey guys am doin ME project based on PLC. The title is "Density based Traffic Light using PLC". Am using 3 sensors. Am having a little probs in...
Replies
4
Views
2,230
Hi, can i use a pico to control a single traffic light for a school project?
Replies
3
Views
1,527
Hi.. I've just completed Exercise 2 of Traffic Light simulation (using WordCompare). The one about Walk sign showing and blinking. Please...
Replies
2
Views
3,071
Dear friends Can anyone help me with a design of a traffic light controller using plcs for a heavy and light traffic as well as perdestrian...
Replies
24
Views
9,922
I am a complete newbie to this stuff and wanted to try this out and was looking for any information on how I can complete this by Wednesday...
Replies
19
Views
12,721
Back
Top Bottom