Div_by_zero

Need advice on motor selection logic

3 posts in this topic

(Allen Bradley Micro 830)

I have a project that entails the control of (3) of compressors.

Either one, two, or all three compressors are run depending on a suction line pressure.  As the suction line pressure gets higher, more compressors come online.  A 4-20mA pressure trandsucer connected to the PLC provides this pressure data.

Each compressor has an hourmeter in the code.  The compressor with the lowest amount of hours on it gets priority, it should be run first.  The compressor with the second most hours is brought online as #2 if necessary...

Compressors motors can also fault, and that is detected by discrete inputs on the PLC.

So, first of all, what is the cleanest, most efficient way to determine what the smallest of a set of numbers is if there is no MIN function (or in my case, a MIN function that can only handle two numbers)?   Or, better yet, in case I ever do a larger system, what is the best way to put a set of numbers in order, and associate that order with what those number are assigned to, in this case, compressors?

Second, what is the cleanest way to select a compressor based on multiple criteria?  Some sort of 2 dimensional array?

Maybe I' making too much of this, but when I try to write it, it gets complicated and bulky *very* quickly.

 

Thanks for any help! 

 

Note: I was not sure if I should have put this in the AB forum.  It really has very little to do with the actual processor that I'm using.

 

Edited by Div_by_zero

Share this post


Link to post
Share on other sites

For large motor loads like an air compressor, in the old hardwired days they would be configured for Lead-Lag operation.  In your case, 3-position hand switch (Pumps 1,2,3) to select which pump is Lead (i.e., the pump that is dedicated to run 100% duty cycle) and another 3-position hand switch (Pumps 1,2,3) to select which pump is Lag (i.e., backup pump that will run to meet the setpoint).  Couple that with a setpoint (i.e., flow or pressure) and possibly runtime hour meters and you have yourself a typical hardwired pump control scenario.  Typically the operator every morning changes Lead-Lag schedule to even out pump runtime.

For automating the pump house control, I would encourage you to flowchart your process.  Start small, flowchart the process with all inputs and outputs and identify some absolute key features that you must have.  A concise flowchart can be coded into a system that has little debug on startup.

I prefer to use a State Machine model in a flowchart process; put inputs outside of the state code where you can de-bounce signals or map to HMI status bits; put outputs outside of state code where state machine tags actuate and seal in motors.

Consider...with air compressors, you want long duty cycle and slow response.  Your state machine code should take into account minimum runtime if the lag pump fulfills the setpoint (i.e., eliminate short-cycling).  This will be tricky part of your state machine.  Overall, start with a blank page, keep it simple, add the concrete absolute features that must be there.  A concise flowchart that covers all of the bases, has all possible alarm conditions, has HMI status tags, can be turned into a robust program and be debugged in short time.  That is my cleanest and most efficient answer.

I have some flowchart templates and example code, though maybe not with the lead-lag logic.  Message me if you have interest.

Share this post


Link to post
Share on other sites

Hey Kaiser, thanks for the reply.  Sorry for the very delayed response.

OK I've worked up some logic, but hit a snag.  Here's my question, was actually going to make this a new post, but figured I'd drop it in here.

Say I have three compressors, and each compressor kicks in at a different pressure point.  Each pressure point (PP1, PP2, PP3) can have 1 of 3 compressors (C1, C2, C3) assigned to it, but not always the same compressor, they rotate.

 
PP1 = C1 or C2 or C3
PP2 = C1 or C2 or C3
PP3 = C1 or C2 or C3
 
Compressors can also become disabled.
 
PP1, 2, and 3 are registers.  If PP1=0, no compressor is currently assigned to it.  If PP1=1, compressor #1 is assigned to it, and so forth.
 
Let's say that C2 becomes blocked.
 
What would be the cleanest, most concise way to check all pressure point registers for the blocked pump #2 and set that pressure point register to zero (when a pressure point is set to zero, other logic kicks in and assigns a working compressor, if available)?  This may sound easy, any maybe it is, but I'm not seeing at at the moment.  Thanks for any help!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now