Well, why not download this one. It is a LogixPro program, just as promised in the Downloads section:Lancie I seen where you had uploaded one for RSLogix but i couldnt open it cause it was an rss file
http://www.plcs.net/downloads/fileop.php?action=rename&filename=TRAFFIC%20LIGHT%20WC%20EX%203%20SMARTLIGHT.rsl&directory=Allen_Bradley&
I also have 4 or 5 other versions in LogixPro. I can post one if you want it. I have posted some in past posts about Traffic Lights. I will make a few comments.
You are on the right track. The first method used on the student traffic light problem is always wiith timers, then later you do it with ONE timer and several comparison statements, then finally with a sequencer.
1. You only need 7 rungs in LogixPro to do the basic East/West and North/South Red-Yellow-Green traffic light. I see now that you are also adding the "Delayed Green" which does take two more timers. Please add symbols and comments, and you will get more feedback. It is difficult to understand what anyone's logic is doing, without labels.
2. It is not necessary to use Latch and Unlatch. Only Timer DN and Timer TT bits are needed, along with the Output lights. The timers provide all the actions that you need. You only need to figure out how to simplify your logic by thinking about when each light needs to go on and off, and what combination of timer functions will provide those actions.
3. A timing diagram is very helpful. Remember, while one direction East/West is Red, the other direction North/South is Yellow and Green, and vice versa. Therefore, you only need Yellow, Green, and Delayed Green Timers for each directon.
Without rung labels and comments, no real programmer would even submit it, even for review. The labels are for your benefit as well. If you cannot explain what each rung is doing with a short, to-the-point comment, then it may be that you don't actually KNOW what each rung is doing. When I received a student program without comments, the grade was always a big red "I" for INCOMPLETE. It is truly incomplete, both as a student exercise and also for any real-world PLC program. Good programmers know what the comment should say before they ever write the rung. I write the comment first. If you can't do this, then you do not have a clear picture of the program steps, and perhaps not even a clear picture of the problem.Sorry guys, I know it needs some cleanng up and I havent put rung comments yet, I apologize for that also.
Here is how I write a rung of logic.
A. Insert a new blank rung,
B. Write a comment that describes what the rung Output is going to do,
C. Insert the Output on the right side of the rung, and label it,
D. Ask myself, "What Inputs are needed to make this Output work?"
E. Add Inputs on the left side, in parallel and series combinations, labeling as I go, until I am satisfied that the Output will work as I described in the rung comment.
Most of the time I put in all the outputs (that I know about) first, then go back to the first rung and start adding the inputs. This requires some thought about how the program is going to work before starting the first rung.
I group with Outputs not only the real PLC outputs, but also the internal outputs such as timers, counters, and other PLC functions. These also are types of outputs (that cause an action) when considering each rung as a self-contained logic step.
Last edited: