I need help with simple ladder logic.

Lancie1 said:
If you are using the LIM instruction, then (because it switches when equal to Low Limit), you must not allow any overlap in your lights.

For example if E/W Red = 0 to 40, then E/W Amber must start at 41, not 40.
Why is that? If I leave it the way it is will both outputs be active at the same time on the 40th. second? If thats true then I will haft to go through and refigure all my numbers again! ?$%#?@#^@^%##$%()*
Thanks for the help. Dennis
 
Dennis,

You seem to be struggling with this. Here is a WORKING & TESTED LogixPro program with a 60 second cycle, 22 second green, 6 second yellow, 28 second red plus 4 second red overlap on both lights. UnZIP the file and load it with LogixPro.

Why is that?
It is because of the way the LIM instruction works. When Green is going off, at the moment it is switching, say at "260", you do not want yellow to come on at 260, but at 261, which is 1/10 of a second later.

This is because sometimes in the real world, you often do not want a switch race, where first output is still on when the next output goes on. Instead, you want to make sure first one is off before next one goes on. This is easy to achieve with LIM. Just adjust your numbers slightly by 1/10 of a second. Who's counting? You will not be able to measure the difference, and the light will work correctly with 0 crashes.
 
Last edited:
Lancie1 said:
Dennis,

You seem to be struggling with this. Here is a WORKING & TESTED LogixPro program with a 60 second cycle, 22 second green, 6 second yellow, 28 second red plus 4 second red overlap on both lights. UnZIP the file and load it with LogixPro.

It is because of the way the LIM instruction works. When Green is going off, at the moment it is switching, say at "260", you do not want yellow to come on at 260, but at 261, which is 1/10 of a second later.

This is because sometimes in the real world, you often do not want a switch race, where first output is still on when the next output goes on. Instead, you want to make sure first one is off before next one goes on. This is easy to achieve with LIM. Just adjust your numbers slightly by 1/10 of a second. Who's counting? You will not be able to measure the difference, and the light will work correctly with 0 crashes.
stuggling is a understatement.........lol
 
Okay, with your corrected times, it will be possible to set it up as your instructions state. Notice that Green (20) + Amber(10) = Basic Red Cycle (30). This is a little different that what you said originaly.

The Total Red Time should actually be 8 seconds longer (38 seconds) because it will include the 4 second overlap on both ends. If you want, I will adjust the program to achieve this.
 
Dennis,

Your total cycle time will have to be 68 seconds, to meet all specifications. Here is the Revision 2 Timing Diagram. The program is attached. It works, and meets all criteria EXCEPT LEFT TURN LANES, (within +/- 0.1 seconds), with 0 crashes at full speed!

Traffic_Light_Timing_Diagram_R2.JPG
 
Last edited:
Dennis,

Can you add the left turn lanes? I have no information about how those are supposed to work, and the time allowed for each.
 
Dennis,

I do not see how you could make the cycle shorter (60 seconds as you said previously) and still meet the criterai of 20 second green and 10 second yellow with 4 second delayed green on both lights.

As you see in the timing diagram (and the way a traffic light works), the Red On time in the N/S direction) must be equal to the sum of Green + Yellow in the E/W direction + any overlap time for the delayed green.

Your time for 1 direction then becomes:

20 seconds for green,
+ 10 seconds for yellow,
+ 4 seconds for delayed green (red overlap)
= 34 seconds for 1 direction
X 2
= 68 seconds total cycle time

Each red light is actually on for 38 seconds, which violates the 30 second Red time given in your problem. This has to be an error.

I see no way to shorten the cycle time without shortening the green and yellow times, which would also violate your criteria. Many students have tried shortening the red time without also cutting the green or yellow time, and find (to their horror) that the red light on one side goes out before the green and yellow cycle (in the opposite direction) finishes. Of course, the drivers start running the dead red light and cause a big pile-up!
 
Last edited:
Lancie1 said:
Dennis,

I do not see how you could make the cycle shorter (60 seconds as you said previously) and still meet the criterai of 20 second green and 10 second yellow with 4 second delayed green on both lights.

As you see in the timing diagram (and the way a traffic light works), the Red On time in the N/S direction) must be equal to the sum of Green + Yellow in the E/W direction + any overlap time for the delayed green.

Your time for 1 direction then becomes:



