![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]() |
![]() |
#1 |
Member
![]() ![]() Join Date: Dec 2007
Location: home
Posts: 19
|
I need help with simple ladder logic.
This is an assignment for class. I'm about to pull my hair out on this one. All the others have been very easy using timers and counters, but I'm not having much luck with using only comparison statements. I can use one master timer and comparison statements on this assignment. It is a program about a traffic light. I think I got the program pretty well figured out, other than I keep getting double red lights at the beginning of the program (TON 0-50). According to the instructions, both red lights must come on for a period of 5 seconds at the intial start up of the program. It would be a lot of easier if I could use a start up timer, but I can't. I've tried to use the jmp. and lbl. but can't becuse the timers are in parallel. I'm trying to figure out how to advance the TON4:0 ahead by using the "MOV" command. Is it possibe to advance the timer by 50 to avoid the double red lights at the beginning of the program?
I'm trying to download a picture with the instructions to give a clearer view but my file size is 704 kb. I would greatly appreciate any advice or ideas. Thanks Dennis |
![]() |
![]() |
#2 | ||
Lifetime Supporting Member + Moderator
|
I'm not quite sure I understand your problem. You seem to contradict yourself by saying
Quote:
Quote:
![]() Last edited by kolyur; December 11th, 2007 at 09:15 AM. |
||
![]() |
![]() |
#3 |
Member
![]() ![]() Join Date: Dec 2007
Location: home
Posts: 19
|
Does anyone have any tips on how to get the file small enough so it will let me attach it on this message board. Mine is 703 Kb. and it won't allow anything over 300 kb.
Thanks Dennis |
![]() |
![]() |
#4 |
Member
|
zip-it.
|
![]() |
![]() |
#5 |
Lifetime Supporting Member + Moderator
|
Use the Print Screen key to copy the whole screen image to the clipboard, then paste it into Paint or some other program. Even without cropping it the file should be under 300k.
|
![]() |
![]() |
#6 |
Member
![]() ![]() Join Date: Dec 2007
Location: home
Posts: 19
|
I tried the print screen thing but it only gets half the picture. Any other suggestions?
Thanks Dennis |
![]() |
![]() |
#7 |
Lifetime Supporting Member
|
You can use one of the many free picture hosting site on the internet, like Flicker.com.
Sounds like you want to skip the double red light after the first scan, right? Well then, make something that track if the double-red happened or not. |
![]() |
![]() |
#8 | |
Lifetime Supporting Member + Moderator
|
Quote:
You could always zip the file as suggested by magicsmoke and post it that way. |
|
![]() |
![]() |
#9 |
Member
![]() ![]() Join Date: Dec 2007
Location: home
Posts: 19
|
The reason its only showing half of the program is because only half of the LogixPro program is being displayed on the screen at the time. You have to scroll down to see all the rungs. Whats a good free zip program?
Thanks Dennis |
![]() |
![]() |
#10 |
Lifetime Supporting Member
![]() ![]() Join Date: Jul 2004
Location: NY
Posts: 434
|
Google 7zip it will do the job.
George |
![]() |
![]() |
#11 |
Member
![]() ![]() Join Date: Dec 2007
Location: home
Posts: 19
|
Hopefully this is readable! Since then I have added a rung with a XIC T4:0/13 then the add at the end, but still not having any luck advancing the timer. Dennis
Last edited by dennisc; December 11th, 2007 at 12:19 PM. |
![]() |
![]() |
#12 | |
Member
![]() ![]() Join Date: Dec 2007
Location: home
Posts: 19
|
Quote:
Thanks Dennis |
|
![]() |
![]() |
#13 |
Lifetime Supporting Member + Moderator
|
OK I have looked at your program and the way you're doing it seems fine to me, considering that you are only allowed to use one timer. If I understand this right, you need to do the 5-second double-red thing only on the first timing cycle, then after the timer rolls over it should immediately start at the 5-second point from then on.
If that's true then you'll probably need an internal bit to keep track of whether that first timing cycle is in progress. Pick a bit and have it latch on as soon as the timer is done for the first time. So whenever this bit is off, it indicates that you are still in the first timing cycle. You can then use this bit and another comparison statement to trigger the ADD instruction. |
![]() |
![]() |
#14 |
Lifetime Supporting Member + Moderator
|
An alternative method that would nix the need for an internal bit would be to force the timer accumulated value to 5 seconds every time it reaches its preset. Then you'd be bypassing the first five seconds during every timer cycle except the first. You may have to modify your logic somewhat because the XIO contact in rung 001 would prevent any other rungs from seeing that the timer is done.
|
![]() |
![]() |
#15 | |
Member
![]() ![]() Join Date: Dec 2007
Location: home
Posts: 19
|
Quote:
So your saying use a internal bit like B:3/3, latch it on after the timer is done T4:0/13, then use the internal bit B:3/3 to turn on (which statement) a comparison statement? Then do you come off the comparison with a add instruction? Say if I latch on bit B:3/3 after the T4:0/13 then when would I unlatch it? Thanks for the help. Dennis p.s. it would be nice to advance the timer to 50 after the first time though, but I'm clueless on that too. Last edited by dennisc; December 11th, 2007 at 05:17 PM. |
|
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Viewing STEP5 in Ladder logic: Software | edward4444 | LIVE PLC Questions And Answers | 6 | May 19th, 2006 06:57 AM |
Need help with ladder logic problem | RickGilbert | LIVE PLC Questions And Answers | 10 | June 5th, 2005 02:38 PM |
Simple ladder logic question | RickGilbert | LIVE PLC Questions And Answers | 12 | June 4th, 2005 04:24 AM |
ONLINE Changing ladder logic for a redundant PLC5 | ckchew666 | LIVE PLC Questions And Answers | 3 | June 26th, 2004 10:09 AM |
Ladder Logic Editor | Shafiq | LIVE PLC Questions And Answers | 4 | May 19th, 2003 12:44 PM |