Traffic

Dorian,

Are you sure that you copied the program exactly? It does not run "as is". Both green lights are ON at the same time, resulting in crashes.

PHILS TRAFFIC LIGHT.jpg
 
Last edited:
Line #4 shows horiz red, but if you read block 2 comment says vertical red ! Still has problems though. Maybe it was done on purpose ? Even reading the logic from left to right doesn't make sense. The only thing I did was to enter TT, or DN on the timer bits.
 
Last edited:
You have a problem up on line 2 for a start. You have safetys in so you don't have the wrong lights on, but they are bypassed while the timer is timing.

There are many ways to do this problem and some are easier to follow.I suggest that you try and do this problem with one timer for all lights.
 
You have a problem up on line 2 for a start. You have safetys in so you don't have the wrong lights on, but they are bypassed while the timer is timing.

There are many ways to do this problem and some are easier to follow.I suggest that you try and do this problem with one timer for all lights.


That's not my program ! Here's mine. I only have one street that works, working on the cross street.

I never thought about using only one timer for all.
 
Last edited:
Dorian,

90% of successful programming is learning to double-check your rungs for typographical errors. As the old programming adage goes, Garbage In results in Garbage Out.
 
I think the problem I'm having is reading the program from left to right, top to bottom, the instructions are grouped into blocks of events happening, and not in the order of execution, and instructions required to make this happen.

It's confusing this way. How do I keep organized when something at the bottom of the page may be triggering an event at the top ?
 
It's confusing this way. How do I keep organized when something at the bottom of the page may be triggering an event at the top ?
That is normal for 98% of PLC programs. Adjust your thinking about PLC programs. You have to learn to think of the program as a unit for EACH PLC scan. Remember that it is a snapshot of ALL events that happened during the last PLC scan loop.

It helps if you can put your rungs in in the same order as close as possible to the normal operating sequence of events. You can re-order the traffic light rungs. For many programs, the rung order can be changed. Be wary of rungs that DO need a certain order to work correctly (one-shots, some timer-controlled rungs, SET and RST, alternator or flip-flop logic).

For the traffic light, a good timing diagram helps to see the big picture. One-half of the traffic light switching events happen at the same time as the other one-half.
 
Last edited:
That's not my program !
Actually, it was a word-for-word translation of YOUR version of Phil's Traffic Light. The errors were copied also.

Sometimes we can not see our own mistakes until they also show up in the work of others....

Use the attached spreadsheet to set the timing ranges for your traffic light, and also to help decide how many and where to use your 4 timers.

Looking at the timing diagram, it is obvious that there are only 6 time periods required for both sets of lights: Overlapping Red (also called "delayed green"), Green, and Yellow for each direction. 6 timers can be used, or one timer can be used to generate these 6 time periods.

If the overlapping red lights (now common at many real traffic intersections) are not needed, then only 4 time periods are needed.
 
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
438
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
849
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,735
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,849
Back
Top Bottom