The classic Traffic light problem

monkeyhead123

Member
Join Date
May 2007
Location
Cardiff, Uk
Posts
7
Hi there!
I've been given an assignment to produce a ladder that controls a set of traffic lights based on an output (that represents a pedestrian crossing button) Which I've succesfully managed to do.
However I'd like to make the pedestrian green light to flash a few times before changing back to red.
But my minds gone a bit blank... and I'm not quite sure how I'd go about doing that. I'm not asking for the solution,but yet to be pointed into the right direction with perhaps a hint or two.
I have a general idea though, which would be to use a counter to act as a loop to turn the light on and off?
Any hints/ideas/suggestions would be much appreciated!
Many thanks,
Matt
 
Matt, there are many ways. I do not have a complete picture, but check me on these questions. Is this is a light that only stops traffic if a pedestrian wants to cross?

If so, then I assume you have a timer that sets how long the pedestrian "WALK" green light is on. If you want to flash it for x seconds before it turns to red, then use a Status bit that goes on/off every 1 second approximately. In Allen-Bradley SLC's, bit S:4/7 would be a good one to use. Simply insert a parallel branch for the green light output, a comparison statement that looks at the timer: "If (Pedestrian Walk Timer) is >10 and <15, and if S4:/7 is on, turn on green, but if S:4/7 is off, turn off green." Something like this:

    LESS THAN:                          OUTPUT: 
| WALK TIMER < 10 GREEN LIGHT |
|----+----------| |--------------------+-------------( )----|
| | | |
| | __________________ FLASHER | |
| | | LIMIT Test | S:4/7 | |
| +--| Low L = 10 |-----| |----+ |
| | Test = T4:0.ACC | |
| | High L = 15 | |
| |_________________| |

 
Last edited:
Hi there!
Thanks for the replies, and applogies for the late response!
I should have really mentioned I'm using a Mitsubishi Plc which I believe to be the fx0s model.
Lancie, I understand the principles of what your saying, but I'm not sure whether the plc I'm using has a "status bit"? And I havent been taught how to use conditonals yet either, it would have made sense if I had been though....
Would you like to see my ladder so far?
Many thanks for the information and guidance so far!
Matt
 
You can create your own "status bit", some PLCs already have an internal function that will turn on and off a bit at a certain time base, in this case 1 second.

To create the same functionality no matter who the plc maker is, just use a timer to turn on and off a bit for 1 second. That would become the "status" bit Lancie is refering to. Then use this "flashing" bit as Lancie has described.
 
1178299076_2608.jpg


Is that what you mean by a "status bit"? I quickly drew this up. It basically "flashs" on and off for four counts then an output is turned on.
Where the flashing output would be the green ped-light and the output 06 would be the red ped-light.

Many thanks once again.
Matt
 
if you are using mitsubishi the look at m8013 this is a contact that is preset to open and close every second.

I often use this in code to flash an indicator
 

Similar Topics

Hey All, I am sorry to ask this, but i still gotta do it. What happens if I close RS linx? Will it cause network interruption and PLCs will lose...
Replies
5
Views
54
Looking to tery and send some tags from wincc to node red dont have a wincc connectivity license so can use opc. Any suggestions ?
Replies
0
Views
54
Does anyone know if there is a way to import RSLinx Classic data into FT Linx? We have a quite extensive configuration set up, and it would be...
Replies
8
Views
2,255
Hello, I entered my controller IP address as 192.168.1.100 (Local) for 1769-L33ER. It worked fine until couple month and found the controller kept...
Replies
1
Views
1,094
Hi All, Looking for some clarity regards the relatively recent rebranding of RSLinx Classic. From what I can make out from the RA website and...
Replies
9
Views
2,128
Back
Top Bottom