Traffic Lights

efigalaxie

Member
Join Date
Aug 2015
Location
Salem, VA
Posts
23
Hello!! I work as an electrician/technician in a steel mill. Most of the things we are using are antiquated..... IE 90-30/90-70 with logicmaster 90.
I wanted to re-educate myself on PLCs, so here goes. I constructed a model of a 4 way intersection with left turn lanes. I have 4 LEDs per direction - Red/Yellow/Green/Blue (Left Turn Go)

I have 8 switches for traffic presence, 2 for emergency services.

I have the operation set thus:
I go into a cycle - say...green for left turn in north and south. All else is red. I have a master timer for that cycle. The cycle will be no greater than the set interval of the timer. I have another timer that operates off the traffic detection in the GO lanes. If traffic isn't detected every so many seconds, I advance the elapsed time in the master timer so that there are fewer seconds in the cycle. Then I go to yellow, then red. I have everything red for a second then switch to green straight through....and so on. All cycles are basically identical except for the time allotted.

My Boss kind of wants me to make it so every direction is independent and self adjusting without directly affecting the others. Say a green for a left turn when opposing traffic is sparse.

I think there is a simpler way to do this whole thing. As it is I have quite a few timers. I am thinking a counter/timer tandem.........

You gentlemen have any clues or pointers?? I have looked on the web and most of what I have seen doesn't even have left turns.

I think what my boss is requesting is more complex than most traffic lights....I see them go through an ordered sequence in a pattern. The sequences are faster or slower depending on traffic, but they do not alter the sequence itself.... IE Green left turn, then green straight both ways, then since no opposing traffic is coming, back to a green left THEN on to the next sequence where the other directions go.

I got clever with my outputs and was cutting lights off and on by passing words into the output registers. He didn't like that. Anyways, Any tips would be appreciated. I want to be done with this and go play with analog I/O. Keep in min this is GE Fanuc and the timers aren't as nice as those in the AB stuff.
 
See this post, LogixPro TRAFFIC_LIGHT_EX_3_SMARTLIGHT.rsl in the Downloads/Allen Bradley section. I know it isn't GE Fanuc but maybe you can get some ideas from it.
 
Welcome to the forum!
People on here are very willing to help. Please zip and post what you have done so far. If you can print it to a .pdf file, even more people can offer suggestions. It has been many years since I used the LogicMaster software but there are others on the forum that are still current with it. Since this appears to be a training exercise, I would suggest that you go to www.thelearningpit.com and download the trial LogixPro software. That way you can learn the AllenBradley software unless your boss has restricted you to LogicMaster software only.

Link:
http://www.thelearningpit.com/lp/logixpro.html

By the way, if this is a real world problem, it makes no sense that the boss won't help you solve it. If it is a classroom exercise, there is nothing wrong with saying so, just don't expect a spoon-fed solution.
 
It doesn't seem much different then one, just he is getting paid to learn/relearn it instead of paying to learn it. But since it is a learning exercise, call it homework, lab, work, it will most likely be handled the same way as most on this site. Once we see the "student" is trying and has done there own work we will help them past the parts they get stuck on, and then give suggestions on different approaches to the problem.
 
It is 'homework' in the sense that the boss is fully indulgent in me learning - because - I am the only one volunteering. I will try to get the logicmaster program off into pdf if I get a chance. (I do this stuff in spare time on shift. If I get a call, I go.) I am noodling over breaking out the North/South and the East/West lights instead of having them locked together. IE - N/S are left turn, yellow, red, straight, yellow, red all together...while E/W is Red.....then E/W has it's go while N/S sit red. He doesn't want me to use sequencers and such.....just the simple command set. The reason - most of the programs are already fairly simple in command set if not in the actual logic. I can bull this thing out in brute force using a **** load of timers. I wonder if he is going to dislike that I tamper directly with the timer elapsed time registers in order to react to traffic.
One thing I would emphasize, I am in no way a KID trying to get out of homework. I am 44 years old and re-acquainting myself with PLCs. Looking at most of the programs we have here, I can puzzle out what they do as long as I have a command reference guide for the GE Fanuc quirkiness. I like these PLCs. They are tanks.
It would be nice to get to a single brand. We have GR Fanuc/ABB/ A-B PLC5/ A-B Control Logix / A-B Micro Logix. At the house I have an AD and a Unitronics unit I am fooling with.

