Hey thanks for the explanation. I guess I still don't understand timers fully and should brush up on them again. The logic end is definitely the main thing I am struggling with as you can tell. I certainly didn't intend for that to sound like I wanted to blame my instructor either I just thought there was maybe some basics that could of been better covered on how to evaluate scenarios like this where you need to think them out. But yes you are correct it is something I need to learn and teach myself and it will take time. I guess I am more frustrated and stressed out because I "need" to understand this because I desperately need a "job". But you are correct regardless.You still need to re-evaluate the purpose of your timer, and when it needs to run.
What is your INITIAL STATE? (i.e. no cars present on crossing street). What is the state of each output (lights) and what is the state of your lone input (I:1/8, the traffic sensor)? In this state, do you want the timer to run, or lights to change?
After you have answered these questions, ask yourself what happens when a car approaches the intersection from the crossing street. What IMMEDIATELY happens to the state of the traffic input? What do you want to IMMEDIATELY happen to the lights? If nothing, how long before changes occur?
Answering these questions on paper should get you well on your way to writing a program that will solve the word problems from your lab sheet.
Hint: You do only need one timer. You just have to decide when to run it, off of what condition, and whether you need some type of "memory" on that condition.
I hate to say it, but it's ALWAYS going to be "learn as you go with that." Don't count on any instructor being able to teach you how to problem-solve. Don't blame an instructor for inability to do that, either, if you ever want to be an effective programmer/troubleshooter. It's a skill that just takes lots of practice. You're on the right track.
Post back when you've made some more progress.
Cheers,
Dustin
You are making progress. I would change the timer to a TON because if there is no cross-street traffic, the timer will not run at all. If there is cross-street traffic (I:1/8 on for 10 seconds), then the timer must run for 1 cycle then reset and stop if there is no more traffic. If there is still cross-street traffic, then the timer repeats the cycle. Therefore, because you do not need to start in the middle of a previous cycle, then you do not need to retain the value of the timer from one cycle to the next (RTO-type timer not needed).
I have it solved using LogixPro, and will post it later. Struggle on for awhile. You can create a relay to indicate "CROSS TRAFFIC FOR >10 SECONDS", but as noted in instructions: "no latch is required to enable this circuit." I think this is a hint to just use the one timer, bits from I:1/8, and Timer Comparison instructions to completly solve the problem.
that was a clear explanation. I originally thought a TON would work but I was confused on how to get it to control both lights with just one timer. The timer should control the main traffic only until the loop is completed for 10 seconds then switch over to the other set of lights and reset once that cycle is complete. hopefully I understood that right.
Gave up? Here is "a" solution, not necessarily the best for you. You can run it on the LogixPro Traffic Light Simulator if you change the I:1/8 Sensor Input to I:1/3 everywhere it occurs, then "unpark" the Cross Street traffic.
It works, but has the occasional crash due to drivers running the yellow lights. This can be prevented by adding the "delayed green" feature (both red lights on at same time for 2 second overlap).
No sir I never give up. I will tackle this problem until I understand it. Just had to do some house duties for a little while. I will throw that into logixpro later to see what you mean. I am still working on mine on paper right now. I wanna learn to work it out that way like you guys suggested.
Lancie,
Neat solution for avoiding a latch/unlatch instruction. But I think you let Raydog off too easily. Hopefully he arrives at a similar (or other working) solution before he comes back and sees what you posted.Code:BST XIC I:1/8 NXB GEQ T4:0.ACC 100 BND
I will say that he was at least working to solve the problem, and that's the important thing.
I did see his solution before i finished mine but I am not going to change mine to try to make his work im gonna see if I can find one on the path I was headed first. I do hope I can figure something out with all the tips you all offered too me. Thanks again to everyone that has went out of their way to help me it is much appreciated.
Maybe I did. It is always a toss-up between giving away too much information and driving the students away to other sites.
Trying to remember how I felt 35 years ago (I can barely remember that far back) after struggling with a few of these seemingly obtuse, aggravating, frustrating logic problems, many times I gave up thinking that there was no solution, or that I would never find it so why bother. I tend to help too much, but life is short.
I understand that reasoning all too clear. there has been times that I just wanna walk away because it gets so frustrating but quitting doesn't help anyone. You give good details but you also explain it clearly so by doing so I am learning at the same time and i certainly don't want the answers just handed too me I want to learn it too because its all important information.