Traffic Light Program (Yes i know theres 89 posts already)

Dlptta

Member
Join Date
Apr 2017
Location
Ohio
Posts
4
Hi guys, I really did not want to do this but I could really use some help. I have a traffic like project due soon for college and I could really use some help. No im not going to be asking you to do it for me as i have to learn for my plc 2 class but i also dont know how to do it so please bear with me. I have already gotten the first part done which is to get a 12 light traffic light working (4-3 light traffic signals) And i have that done. But now its asking to add 4 sensors so that when a car pulls up it can signal that car to turn left. I have tried multiple ways last one trying JBR, putting 4 inputs parallel to activate it. Im starting to give up as ive been on this part for 2 weeks and it was suppose to be done last week. Please help me by guiding me in the direction im suppose to go.


We use Rs Logix pro 500, and im attaching the assignment itself so you can see it as well as what i have done already. Thank you guys if you can help me.

update: Is there anyway to attach my full file (.rss file) so you can see the info of my sequencers, if not ill screenshot.
 
Well, some thoughts.

- Since the assignment askf or state diagram, do that part first and don't jump feet first into the code.

- The assignment is letting out the details like when the left signal should be on, so you need to make the decision on that and document it first. Otherwise, how would you k now what to program?
 
Hi, and thank you so much for replying. Im not familiar with state charts or the state diagram since this is the first time ever seeing it all semester so please bare with me. Im uploading the state diagram i already have but what im not understanding is where to put the sensor into the diagram. Can you put them anywhere like between s1 and s2 for sensor 1? Again im sorry, So say S0-S1-I Create S4 for a Sensor (Can i put 2 sensors here?) then it would go the S 4 S5 S6 then back to S0 So since its all red at S0 and S1 NS is Green thats where i would want to put my Left signal for the North Sensor Correct? But do i create a whole new state or would that be in the s1 (Ns green, Ew red, NTS) Then Create another state for NorthTurningSignal for its yellow light? Im just so confused on this im uploading a picture trying to show what im talking about also.

Again thank you for the help if you can im just completely confused and hope im still on course and not in the cornfield somewhere.....

State chart.jpg State chart updated.jpg
 
.....Snip.....

update: Is there anyway to attach my full file (.rss file) so you can see the info of my sequencers, if not ill screenshot.
Zip the .rss file 1st(forum rules). Also, if not already there, Click on the "Go Advanced" button, then find the "Attach Files" button. If this is confusing, look in the FAQ section (see the top of the screen to find it).
 
I'm just going to toss in my 2 cents....
Sequencers are great for things that repeat the same way over and over. Once you add in a random variable they become rather limiting. If it were me, and I wanted to stay with the sequencers I had, I would handle the left turn lights as a separate issue from the the main lights. So my order of operation would look something like this:

1) Check N/S turn lane sensors
2) Execute turn lane light routine if needed
3) Exit turn lane routine, and begin N/S light sequence
4,5,6 ect...) Repeat above for E/W turn lanes and lights.

One thing you will learn as you progress in programming is that there are many, many ways to get to the end result. Some more complicated than others. If you ever want to get a real dust up started around here, just ask "What is the BEST way to program something?" That is equivalent to asking who has the smartest or best looking kids. :ROFLMAO:
Good luck, and if you get stuck, upload what you have so far and someone will help you get going in the right direction again.


Bubba.
 
Last edited:
Ty will do, I have classes all day including my plc class so will update later today or if i get a chance during
 

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,721
I am trying to do a lab in school that involves traffic lights. I would be happy if anyone can help me out with this exercise. Sincerely, vcok1973
Replies
6
Views
4,185
I need help PLEASE!!! Until recently I was a student learning to program PLCs. We had an assignment to program a simple traffic light. It just so...
Replies
34
Views
27,983
I am a student taking advanced plcs programing a traffic light my problem is using 2 sequencers and a timer the 1st sqe triggers the second...
Replies
1
Views
2,093
Hello - I am looking for a traffic light control program that can be utilized on a AB SLC-500. The light I have has N/S & E/W Red, Yellow, and...
Replies
38
Views
22,756
Back
Top Bottom