PDA

View Full Version : Ab Plc5


matrixmerlin
November 30th, 2007, 08:34 PM
Hi,
Looking for a simple program example to alternate 2 pumps using rslogix5.
Any ideas.??

godfrey
November 30th, 2007, 09:12 PM
I have a great idea. Do a search here for pump or motor alternation.

geniusintraining
November 30th, 2007, 09:13 PM
look here... http://www.plctalk.net/qanda/search.php?searchid=788424

Kabir
November 30th, 2007, 10:13 PM
Give me a bit more information I do not want to assume. I could give you a simple program that would start remember the last pump that run and run the alternative on start. As well as you can use hours of operation and cycle them based upon that. Which would you prefer?

matrixmerlin
December 1st, 2007, 06:25 AM
Im using a timer to keep track of each motor run time.

I would like to rotate them after an hour ( 3600 seconds )
of run time.

Thanks

OZEE
December 1st, 2007, 06:55 AM
We won't do your homework for you. (If this isn't for a class, please accept my apologies for the assumption. It's a standard classroom exercise...) We love to help, but nobody benefits if we just hand it to you.

That said... The hardest part of any automation project is in the definition. DEFINE what you want to do before you ever start writing code. Only when you know WHAT you want to do can you determine HOW you're going to do it.

DEFINE it -- each step in the cycle, how you go from step to step (each transition). That's a flow chart, or an outline, or "pseudo-code", or any of a number of other ways. How does it start? How does it stop? Any alarms? If so, what do they do and how are they reset? Does it auto-restart after an alarm? What if it stops in the "middle" -- How does it restart?

Then assign your I/O, and figure out how your I/O assignments relate to your process definition.

Do the above first, post your results. Then we can look over what you have, make suggestions, etc. Then you can start writing code.

almshouse
December 1st, 2007, 07:01 AM
There are some examples here:
http://www.plcs.net/downloads (http://www.plcs.net/downloads/index.php)
They are under Allen_Bradley and choose "AB5 PLC templets"

matrixmerlin
December 1st, 2007, 03:24 PM
Thats just the type of answer I was told to expect here..!!

tomalbright
December 1st, 2007, 03:29 PM
Spend more time on the question, and you might get a decent answer.

Thats just the type of answer I was told to expect here..!!

I have this vision in my head of a bunch of people huddling in a corner and whispering, "I'M not going to go ask them, YOU go ask them!"

Kabir
December 1st, 2007, 04:52 PM
I would have to agree with the others on this. If this is for a school then it would only make you a weak programmer for me to give you the answer.

Not that everyone does not need assistance however if your learning about PLC's in a class and not someone struggling to learn it on their on in the field help from us here is not what you really want.

Sit down with it for a while and think what you need and how to put the instructions together and try the first attempt maybe a bit off but adjust analyze and adjust your ladder you would get something and learn more that way as well.

Lancie1
December 1st, 2007, 07:53 PM
Looking for a simple program example to alternate 2 pumps using rslogix5. Any ideas.??Yes, plenty of methods have been discussed, dissected, put back together a differnt way, and completely analyzed here on this forum. You can probably find a complete ladder logic program that will work for you, with a few changes to add the timer. Look at the threads already given, or do a Search for alternator, toggle, or flip-flop.

If you describe you situation, and it is a legitimate problem in an industrial environment, you will get plenty of help. Even if it IS homework, if you make and effort and post your work, and ask for help, you will get it.

Some tips:

(1) Alternating two pumps is about the same program as alternating two motors of any type, be they pumps, compressors, fans, or whatever. A PLC really doesn't care what the outputs are used for. That is up to the user.

(2) Once you figure out how to make 1 output switch on and off as the result of the same input --an alternator circuit, it should be easy to use that output to switch from Pump 1 to Pump 2 back to Pump 1 and so on.

