Beginners Project - Traffic Light

Pohl

Member
Join Date
Apr 2007
Location
Tijuana
Posts
5
Hello there,

My first "project" on my PLC course is programming a Trafficlight using a Micrologix 1000. I was able of elaborating one using 3 Timers (On-Delays), but have trouble looping the program so it starts over by itself.

Right now my system is something like this:

1. Start switch in ON position.
2. Activates TON 1 - T4:13
3. Timer (T4:13/TT) turns Green light for X seconds.
4. After X seconds TT goes off and DN activates a TON 2 - T4:14
5. Timer (T4:14/TT) turns Yellow light for X seconds.
6. After X seconds TT goes off and DN activates a TON 3 - T4:15
7. Timer (T4:15/TT) turns Red light for X seconds.
8. After X seconds TT goes off.

I tried several things but none have worked. I'm really just getting the hang of the programming so... I suppose it should be easy.

Thanks all!
 
Try using one timer with compare functions. (less then, greater then,Equal to,) Have your one timer reset itself to continue the trafic light operation. This should give you a good start.
 
Pohl said:
8. After X seconds TT goes off.
You were almost there! You forgot to add "and DN resets the sequence" to that step.

Now, how can you make the DN bit reset the sequence?... o_O

Hint:

1. Start switch in ON position... and sequence is NOT done

🍻

-Eric
 
Haha ok... good to know I was near completion. So I should imply by your "hint" that the START switch needs to be in off position! True. I tried doing the following:

- Using the same output name for the red light (O:0/7), I placed a N.C. contactor (?) so it would "open" the circuit for the duration of the red light (X seconds). This however, didn't work somehow, as the green light never turned on again. How can I accomplish this?

Thanks! I'm excited haha. :p
 
Pohl said:
Hello there,

My first "project" on my PLC course is programming a Trafficlight using a Micrologix 1000. I was able of elaborating one using 3 Timers (On-Delays), but have trouble looping the program so it starts over by itself.

Right now my system is something like this:

1. Start switch in ON position.
2. Activates TON 1 - T4:13
3. Timer (T4:13/TT) turns Green light for X seconds.
4. After X seconds TT goes off and DN activates a TON 2 - T4:14
5. Timer (T4:14/TT) turns Yellow light for X seconds.
6. After X seconds TT goes off and DN activates a TON 3 - T4:15
7. Timer (T4:15/TT) turns Red light for X seconds.
8. After X seconds TT goes off.

I tried several things but none have worked. I'm really just getting the hang of the programming so... I suppose it should be easy.

Thanks all!

As eric said

In your first rung in series with the START command - put something thats in your last rung thats NOT DONE until it times out :rolleyes:
 
Also, you have done a traffic light for one direction. Usually, traffic lights control both East/West and North/South directions. How would you add the other direction to your program? Hint: You should only need four timers for both directions. A simple timing diagram is useful, to know what the other direction is doing, and what functions can be combined.

Another Method: You can do a two-direction traffic light with one timer, by using comparison instructions for each lamp rung.
 
Last edited:
Woohoo, we did it!

Thanks all guys, our next project is right up! And I'm going to need more help. Yay!
 

Similar Topics

Any recommendations for controllers to setup a lab for 10 students
Replies
13
Views
1,467
I want some feedback about the quality of the following course. Is it worth paying for...
Replies
13
Views
2,962
Hi, I'm hoping to secure a network of PLC's (Compactlogix 5000, Various versions, V24 to V29), only accessible to myself and a few...
Replies
1
Views
1,310
Hi All, Good day to you all, just want to ask if there is any thread here for those beginners like me. I really want to learn and I'm very...
Replies
3
Views
2,780
Hello, We are using Factory Talk View Studio software on our laptop and the application type is Machine Edition. When we open the software we get...
Replies
1
Views
5,069
Back
Top Bottom