Exercise #1 -- Traffic Control utilizing 1 Timer
From the Simulations Menu at the top of the LogixPro screen, Select the Traffic
Utilizing a single timer, employ the use of Word Comparison instructions
to control our simulated traffic light. The sequence of operation and timing
durations are set out in following timing diagram.
Your program should incorporate a 1 second period (delayed green) when both
directions will have only their RED lights illuminated. Note that the timing
diagram below only shows one of these 1 second intervals, but two are actually
|Red = O:2/00
||Green = O:2/02
||Amber = O:2/01
||Amber = O:2/05
||Red = O:2/04
If a one second delay proves insuficient to get these drivers under control
then just go ahead and jack the delay up to two!
Exercise #2 -- Dealing with Pedestrians
Modify your program so that the crosswalks are also controlled. This is not
necessarily a word comparison exercise, but it's a task that needs doing, and
you should now have sufficient expertise to accomplish it. It might not be all
that easy however!
Your program should operate as follows:
- When depressed, the crosswalk pushbutton will cause the appropriate Walk
Sign to be illuminated at the next occurence of a Red to Green transition
for the appropriate direction.
- If the Green light is already illuminated when the button is pressed
then the Walk signal sequence will be delayed until the next Red to Green
- Once the Walk Sign is illuminated, it will remain so for the duration of
the Green signal.
- When the Amber light appears, the Walk Sign will commence to flash On
and Off and continue to do so until the Red signal appears.
You might consider using a bit from the free-running timer located in S2:4
to create the cautionary flashing effect.