Traffic Light on Twido

Phant

Member
Join Date
Dec 2008
Location
aaaaaaaaa
Posts
4
Hello all. First i would like to say sorry to post a question about traffic lights becaue i'm pretty sure you have asked this kind of questions a million times. I used the search button but i was not able to help myself.

I´m trying to do the ladder diagram on Twido for a traffic light in one direction. The sequence is: Red On for 8sec; Green On for 8sec; Yellow on for 4sec;

I have two problems:

1) I am getting the red and yellow light turned on at the same time when i run the program and i don´t understand why.

2) I can´t program the sequence to repeat itself.

My attempt on this assignment is attached below. Thanks in advance for any help you can provide.
 
Hello all. First i would like to say sorry to post a question about traffic lights becaue i'm pretty sure you have asked this kind of questions a million times. I used the search button but i was not able to help myself.

I´m trying to do the ladder diagram on Twido for a traffic light in one direction. The sequence is: Red On for 8sec; Green On for 8sec; Yellow on for 4sec;

I have two problems:

1) I am getting the red and yellow light turned on at the same time when i run the program and i don´t understand why.

2) I can´t program the sequence to repeat itself.

My attempt on this assignment is attached below. Thanks in advance for any help you can provide.

Obviously homework, BUT (unlike many first posters) you have tried :)

I dont have the twido software, can you print the ladder as a pdf and attach it so more of us can read it? I use "Cute PDF" for "printing" to a pdf file.
 
OK, for the simple problem you have outlined, think of it this way:

Your total cycle is 8+8+4 = 20 seconds. Set up one timer to run for 20 seconds repeatedly.

When the timer accumulator is <=8, turn on red.
When the timer accumulator is >8 and <=16, turn on green.
When the timer accumulator is >16, turn on yellow.

Now you code it.
 
Last edited:
OK, for the simple problem you have outlined, think of it this way:

Your total cycle is 8+8+4 = 20 seconds. Set up one timer to run for 20 seconds repeatedly.

When the timer accumulator is <=8, turn on red.
When the timer accumulator is >8 and <=16, turn on green.
When the timer accumulator is >16, turn on yellow.

Now you code it.

Thanks for your advice. I have to use three timers in the assignment. Any other solution?

Anyway how can i do this type of code on a ladder diagram?
 
Hello all. First i would like to say sorry to post a question about traffic lights becaue i'm pretty sure you have asked this kind of questions a million times. I used the search button but i was not able to help myself.

I´m trying to do the ladder diagram on Twido for a traffic light in one direction. The sequence is: Red On for 8sec; Green On for 8sec; Yellow on for 4sec;

I have two problems:

1) I am getting the red and yellow light turned on at the same time when i run the program and i don´t understand why.

2) I can´t program the sequence to repeat itself.

My attempt on this assignment is attached below. Thanks in advance for any help you can provide.

I am unfamiliar with the twido software, but the two things, that I see, is that there are no conditions for the output, other than the timer being done or timing, and there is no condition from timer 2, to tell the program to reset.

Is the output from the timers on while the timer is timing, or when the timer is finished?... Also, I'm assuming that input 0 is a maintained switch which tells the cycle to run.

Have you set up a logical outline for the program.... for example for the yellow light.

{If T0.done, and not T1.done, then turn on the yellow light (Q1)} (This example is with the timer output being true, when the timer is finished)

Then convert this to ladder logic.... Or you can start by converting your current ladder logic into logical statements, and I think, that if you will read them you will soon see your problem....

-MUR
 
%q0.1 and %q0.2 Are going to timeout as soon as you put the program in run. So let %i0.0 Start the timer for green and switch (%m0) (Change to normal coil) Then let the falling edge |N| of %m0 start the yellow timer which in turn switches (%m1) (Again change to normal coil).
Then let the falling edge |N| of %m1 start your last timer
 
OK, for the simple problem you have outlined, think of it this way:

Your total cycle is 8+8+4 = 20 seconds. Set up one timer to run for 20 seconds repeatedly.

When the timer accumulator is <=8, turn on red.
When the timer accumulator is >8 and <=16, turn on green.
When the timer accumulator is >16, turn on yellow.

Now you code it.

This is the easiest way to do this!!
 
Good afternoon everyone. I´m just posting to say thanks to all of you who help me solve the problem. :p

I was able to get to one solution today so.. THANKS.. especially to chud for the hint about the falling edge contact!

The solution is attached below for anyone who need some help, just like i did.
 
yes the easiest.
Note that i opened your TWD file , i recommand you to download TWIDOSuite from schneider web-site . They edit this software to replace twidosoft. wether you 'll like it or not, it has a simulator inside that helps to debug visually your application
 
With counter

I think I opened the subject again :)
I also designed a simple circuit with the counter.

Red -> Red+Yellow -> Green....->Yellow ->Red...

Traffic_Lights.png
 
Last edited:

Similar Topics

I am a complete newbie to this stuff and wanted to try this out and was looking for any information on how I can complete this by Wednesday...
Replies
19
Views
12,712
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,826
I'm looking for a simple, cost-effective way to control traffic lights from a central location. The lights are actually mounted on signs next to...
Replies
2
Views
1,865
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...
Replies
8
Views
1,952
Hi all, I am having a problem programming a single traffic light, one red, one green, and one yellow light. I am not a student needing home work...
Replies
12
Views
3,405
Back
Top Bottom