LogixPro traffic control simulation problem

JWTORONTO

Member
Join Date
May 2003
Location
toronto
Posts
3
I am trying to control all six lights with six timers for the delayed green exercise.

Don't know why sometimes even when both red lights are on, a car in one direction moves out and causes the crash :-(

I am attaching the ladder program as follows.

Please help me (kind of new in PLC) with this puzzle. Thanks a lot!

ladder.jpg
 
My guess!

For the remainder of the scan when T4:6 gets done, it's .tt bit goes off. T4:1 doesn't start timing until the start of the next scan.

The remainder of the scan that T4:6 gets done, none of the timers are timing, so none of the lights are on.



OF course, in the real world, if traffic lights were controlled by regular 'ol plc's this would not be visually noticable, the software version of the "real intersection" detects these little bugs.
 
Last edited:
I had the same problem with mine

Funny. I've been having the same problem. The previous poster is right. For a scan no lights are on and the one car sees it as not red and goes. I think both our codes is good.

Good Luck,

John
 
Those drivers must have some pretty fast reflexes!

Follow your logic VERRRY carefully. on the scan that timer T4:6 is done, the bit T4:6/DN will not be set until the PLC evaluates the TON block (rung 5). So T4:1 will not have started up yet. Therefore, on that one scan, you will have NONE OF THE LIGHTS ON! since no timers are currently timing. The drivers, seeing no traffic lights on, proceed through the intersection, and BOOM!

I've pointed out the flaw. I'll leave it to you to find the fix.



Curses! Too slow to post.
 
joricha4-

Both of your code is good if you don't care that no outputs are on for a portion of the scan, but the idea is to have the correct combination of lights on at all times. If I were you, I would keep trying until it worked. That is what the simulator is for. What a better way to get practice than to keep tweaking until you get it working right. "Will work" is not the same as "Right". In fact, I would try coming up with as many different ways to control the lights as you possibly can. After all, it's just for practice.
 
I use the STEP function and do find out that just like "93lt1" said, there is time when no timer is timing and no light is on (won't be seen in RUN mode). Therefore the car is moving out.

However, how to solve the problem?
 
Funny. I've been having the same problem. The previous poster is right. For a scan no lights are on and the one car sees it as not red and goes. I think both our codes is good.

So you think the simulation is flawed, and if this were the real world, your code would be adequate? As I see it, your assignment is to write ladder logic that controls the simulation, not to control what you think the simulation should do.

In real life, the systems you control don't always behave according to the original specifications. While the bean counters argue over who should pay for the reprogramming, the poor slob who wrote the original code according to the spec is still stuck with the task of making it perform under the actual operating conditions.
 
If you are using the registed LogixPro(pay for it), you will have the function of "Save Rungs as Picture" under the File Menu.
 
Still Working on it

I've gone through my code as well and see the point when I loose my lights. It is the same problem of no time timing and no lights on. As I was writing this post I thought of the solution and it worked. Very simple solution when you think about what the problem is. THANKS FOR KICKING ME IN THE BUTT and making me revisite my code. I've already completed the stop light exercise with the word comparison. That was a much easier code for me to figure out. About 1/4 of the time and tries required. Perhaps I'm learning a bit. This is a great way to prep for my intermediate RSLogixs training course. Time to move on to counters and the batch problem.

Thanks again guys.

John
 

Similar Topics

I have just completed the Traffic Light Control with a delayed green light. What I am asking here is if my rung comments are easy to follow for...
Replies
5
Views
4,446
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...
Replies
7
Views
3,982
Hi, I was just wondering if anyone could help me out with a bit of a problem I'm having. I know there is many solutions on the internet for the...
Replies
9
Views
2,912
I'm currently going through trade school and struggling with the plc class. I just cant wrap my head around this stuff. Ive managed to struggle my...
Replies
2
Views
4,725
i am working on the raffic light simulator and i have the timing exaclty how i want it but i cant quite get the cross walks down. i can get them...
Replies
2
Views
3,424
Back
Top Bottom