AB12
Hi all,
 
I am very new to PLC programming and I am struggling with a project of mine. I am trying to write a 4 sequence traffic light program where a push button will act as a pedestrian crossing and hold the red light for 10 seconds once the cycle is complete before restarting sequence again. I have found a program (made by Yekki) which gives me the correct light sequence however I cannot find a way to integrate the push button into the program.
 
What I would like the program to do is:
  • Red LED on for 6 seconds
  • Red LED and Yellow LED on for 3 seconds
  • Turn off Red and Yellow LEDs and turn on the Green LED for 6 seconds
  • Turn off Green LED and turn on Yellow LED for 3 seconds
  • Turn off Yellow LED and turn on Red LED - this is where the cycle will restart
  • If Switch 1 (S1) is pressed then wait until the cycle reaches the Red LED then keep the Red LED on for 10 seconds
  • Once 10 seconds are up the Red and Yellow LEDs should turn on and the cycles continues as normal
These are me connections so far:
 
Connections.png
 
 
And this is my program:
 
Page 1.pngPage 2.png
 
If anyone has any tips or advice it would be much appreciated!
Thanks 🙂
Reply 0 0
thiagoralves
You can latch the pedestrian button with a set coil (latch should only work if you are NOT on the red light state). Then you can have two parallel rungs that drive the red light, one where the pedestrian coil is active and another where the pedestrian coil is not active. They should be exactly the same, except that the timer on the pedestrian coil active one should be longer. Once the red state is finished you should also reset your latched pedestrian coil so that it doesn't repeat the long cycle on the next red light again. This is one way of doing it. I bet there are other ways.
Reply 0 0
Reply