Advanced LogixPro Traffic Light - PLEASE HELP

tim_callinan

Member
Join Date
Apr 2012
Location
Annapolis
Posts
59
Hello to the PLC forum,
I have a question on the excellent Logixpro Simulator. Im trying to complete the more advanced Traffic Light simulator and hitting a brick wall. I thought it would be easier to record a video describing my frustrations. Im trying to get the light working with the car present sensors. Please have a look at this Youtube video if you could spare a second.
https://www.youtube.com/watch?v=nFQDC-Xn1Ws

Thanks,
Tim
 
Get yourself some sleep and come back to it. I've taken naps on jobs before because I was so tired I couldn't function.

As a side note, think about using the car sensor to open your timer rung. For instance, you have a sequence the light is following. The light is changing based on timers. You can use those switches to cause the rung that enables your timer for the light change to go false. In this way, your light can stay on until that sensor is triggered. Then the T4.ACC value for your timer will reset or not time at all until there is a car there.

You will want to do something like this:

|--| |----------------[OSR]--(OTL)--|
Car sensor-------------------Sensor was made
|----| |---------|/| -------(T4:EN)--|



If you don't know, with the OTL instruction you MUST use an OTU instruction when you move to the next step of your sequence. A bit that is set with OTL remains set until it is explicitly unset with an OTL.
 
I haven't checked your program completely yet, but, I would suggest that you move the 1st 2 rungs concerning the timer to LAD 2 from the SBR3 as it doesn't seem to be functioning as you have it.
Trying to use a SBR is difficult at best.

Please post a link to the exercise. Without knowledge of whether or not you must use a SBR in this exercise, I would suggest a complete re-write and eliminate the SBR 3 and the JSR's in LAD 2. Put all the rungs in LAD 2. As it is currently functioning, in LAD 2, neither of the JSR's on rung 000 and 001 are enabling the SBR 3.


I would also check and scroll thru the Downloads/ Allen Bradley for more Traffic Light Examples for additional hints. Here is a link to the Download Section in case you can't find it at the top of the page.
Link:
http://www.plcs.net/downloads/index...20&direction=0&order=&directory=Allen_Bradley

PS:
As a side note, there is no delay when changing from Red in one direction to Green in the other direction for one of the sequences resulting in a Crash.
 
Last edited:
Yeah still working on it. Learning something from scratch - its normal to burn the head off you! Just a couple of points.

I took everything out of the Subroutine. We dont have to use them.
Our instructor wont let us use OTLS or OTUs - say they are dangerous in the real world.
I added the extra time on the red light to stop the crashes.
I checked through the downloads section - There is only one good example of using the car detection sensors and I havent a clue how they are doing it - so its not much help to me.
Here is what I have this morning but Im planning on spending the day pulling the remainder of my hair on it.
Any OTLs or OTUs in the program are just for quick testing which i will replace with latched circuits If/when i figure the shagging thing out!
Tim
 
I don't have a lot of time at the moment, but think about this for a minute. You have a timer that is timing up to 26 seconds. In order for any of the lights to turn on, you have to be in its assigned range. This is fine if you want a light that cycles and does nothing else. AKA does not respond to any outside events.

What I suggest is trying to rewrite the program in a new file, but do this:

Use the N7 integer file. Select an address (such as N7:1) and use this address as a sequence value. Then give each light color a number, such as:

1 - Green
2 - Yellow
3 - Red

Now, green only turns on when that value of N7:1 is the number 1. Yellow only works when the number in N7:1 is 2. Red only when the number is three.

Now, you can use logic to set what the number in N7:1 will be based on things that happen. The number in N7:1 can be changed or kept based on your sensors values and your timers for how long the light should be on and off. This is commonly called a state machine. You can also use the current states of your light to change a crosswalk light based on conditions, such as the button has been pressed. Another advantage of this approach is that you can turn on multiple outputs in a certain state.

If your East-West lights a green, then your North-South lights are Red.

I can't remember the exact instruction names, but I remember GEQ is Greater than or Equal and the rest are on the ribbon by it. They allow you to make a rung true or false based on a value comparison and will be very useful.
 
Last edited:
Here are some thoughts.
Some of the problem is that the simulator only stops the traffic in either direction when the (Physically Simulated O output) RED light is on. In order for cars to move, the RED light must be off. That in itself "may" prevent you from simulating the project properly. To overcome this simulator obstacle, I believe that you are going to need to derive several different traffic situations and use them to output to "Soft" outputs (use B output bits). Use the B bits to drive additional logic that will operate the "Physical" (O output bits).
You are working with at least 3 different traffic situations.
1. Traffic from both directions.
2. Traffic from E-W only.
3. Traffic from W-E only.

A suggestion only and may not work.
For situation 2 or 3 maybe stop the RTO and MOV a value into the timer .acc that will activate the GREEN light in its direction and a RED light in the other direction.
After that situation is over, RES the timer and restart it.

The entire post is by no means everything that is needed, just some ideas.
 
Last edited:
Hi sparkie & jrwb4gbm,
Yeah I got it to work. (after two days of hair pulling) I got some help from the instructor. I'm hesitant to put the solution up on the forum b/c I dont want our students finding it. Im a mechatronics (mainly mechanical) teaching at my local community college and taking the PLC course to fill a hole in my knowledge. Anyhow thanks for the help. Its a great forum.
Tim
 

Similar Topics

Good morning, I am currently working on the LogixPro Advanced Batch #2 Multiple Mode of Operation and got stuck very close to completion. Link...
Replies
3
Views
2,208
Hi all...long time lurker, first time poster. To make a short story long, I'm retired Navy (March 2000) and had never heard of a PLC prior to...
Replies
5
Views
4,354
Hello everyone . I'm just a PLC beginner and using Logixpro as a training software . Now I'm beginning the problem of bottles conveyor belt but I...
Replies
0
Views
1,514
Hi, We have upgraded our laptop which includes Windows 11. It appears that WinCC flexible 2008 advanced does not support Windows 11. What...
Replies
11
Views
243
Dear all, in wincc advanced RT (same as in wincc flexible), when connection to PLC is loss, output field (real) goes to ####. I suppose that tag...
Replies
1
Views
151
Back
Top Bottom