Help with Traffic Light Circuit

Join Date
Dec 2020
Location
canada
Posts
1
Hey guys, I'm fairly new to PLC and RSLogix5000, as I am currently a student.

I am doing a traffic light project, which is only running off of one timer. The circuit functions as it should and we are able to make a flashing advanced green using the ACC.9 command. Where I'm running in to trouble is, when the process is not running the red lights need to flash in case of an outage, my classmates and I cannot figure out for the life of us how to make these two lights flash. I feel like it could be something with the PRE command but I am not sure as I have not used it before.

If anyone could offer some advice or a point in the right direction, that would be greatly appreciated.

Thank you.
 
Welcome to the forum!



what do you mean by "process is not running?" That the PLC is not in RUN mode?


Can you post your code (including a PDF of the ladder is best, as not everyone has RSLogix5k)?
 
Id suggest checking into the various bits available with the TON/TOF/RTO instructions. Therein you should find what you need to cause lights to flash when your timer isn't doing anything.

You'll also learn what Pre, ACC, DN, TT, are with this. And restricting yourself to one timer may not be ideal. Depends on what your instructor has set for the requirements.
 
When I did a traffic light I put it in night-mode from 23;00 to 05:59.

During this time I set a Night-Mode bit and interrupt the main cycle timer, then have it run its own timer I use to flash the red lights one way and the yellow lights the other way. It sound like you want a 4 way red for your project.

Then for the outputs instead of having the lights controlled with the green and yellow lights, have those rungs set CallForNSRed and CallForEWRed bits, then have the night timer set its similar bits.

Later, after both sections, check either bit for the NS red light and both bits for the EW red light.

The one thing I added was that night-mode does NOT start at 23:00, it sets a bit to start and when the cycle of the lights is in the correct place I start night-mode, similarly at the end of night-mode I force the timer.ACC to a specific value to be in a good place to start the cycling.
 
Turn all lights on at all times. Confuses the **** out of the traffic and let's them make the decision. :p
I'm getting old and ****y. Traffic lights and elevators used to interest me but more specific problems came along and my enthusiasm for the aforementioned has decreased considerably. Filter on here is a little too robust. None of the **** were nasty swears or the like. S-Wares???
 
Last edited:
Traffic lights are a fairly common "newbie" task and as with any other task, there is a myriad way to make it work. We would need a bit more information about the task at hand and the restrictions set forth by your instructor, if any, in order to help.

In RSLogix, you can click on any instruction and press F1. This will show a popup with information on this instruction, how it works, what inputs it takes, how they interact with the instruction and what outputs the instruction...outputs, why and when. If running this off a single timer is a requirement, you might find something that you might find useful in there.

That being said, traffic lights are a good way to learn about sequential logic. I have no clue how you're running this right now, but perhaps you might want to Google the term "grafcet".
 
When I teach Traffic Light, I like to find the best student in the class.
So, I offer some options:
SIX timer instructions
Three timer instructions
One timer instruction
NO TIMER INSTRUCTIONS - PLC dependent, of course

(Its been awhile since I taught this, so my Three might have been Four...but you get the idea.)
 

Similar Topics

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,851
Hello to the PLC forum, I have a question on the excellent Logixpro Simulator. Im trying to complete the more advanced Traffic Light simulator and...
Replies
7
Views
3,987
Hello everyone. This is my first post to the forums and I came here looking for some help on a ladder diagram. Okay so what I'm trying to do is...
Replies
6
Views
2,841
Hello everybody, tomorrow i have last exam in school, thing i need to do is to slove whole traffic light simulation in LogixPro. The task is to...
Replies
14
Views
8,567
I am trying to simplify my program to not use the GEQ and LES functions. Can I substitute timers for this?
Replies
8
Views
5,093
Back
Top Bottom