RSLogix Positioning based on Min to Max

KLemas16!

Member
Join Date
Jun 2016
Location
NH
Posts
9
Good afternoon everyone,

I am looking for some suggestions on the simplest way to implement the following code in RSLogix.

- Look at the run-meter for four compressors, set the min to Lead.
- Set the second lowest to Lag1
- Set the third lowest to Lag2
- Set the max to Lag3.

Seems straight forward but lengthy to this manually, but maybe there's a function that I am not aware of to make things easy.

Thanks in advance for the help.
 
Well, If you only have a handful of values to deal with and don't need to do this often(ie, not every 10ms). You could put them into an array w/ the hours as one dimension and a numeric rep of the compressors as another. Sort the hours.
SRT is not a quick function tho.
 
There's no single function to do what you want (well.... maybe), in part because what you want may not be what you really want.

First off, how are the "run-meter"s stored in the PLC? Are they a group of integers (ddddd:hh:mm) or a single float ddddd.dddddddd ? If the latter, then loading all the values in a UDT (CompNo,RunTime) array, using the sort (SRT) function on the RunTime dimension, and the Compressor numbers will be in the desired order. (So maybe there is actually a single instruction that can do it for you :D).

EXCEPT.

What if a compressor has tripped on start? That should disqualify it from even being considered for Lead/Lagx.

Can a compressor be "Removed from Service", perhaps by a local HOA switch that the PLC can read, or maybe an HMI equivalent? That also disqualifies it.

What I usually do instead of figuring out which is "Lead" and which is "Lag1", etc., I really just want to know, "Which is the next one I should start?"

That's a fairly easy thing to determine. "Next" means:
- not currently running..
- not "out of service"
- not faulted
- Lower run-time than the next pump.
- (any other requirement that the customer has)

Each scan I initiate the "Next Pump" registers, setting PumpNo = 0, RunTimeDD = 9999999; RunTimeHH = 99 (etc.).
Then with one "identical" line of code for each pump, I check it against the above rules, and if it passes, move its pump number and RunTime(s) into the "Next Pump".

At the end of X rungs, I now have the number of who is "Next", which can be used with indirect addressing to start the thing when the next is needed.

While it is trying to start, it is not "running", so it stays "Next". If it fails, that disqualifies it from being "next" and the next "next" jumps to the front of the line. If it goes to running, that also removes itself from the list, but also resets the "NeedToStartNextPump" bit as well, so the new "Next" doesn't start.

For some systems, I only ever want one and only one pump On at a time. For others, there may be a "demand curve" that requires running one, two, or more pumps. The "NeedToStartNextPump" logic is the only difference.

HTH

õ¿õ¬
 
Last edited:

Similar Topics

I am completely stuck on building a ladder program that requires a start button to be pressed 3 times to turn on motor 1. Then motor 2 starts...
Replies
20
Views
489
buen dia. tengo una falla al pasar los tags de mi plc SLC 5 0/4 a mi panel me aparece un error Problem writing value " " to item <tag name>...
Replies
1
Views
65
First off, I'm a hobbyist-level programmer, and this program isn't controlling anything anything that could even remotely be considered "life...
Replies
18
Views
497
Will someone please convert this logic to pdf?
Replies
2
Views
118
Back
Top Bottom