matrixmerlin
December 1st, 2007, 08:48 PM
Im new to this type of forum. Havent done HOMEWORK in 37 years.
I was told this might be of some useful help.
I guess I dont understand why, if a person asks for help, people
automatically assume your a kid. But oh well.

Heres the program files. Look at LAD 20 ( LS-5 ).

Any help would be appreciated, or if not, thats OK too.

Thanks,

Lancie1
December 1st, 2007, 09:01 PM
Okay, I guess after 37 years you deserve a break! We get a lot of PLC students looking for a quick fix for their "F". Your problem happens to be one that is regularly assigned by PLC instructors! Imagine that. Your solution is at hand!

If you have the ladder in RSLogix5, ZIP it and attach it to your last post.

Also, at the top of the PLCS.net menu, click on "Downloads". There is probably an alternator circuit in there.

rsdoran
December 1st, 2007, 09:03 PM
Im new to this type of forum. Havent done HOMEWORK in 37 years.
I was told this might be of some useful help.
I guess I dont understand why, if a person asks for help, people
automatically assume your a kid. But oh well.

Heres the program files. Look at LAD 20 ( LS-5 ).

Any help would be appreciated, or if not, thats OK too.

Thanks,

Because in the past we got NUMEROUS poorly asked questions from students on a daily basis. The idea is to help people LEARN, not just automatically give them an answer, so they will understand what they are doing.

When I said "poorly asked question" think about what you originally asked.
Looking for a simple program example to alternate 2 pumps using rslogix5.
Any ideas.??

There are numerous ways to alternate outputs http://www.patchn.com/ab_plc_flasher.htm but without details it is impossible to provide specifics.

As mentioned taking the time to do a search would have offered many examples that you could experiment with, if there are issues with making something work then provide the details and many will be glad to work with you through the process.

OZEE
December 1st, 2007, 10:16 PM
It's exactly what RSDORAN's sig says:

"Tell me and I forget, show me and I remember, involve me and I understand."

Merlin, do you want to forget, remember or understand?

I apologize for assuming you're a student asking for help with your homework. (Look up there -- I apologized up front too ;) )

However, my answer above still stands. Define on paper exactly what you want to do, the triggers to transition from step to step, then start programming. That's how every one of us here who does this for a living would attack any automation project (though we may occasionally leave out the "on paper" part of the definition phase if it's a small project)

matrixmerlin
December 2nd, 2007, 05:08 AM
Here is the PLC5 ladder file Im working on. PLC 1B.ZIP
Look at LAD 20 file for my 2 pumps. Each instruction
has a descriptor.
I think Im real close to getting them to alternate,
but its just not coming to me.
Its like its right on the tip of my mind, but
Im just not getting it down.
You will see the timers set at 1 hour, and a few interlocks
already there.
I can do it with some ADD and EQU, but I know there has to be a simpler way. The motors are being ran off VFD's.
Take a look if you want.

Ken Moore
December 2nd, 2007, 07:48 AM
I don't have time to help at the moment, very busy.

I did take the time to convert Ladder file 20 to a PDF, so that forum members without the software can perhaps give you a hand.

tomalbright
December 2nd, 2007, 09:03 AM
Fascinating. I did a 2 pump lift station on a drainage project several years ago. The goal was to pump down during storm and high water conditions, so there wasn't a constant 24 hour run time, but this is very similar.

How about this...

Turn the timer into a free-running timer.


