![]() |
||
|
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
| ||
New Here? Please read this important info!!!
|
|
#1 |
|
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! |
|
|
|
#2 |
|
Member
|
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 by 93lt1; May 1st, 2003 at 02:16 PM. |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#4 |
|
Member
![]() Join Date: Apr 2002
Location: West Chester, PA
Posts: 1,368
|
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.
__________________
©¿©¬ |
|
|
|
#5 |
|
Member
|
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. |
|
|
|
#6 |
|
Member
![]() Join Date: May 2003
Location: toronto
Posts: 3
|
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? |
|
|
|
#7 | |
|
Lifetime Supporting Member + Moderator
|
Quote:
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. |
|
|
|
|
#8 |
|
Member
|
By The Way-
How were you able to get a screen shot of the whole ladder?
Does Logixpro give you some sort of export?
|
|
|
|
#9 |
|
Member
![]() Join Date: May 2003
Location: toronto
Posts: 3
|
If you are using the registed LogixPro(pay for it), you will have the function of "Save Rungs as Picture" under the File Menu.
|
|
|
|
#10 |
|
Member
|
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 |
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Topics
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Siemens S7 PID Control Problem | qee | LIVE PLC Questions And Answers | 27 | May 15th, 2007 10:53 AM |
| Simulator, Simulation, Shadow Code | Terry Woods | LIVE PLC Questions And Answers | 1 | January 2nd, 2005 01:40 PM |
| Simulation Simatic and Wonderware problem? | intotherain | LIVE PLC Questions And Answers | 4 | June 13th, 2004 09:32 PM |
| GE Fanuc VersaMax PID control problem | Shawn Cassidy | LIVE PLC Questions And Answers | 6 | May 16th, 2004 08:10 AM |
| Problem with temperature control units | Jokers | LIVE PLC Questions And Answers | 1 | September 16th, 2002 12:01 PM |