I see no way to shorten the cycle time without shortening the green and yellow times, which would also violate your criteria. Many students have tried shortening the red time without also cutting the green or yellow time, and find (to their horror) that the red light on one side goes out before the green and yellow cycle (in the opposite direction) finishes. Of course, the drivers start running the dead red light and cause a big pile-up!
Thats the exact problem that I've been fighting with. Theres no way to have it work with a 60 second cycle +or- 5 seconds. After I saw your 68 diagram matched what I originally came up with I said hell with it and printed it out and took it to class tonight. I pointed it out to the instructor right off the bat about it being impossible to start out with BOTH red lights on for 4 seconds and a 4 second overlap in the middle and the 20 second green and 10 second yellow. He came right out and said "I don't give a s**t theres room for play in there." If I had known that I wouldn't have to gone through all that. I am sorta disappointed in this class. We had to miss 3 classes cause our instructor had medical problems than the rest of the semester we left way early because he was to weak to continue. So it was up to read the book and figure out comparison statements and mov,jmp,and etc. We didn't finish near the amount of work that the normal class does. After doing this program with the limit comparison statements, I went to put it in the program at school tonight and it wouldn't allow me to use the lim command. The instructor said something about not enough memory to use the lim command.
Thanks very much for the help! DennisC
 
Last edited:
I suppose you could shave 1 second off of both greens and both yellows, reducing the total time by 4 seconds to 64 seconds, which would put you in the "60 seconds + or - 5 seconds" range. If your instructor is as appathetic as he sounds, he would never notice the 1-second differences anyway.

This really is a good example for real-world situations. I can't count up the times that I have had to work with conflicting job criteria. Everyone wants the best of every situation, with no penalties. Often I hear "I want Item and also Item 2 (even though Item 2 is a direct conflict with Item 1)."

Usually a compromise is necessary. You can have a 20 second green and a 10 seond yellow, a 4 second red overlap, but not also a 30 second red. On the other hand, you can have a 18 second green, a 8 second yellow, a 4 second overlap, and a 34 second red.
 
This really is a good example for real-world situations. I can't count up the times that I have had to work with conflicting job criteria. Everyone wants the best of every situation, with no penalties. Often I hear "I want Item and also Item 2 (even though Item 2 is a direct conflict with Item 1).
I've been reading the development of this thread with interest and I think Lancie1's comment is the most valuable lesson to be learned from the whole exercise. I couldn't agree with it more. Academic or scholastic tasks often have a correct answer and anything else is regarded as wrong. Real-life is more fuzzy: that answer is 74.8% right, but this one is 85% right which makes it a better answer. The last one is still 15% wrong, but that's less wrong than anything else we've got.

The whole issue of negotiation and compromise extends well beyond automation tasks. Virtually all aspects of life involve this and there are very few areas where you can be completely dogmatic about decisions (unless you're a seriously misguided and ill-advised head of state, for example :) )

You might not have had the ideal class DennisC, but I'd say you'll think back to this in years to come and realise "Yep, it's just like Lancie said!"

Regards

Ken
 
lancie1 is right on the money. You'll find, that as a PLC programmer, you are "the bottom of the funnel", and often have to research the criteria you are given by your superiors, and your engineering department, and convince them that what they gave you is not what they really need or want, and then show them what they really need or want... it's often a tail wagging the dog job.
 
This thread also provides a good example on how other students should go about getting help. Students Take note!!!!!!!!!!!!!!!!!!!!!!!!!!!
 

Similar Topics

Question 1: I am still new to this - I also might be asking for too much. - but i need help using Ladder Logic to run (rod style actuator motor)...
Replies
6
Views
1,650
Hello all, I am new to programming PLCs and I am working on project involving a reject mechanism on a packaging machine. I am using a ML1000 PLC...
Replies
3
Views
2,578
I have three 5/04 PLCS sitting in front of me. I also have a few serial cables with gender changers and null adaptors. I'm trying to connect...
Replies
15
Views
8,168
This is an assignment for class. I'm about to pull my hair out on this one. All the others have been very easy using timers and counters, but I'm...
Replies
3
Views
2,295
Hi all, I am having issues accessing my Cimplicity software - the site code changed after re-install and I am no longer able to attain a new key...
Replies
6
Views
67
Back
Top Bottom