p1 run? p2 run? p2Enable p1enable
---] TD [------] [------]/[-------(L)------(U)-----
|
| p2 run? p1 run? p1Enable p2enable
---] [------]/[-------(L)------(U)-----

That's one way. Of course, since you are using VFDs, you probably want to include some "handoff" logic.

matrixmerlin
December 2nd, 2007, 09:21 AM
Thanks Ken,
I have an updated ( added AUTO and MANUAL functions ), am working on this today, I hope to get this finish before tomorrow.
Need to startup lift station tomorrow.
Attached is the latest file.

Ken Moore
December 2nd, 2007, 09:42 AM
Updated pdf attached. One quick question, seems like you have a lot of un-necessary internal bits, why? You have N something bits firing a B something bit, and then on the next line you have the B bit firing another N something bit, why not cut out the middle man?

matrixmerlin
December 2nd, 2007, 10:07 AM
This PLC is part of a networked system of 21 PLC's connected to a SCADA system ( GEFanuc Ifix ). Those the bits that are to/from the SCADA server.

matrixmerlin
December 2nd, 2007, 11:09 AM
Here is the latest file, if anyone has time to look at LAD file 20.

Thanks,

Lancie1
December 2nd, 2007, 12:58 PM
Merlin,

My RSLogix5 is too old--can't read your file. However looking at the last PDF that Ken translated, I see your two 1-hour timers (T4:170 on Rung 37 and T4:175 on Rung 56) for the pumps run times, and I see the alternator bits that reset those timers.

I don't see where you actually use the above timer run times to control EITHER pump. It could be in there (everthing else except the kitchen sink is in this program!), but it was hard for these old eyes to search it manually.

Perhaps you have not added that part yet. Look at Tom's suggestion using latching bits to alternate the pumps.

surferb
December 2nd, 2007, 01:11 PM
Congrats Lancie - you just hit 2000 posts!

Merlin,

My RSLogix5 is too old--can't read your file...

Lancie1
December 2nd, 2007, 01:24 PM
Thanks, Nathan. I hope to do 2000 more!

matrixmerlin
December 2nd, 2007, 02:07 PM
Do you think using the B30:2/2 and the B30:2/3 instructions
to interlock the opposing start instructions would do the trick.??

Lancie1
December 2nd, 2007, 03:01 PM
Merlin,

It appears to me that "using the B30:2/2 and the B30:2/3 instructions to interlock the opposing start instructions" would severely complicate your start logic, and maybe not accomplish the switch-over.

To make an alternator work correctly, you have to stop thinking and programming as if the start/stop control is tied to a designated motor. If the Start/Stop controls are tied to designated motors, then you must "untie" them. On an alternator set-up, Start will start whichever motor has the next duty.

Think of it as a System, with a System Start and a System Stop. The alternator takes care of deciding which motor in the System gets to run next. For an alternator, the switch can be made at the end of a motor run cycle. When the device ending the current run triggers, it activates some logic to switch the NEXT STARTUP TO THE OTHER MOTOR, regardless of where the next start command comes from (start button, high level switch, timer, and so on).

Here is a simple example for two air compressors. The alternator action is done on Rung 001. It is simple, clean, and easy to understand. The alternator switch is triggered when the pressure switch reaches the cut-off PSI setpoint. Upon the next start, the C1/C2 Toggle guarantees that the OTHER compressor will be the one selected.

You can trigger the alternator action with more than one thing (start buttons, level switches, timers) in parallel. Think about it some more, and you will realize that the alternation has to be triggered by some re-occuring "normal" event, and set up so that 1st time it does Item 1, 2nd time it does Item 2, 3rd time it does Item 1 again, amd so on. Period.

http://www.plctalk.net/qanda/uploads/Compressor_alternator.jpg

matrixmerlin
December 2nd, 2007, 03:29 PM
Your right, I tried and it didnt work. I'll keep trying.

I just keep thinking there is a simple way of doing this that Im not seeing.

Thanks

Lancie1
December 2nd, 2007, 05:41 PM
Your right, I tried and it didnt work. I'll keep trying. I just keep thinking there is a simple way of doing this that Im not seeing.I have been studying your program. Here is a step-by-step list to make them alternate.

(1) On Rung 36, on a new parallel branch with "Pump 1 Start Output O:033/1, put a Latch (L) for B30:1/15. Add a new description for B30:1/15, "PUMP 1 HAS RUN". Also on Rung 36, add a B30:1/9 XIO contact in series with Output O:33/1, so that it will prevent Pump 1 from starting if B30:1/9 is ON.

(2) On Rung 55, on on a new parallel branch with "Pump 2 Start Output: O:033/2, put an UnLatch (U) for B30:1/15. Also on Rung 55, add a B30:1/9 XIC contact in series with Output O:33/1, so that it will prevent Pump 2 from starting if B30:1/9 is OFF.

(3) Modify Rung 59 to look like this:

| |
| ALTERNATION LS-5 PUMP 1 P1/P2 |
| ENABLED CALL TO RUN HAS RUN ALTERNATOR |
| B30:2/4 B30:0/13 B30:1/15 B30:1/9 |
|----| |----------| |---------+----| |------------(L)---------|
| | |
| | PUMP 1 P1/P2 |
| | HAS RUN ALTERNATOR |
| | B30:1/15 B30:1/9 |
| +----|/|-------------(U)--------|
| |


(4) If you want timers to alternate the pumps also, add Timer DN XIC bits on Rung 59, on parallel branches with "CALL TO RUN".

matrixmerlin
December 2nd, 2007, 05:53 PM
Hi Lance,

Before I do just that, look at this revision and see what you think.

Mickey
December 2nd, 2007, 05:57 PM
PDF for Lancie1 or anyone

matrixmerlin
December 2nd, 2007, 06:01 PM
I made a mistake on line 57, here is the corrected one.

Lancie1
December 2nd, 2007, 06:10 PM
Merlin,

You are getting there. I don't know the situation with these pumps, so I cannot help with the triggering logic for the alternator. I see you are triggering the alternator on Low Level. That may be okay, if a pump is always able to pump down to the low level switch.

I cannot read your RSLogix5 file. I only have RSLogix version 4.10. If your print the ladder to a PDF file, then post that, I can read it.

(Mickey, thanks for the translation.)

Mickey
December 2nd, 2007, 06:49 PM
Lancie1, latest post PDF

matrixmerlin, you can use the following to print report to a PDF file. Both are good , I use cutePDF

http://www.cutepdf.com/

http://www.pdf995.com/

Lancie1
December 2nd, 2007, 06:59 PM
Thanks again, Mickey.

Merlin,

I believe that you almost have got it licked. Now, on Rung 32, do you need to add a contact for B30:1/1, "LS-5 Pump 2 Auto"? It seems if both Pump 1 and Pump 2 are not in Auto, that you would not want to alternate them. I could be wrong, however.

matrixmerlin
December 2nd, 2007, 08:00 PM
I think I will take out that pump 1 auto and not have either.
I will see how it runs and add them later if neccessary.
After you caught that pump 2 wasnt there ( Im impressed ) the more
I looked at it I just took out pump 1 auto.
Lance..Thanks a Lot for your help. I will run this program tomorrow and let you know how it goes.

Again, Thanks

I've attached the final version.

matrixmerlin
December 2nd, 2007, 08:03 PM
Mickey,

If you wouldnt mind, please convert the final version over to .pdf for Lance.
Thanks

Mickey
December 2nd, 2007, 08:07 PM
Mickey,

If you wouldnt mind, please convert the final version over to .pdf for Lance.
Thanks

Here you go,FYI , you can do this youself with one of the links I provided above. It may be useful in the future.

Lancie1
December 2nd, 2007, 08:12 PM
Merlin,

I think it will alternate after taking out the Auto modes from the "LS-5 Call to Run" relay. Your alternator will be operating even when you are running in Manual mode, but the "Alternation Enabled B30:2/4 contact (controlled by the 2 "Pump Enable" bits) will bypass the alternator action when 1 pump is Inhibited.

For most of the Manual Modes that I have come up against, the customer wanted the Manual Start to operate directly on the Pump Motor Starter (do not pass go, do not alternate, do not interlock, and so on).

But you know the running conditions and the situation on the ground better than anyone.