traffic light

sparky99

Member
Join Date
Jan 2006
Location
ont5ario
Posts
3
i need help for plc 5000 school project any logic will help

--north south flashing----east west red
--north south flashing for 5 seconds then it will go solid---east west red stays the same
--north south stays green for 7 seconds then a yellow light comes on for 7 seconds east west red stays the same
--once the yellow has been on for 7 secs it will go red and east west will strt to flash green
--everything is the same just on the othere set of lights now and it has to restart once the east west goes red

thanks

friend that needs help
 
OK - you've listed a series of things - states of traffic lights - seperated by TIME.

Start a table -

State 1 - N/S Flash (What color?), E/W Red
Condition - 5 Seconds
State 2 - N/S Solid (still no mention of color), E/W Red
Condition - 7 seconds

etc - fill this out TOTALLY with ALL possible states. Mention after the last condition that it goes back to state 1. Come back and post your complete table (with the colors filled in also). Then we'll go to the next step.
 
state 1 n/s flash green and e/w stays red
condition 5 seconds flashing green
state 2 n/s stays green and e/w stays red
condition 7 seconds
state 3 n/s turns yellow and e/w stays red
condition 7 seconds
state 4 n/s turns red and e/w flashes green
condition green flashes for 5 seconds
state 5 e/w stays green ans n/s red light to remain on
condition e/w stays green for 7 seconds
state 6 e/w turns yellow and n/s stays red
condition 7 seconds
state 7 e/w turns red after 7 seconds and resets the entire cycle
 
OK - refine your table a little - but you don't need to repost it. A STATE says what is taking place. The CONDITION says what happens to terminate the current state and start the next state. In your exercise the ON/OFF/Flashing and color of lights are the states. The time is the condition.

(You may wonder - why am I doing this? In the machines I program each section goes through many states. But in each state a particular set of things are happening. I give each state a name. There is also a condition, sometimes a set of things, which must be true to go to the next state. These may be sitiches or photoeyes making or unmaking, timers timing out or counters reaching a count.)

Now - your PLC provides storage bits. Assign one each to a state. I would bet you also have TIMERS. Let a STATE being ON/True be the input to each timer. A timer raching its end point turns ON the next state. The only exception to this is state 1. It is on only because the last condition timer HAS NOT turned on and finished its timing.

Don't worry that you are going to have multiple state bits on at the same time. We'll take care of that later.
 

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,742
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,851
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,867
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,960
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,412
Back
Top Bottom