Traffic crossing lights

trizzmonte

Member
Join Date
Nov 2023
Location
USA
Posts
1
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 put descriptors on each of the elements in the program
Traffic flow on a one-way street is to be controlled by means of a pedestrian pushbutton so that the green traffic light and "Don't Walk" (use motor # 1 output) indicators are to be normally on at all times when the pedestrian crosswalk pushbutton is not actuated. When the pedestrian "Walk" pushbutton is actuated the following control sequence occurs:
The green traffic light immediately switches off and the amber traffic light switches on to begin to stop the traffic flow. The amber traffic light remains on for 5 seconds and then turns off.
When the amber traffic light switches off, the red traffic light switches on. To ensure that traffic has stopped, there is a 5 second delay before the white pedestrian WALK" sign turns on.
The white pedestrian "Walk" light and the red light remain on for 15 seconds, allowing pedestrians safe passage across the street. 5 seconds after the "Walk" sign turns on it begins to flash for the remaining 10 seconds, warning those crossing the street that time is expiring.
At the end of the cycle the white "Walk" pedestrian light switches off, the "Do Not Walk" light switches back on and the red traffic light remains on for 5 seconds, to ensure that pedestrians are not still crossing the street and then the traffic light changes from red to green.
Be sure to test your program to be sure that it will work multiple times (2) only by pressing the "Walk" pushbutton.
 
For extra credit set it up so that in he event of a system failure all lights default to red.
You're most likely not gonna get the help you're seeking here. It's important to learn programming. It's more important to learn the process for figuring stuff out.
 
Post your existing code, PDF is best, and you may get some advice.

Regarding flashing, have you considered what the bits of the 15s timer accumulator integer are doing while that timer is timing between 5s and 15s?
 
Last edited:
The best advice I can give you is write down the sequence of events & number them.
for example
0: Green light for traffic
2: pedestrian presses button.
3: this happens plus time
4: that happens plus time
& so on.
Now you have a choice for example use internal bits for the transitions from one step to another, or use a sequence variable like N7:0 (word variable) then force the value as the sequence steps on, if you go this way allow some spare steps i.e. move in steps of 10, this way if you have to add extra steps then it is easy. I'm not going to do it for you but here is a simple step sequence of a crossroads, not in RSL500 but it shows the use of timers, sequence forcing from one step to another & the use of compare instructions to energise the output lamps.
So if you get stuck come back for some more advice but don't expect people to do your homework or college work for you
 
This would take two rungs and about a dozen instructions, if you were playing code golf.

In practice, for clarity you would split each light's logic onto a separate rung, although the white walk and red stop lights are on the same rung.

And don't forget comments.
 
but don't expect people to do your homework or college work for you

This is not us being unkind, but rather that one day some of us might be at a site around dangerous equipment controlled by a PLC that you have programmed, and if that happens we would rather you knew what you were doing.
 
Also, make sure you understand how the /EN, /TT, and /DN bits of the timer object behave as the timer accumulates time.
 
... so that the green traffic light and "Don't Walk" (use motor # 1 output) indicators are to be normally on at all times when the pedestrian crosswalk pushbutton is not actuated. ...


Does this mean the person crossing needs very long arms, so they can maintain pressure on the pedestrian crosswalk pushbutton as they walk across the street, to prevent the green traffic light and "Don't Walk" indicators from being on ;)?

Don't be a jerk about it, but do point out that there is an inconsistency with the process definition in this exercise, and in your submission state how you chose to re-define the problem statement to resolve the inconsistency (e.g. replace "pedestrian crosswalk pushbutton is not actuated" with "pedestrian crosswalk sequence, crosswalk lights, and timers are not active.").
 

Similar Topics

Hello guys… First at all, thanks to everybody in this forum who give me much supports and encourages, since my first visit to this forum last...
Replies
8
Views
13,616
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
446
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,743
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,852
Back
Top Bottom