By the way, I have Logix Pro and I bought the 'Automation Soecialist' set from Koldwater. So far, It hasn't taught me much as it is painfully basic. If I had know they were as basic as they are, I would not have bought them. The guy gave me a price break on them when I asked, which is why I am not badmouthing his material. It is good, but just very very basic. My Logix Pro copy is CD Key based. I inquired as to a USB key version...this IS 2015... and was rebuffed. My laptop has no built in DVD drive, so I am going to have to make an image of the disk and use a program to make the pc think the image is a physical disk in a physical drive. It is simply stupid that I buy the program legally and have to resort to dubious means to simply use what a paid for in a way that is good for me.

I have a background in PC programming - on my own - and I often want to solve my PLC programs using structural methodology I learned playing with basic, VB6, JAVA, and C#. The ABB interface we use (ANTIQUE, DOS Based, One Instruction at a time) reminds me more of assembly language.

Well, I hope I haven't been too boring. (Like Robert Hayes in Airplane) I wanted to give you more of an idea of my background.

Take Care - David
 
Here is the file that has everything.......yes, it is painfully repetitive.....keep in mind my instructions.

It is the LM90 folder. It is not a pdf.
 
@efigalaxie,
I made an attempt at printing your file to .pdf. Please verify if it is correct or missing anything.
 
Yes, as far as I can tell, you have got it. The security on our PCs is so tight I can't install a pdf 'printer', nor can I configure the printer for LM90.
 
By the way, I was wrong above. If I don't get a car every 10 seconds, I switch by placing a 0 in the register of the main timer for the cycle.
 
Looking at what I have done, would you call that beginner level, intermediate....?? I know how to use the math and Boolean functions etc. I DID come up with this program on my own.
 
Steve Bailey or RussB are both much more knowledgeable than me, maybe either one will see this thread and jump in.

You asked for comments so here goes. Please don't be upset or offended, I'm only offering my opinion which may or may not be correct. My opinion is based solely on how I learned. I find it difficult to follow the code. There appears to be no nicknames or comments for any inputs or outputs. Using an output with the same address on more than one rung is usually not done. Set and Reset type outputs have their place but should be avoided if possible. If it were me, I would try to rewrite the program with those suggestions in mind.

You should get a spare PLC, load your program into it, then, test it out to see if it works.

Edit:
FYI, the way I was able to print the program was by using the F10 Printing Function key in the LM90 software and changing the print output from LPT1 to FILE, added a filename, then printed the program to file using the LM90 software. Next, I opened the file with Notepad and printed it to PDF using CutePDF software. I'm sure you could use any printer instead of CutePDF to make a hardcopy.
 
Last edited:
No offense.

I will go through and comment it up.

The PLC is a spare. If I remember, I was having a problem with outputs staying on for some reason, so I was forcing them on and off with set/resets.

I will go back and change it around.
 
If I remember, I was having a problem with outputs staying on for some reason, so I was forcing them on and off with set/resets.

Just speculating here. I looked at the .pdf listing and saw the multiple rungs with set/reset. If the original rungs looked like this (many parallel non-retentive outputs) the problem was likely that with only one rung being active at a time, the inactive (read false) rungs were shutting off the outputs. The outputs were just responding to the last rung scanned wins rule.

This is one reason multiple outputs with the same addresses is frowned upon.
 
OH MY!!...
I see now!! Thanks!!

My PC programming is working against me.

In a procedural pc program, things progress in a certain order. To an extent, so do things in a PLC. What I need to do is change the outputs on the actual cycles to internal outputs. Then have the inputs for the real outputs OR-d and using the addresses of the internals.

Right??

You understand what I did don't you? A, B, C, D..........

How could I have been so ignorant!!!! wow!!!

If I have time, I am SOOOO rewriting this thing tonight!!!

Again - thanks to both of you...I am embarrassed, but have you ever had a paradigm shift??
 
Last edited:

Similar Topics

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
474
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...
Replies
10
Views
882
Hello everyone... I am new to the PLC world and I would really love it if you gave me some interest about the problem I am dealing with for about...
Replies
15
Views
4,087
Good afternoon, I am studying my HNC and we have PLC classes. I am a beginner, the course has started in August and we are going to have an...
Replies
15
Views
3,888
Hi totally new to plc programming Would anyone have a zelio program for the below they could share, or any assistance would be helpful On signal...
Replies
11
Views
3,693
Back
Top Bottom