Traffic Control with Horizontal Turn

dskplc

Member
Join Date
Aug 2013
Location
New Zealand
Posts
119
Hello,

I purchased Phil Melore's Lab Manual which has been a great learning experience. I am on the Traffic Light with Horizontal Turn exercise but am having trouble with the timers (please see my attached RSLogix 500 program). I am more used to RSLogix 5000 so after I checked my answer using RSLogix 500 and Emulate the timers won't come on in run mode after I download it into the emulator (and used RSLinx). Does anyone see what I am doing wrong? Thank you for any advice.
 
I've never used emulate but there is no reason I can see why your timers wouldn't work in a PLC.
 
So you are saying everything looks logical for this to work correctly?
Not exactly. Your timers are ALL set for 100 seconds. That is long, specially for a yellow light (usually 3 or 4 seconds). Try setting your Green timers to 9 seconds, yellow to 4, red to 13 (for a 26-second cycle). Of course that may be a problem because you do not have any labels on ANY of the timers that says what each does. First you have to figure that out and set the correct times for each one. It DOES make a difference in whether or not your program will ever work.

After testing your program with the LogixPro Traffic Light Simulator software, here is what I think your timers ARE, and some timer Preset settings that will work:

T4:1 = HOR. GREEN TIMER, set for 900 x 0.01 seconds.
T4:2 = HOR. YELLOW TIMER, set for 400 x 0.01 seconds.
T4:3 = VERT. GREEN TIMER, set for 900 x 0.01 seconds.
T4:4 = VERT. YELLOW TIMER, set for 400 x 0.01 seconds.
T4:5 = HOR. LEFT TURN TIMER, set for 500 x 0.01 seconds.
T4:6 = HOR. RED TIMER, set for 1300 x 0.01 seconds (Green + Yellow times).
 
Last edited:
Thank you Lancie1. I was really just being lazy with the timers and wanted to see if it worked in RSLogix Emulate 500 (the enable bit on the timers don't even turn green) but I will give what you suggested a try. The book's other projects have worked in emulate so it has to be something I did, like what you suggested.
 
The program did work in the LogixPro simulator. Having seen many different versions of the traffic light program, this one is more complicated and hard-to-follow than it needs to be. The 6-lamp traffic light program can be written with 1 rung for 1 timer, followed by 6 rungs (one for each lamp in the light). Use comparision statements in the 6 Output rungs to look at a range of time for the timer ACC word. The left turn light then can be easily added with one more rung.

It could be that your Emulate version is not starting at Time = 0. If you have run it, then saved that copy, the timers may be starting at Time > 0, which means it might be awhile (with timers set to 100 seconds) before something happens.
 
Looking at the lab book program some more, because it uses previous lights to define the output of current lights, if the program is started at Timer > 0, then the previous lights will not have been ON, so the current light will not be ON either. This is the problem with making timed events in a program dependent on Something Other Than Time - the program must be started at Step 1, or it will not operate properly.
 

Similar Topics

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,876
I have just completed the Traffic Light Control with a delayed green light. What I am asking here is if my rung comments are easy to follow for...
Replies
5
Views
4,459
Hey there, I have been doing all these exercises until this one where you have to control the pedestrians aswell. So my question here is, how do...
Replies
2
Views
3,459
hello, could someone help me with a PLC with LogixPro I need? is a traffic control (only one traffic light), I need the green light flashing 5...
Replies
4
Views
3,198
Can anyone elaborate on Phil's Traffic Control Lab solution from his lab book? I was able to complete the lab using sequential timers and looping...
Replies
24
Views
9,646
Back
Top Bottom