Traffic light soulition

ajfril

Member
Join Date
Jan 2005
Posts
1
This is what I came up with for the Logic pro traffic light part 1. can some one please give some constructive comments.

traffic light.jpg
 
Does LogixPro let you do this?

[attachment]

A real world SLC or Micrologix will not let you have any "output" (timer, counter, OTE, OTL, MOV, etc.) instructions in series.(however Logix 5000 will let you...) Which really wouldn't affect anything if you added another branch and put the XIO T4:3.DN and OTE O:2/6 on it.

Appearantly this works? If so, delete it and try to get the same result using a completely different method. There are several different "ways" to do the stoplight program.

timer.gif
 
Gotta watch it!

The answer is yes, LogixPro will let you do a lot that you will never get away with in RSLogix. The better way to go is to program the way RSLogix requires, but for the instance of learning logic, this will suffice. I have not checked your complete program but you do have to watch doing logical things that can not be reproduced in real programming software.
 
Since you posted your code, and asked for contructive comments.....

First off, congratulations. You have programmed a working Traffic light program. For many people (students and professional PLC programmer), this would be the end of the story.

It's good that for you, this is only the beginning.

One thing that alway happens to PLC programs is that they get modified. Right now, your program is set to a rigid 120/120 NS - EW split of traffic, with the 120 split into 80/40 green yellow both ways.
If you want to make the N/S green last for 200, all you need to do is change T4:1.ACC, right?

And if you wanted to make the E/W green last for 200, all you would need to do is change T4:3.ACC to 200, right?

Whoops, doing that last would only mean that there would be no E/W yellow after 120. Tou need to change T4:0.ACC to 280 in addition to T4:3. Could this be a problem?

===========

One thing that most people don't notice about real traffic lights is that there is a short period of time where both N/S and E/W red lights are on. This allows the intersection to clear of all those cars who "ran the yellow". Your logic has the two reds being exclusive. How would you go about adding that in?

===========

There is one PLC scan, at the end of the scan where T4:2 is done, where you have NO N/S lights set. So for one scan, the drivers don't know what to do. Now it's true that this is a whopping 5 msec, you might want to think about this.

===========

One suggestion: separate your sequence Actions from your Transitions.
You are using the Action (that N/S Red is on) to drive the entire E/W sequence. While this is certainly a common enough practice, your program would be a bit more robust if you used some internal (B3) bits in addition to the timer bits to transition the sequence. Once the sequence works, you can then figure out which outputs get driven by which steps in the sequence.

==========

My last comment: You need more annotation. Describe what each rung IS SUPPOSED TO DO (I can read what it does - but sometimes what the programmer intends doesn't match what gets coded.
Don't say:
This rung turns on the N/S red light as longs as T4:2 isn't done for the duration of T4:0

but something more along the lines of:
First step in a 3-step cascading timer sequencer. Sequencer controls all N/S traffic. Step 1 = Red N/S light. E/W traffic control will occur during this step.

Don't be afraid of saying too much. This is why colleges make Engineering students take all those Engish classes - to learn how to write. Use what you've learned.

==========

Good job overall. What I like about this solution is that it doesn't look like you copied from some of the published sources, but come up with it on your own.
 

Similar Topics

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,737
Hey Folks I've done some browsing along the forum for some help in a matter. It would seem the question has been asked many times but it just...
Replies
41
Views
16,850
I'm looking for a simple, cost-effective way to control traffic lights from a central location. The lights are actually mounted on signs next to...
Replies
2
Views
1,867
Hey guys, I'm fairly new to PLC and RSLogix5000, as I am currently a student. I am doing a traffic light project, which is only running off of...
Replies
8
Views
1,958
Hi all, I am having a problem programming a single traffic light, one red, one green, and one yellow light. I am not a student needing home work...
Replies
12
Views
3,411
Back
Top Bottom