I need help with simple ladder logic.

dennisc

Member
Join Date
Dec 2007
Location
home
Posts
19
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
 
I'm not quite sure I understand your problem. You seem to contradict yourself by saying
According to the instructions, both red lights must come on for a period of 5 seconds at the intial start up of the program.
but then saying
Is it possibe to advance the timer by 50 to avoid the double red lights at the beginning of the program?
If you post some more detail you'll probably get more help. I would also suggest posting the ladder logic you have so far. I think I can answer one of your questions, about advancing the timer by a specified amount. Try this:
addinst.jpg
 
Last edited:
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
 
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.
 
I tried the print screen thing but it only gets half the picture. Any other suggestions?
Thanks Dennis
 
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.
 
I tried the print screen thing but it only gets half the picture.
I don't see how this could happen. Print Screen should always include everything that's displayed on your screen. If you're opening it in Paint you may need to scroll around to see everything.

You could always zip the file as suggested by magicsmoke and post it that way.
 
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
 
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:
kolyur said:
I'm not quite sure I understand your problem. You seem to contradict yourself by saying

but then saying

If you post some more detail you'll probably get more help. I would also suggest posting the ladder logic you have so far. I think I can answer one of your questions, about advancing the timer by a specified amount. Try this:
addinst.jpg
I tried adding a rung at the bottom with a XIC T4:0/13 then this add at the end. I don't know if this is what you meant to try or not. Any suggestions?
Thanks Dennis
 
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.
 
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.
 
kolyur said:
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.
This all sounds very confusing.........lol.
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:

Similar Topics

Question 1: I am still new to this - I also might be asking for too much. - but i need help using Ladder Logic to run (rod style actuator motor)...
Replies
6
Views
1,631
Hello all, I am new to programming PLCs and I am working on project involving a reject mechanism on a packaging machine. I am using a ML1000 PLC...
Replies
3
Views
2,568
I have three 5/04 PLCS sitting in front of me. I also have a few serial cables with gender changers and null adaptors. I'm trying to connect...
Replies
15
Views
8,160
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...
Replies
3
Views
2,284
Back
Top Bottom