RSLogix 5000/Control Logix - Lead/Lag Pumps

Amonomen

Member
Join Date
Nov 2014
Location
Pennsylvania
Posts
6
Greetings!

I am currently working on an intuitive AOI to perform lead lag pumping operations based on run time.

The concept is to create an AOI that accepts BOOL inputs for LeadRun,Lag1Run,LagNRun... The AOI will also accept 2 inputs for each pump in the system and 1 output for each pump in the system. These per-pump inputs will be Enabled and TotalHours (ex. Pump1Enabled, Pump1TotalHours). The per-pump output will be a Run signal (ex. Pump1Run, PumpNRun...)

The largest system I need to control is 6 pumps with 2 standby pumps.

I can use either RLL, FBD or ST and understand all 3 pretty well.

The current problem I am having is ordering the pumps in runtime order from least to greatest.

I am trying to avoid overly complex RLL logic. (that is currently what is in place and is daunting to look at for a 6 pump system)

All of these pumps use their own AOI and what I though about trying was to scrap the original parameter structure on the above mentioned AOI and instead supply the AOI with an array of AOI's of the pump type. With this idea, I would need to create a solution that can order an array of UDT's by a member of the structure (ex. RuntimeHours).

The final question is has anyone ever created or thought of creating logic that can order an array of UDT's based on a value of a member of the UDT?
 
Well, I've worked on a system back in 2002 that did almost exactly that; however it was programmed in KW multiprog softlogic. The system itself ran for 10+ years before the original company went belly up and the plant replaced it with controllogix.

At the time in 2002 I think AOI was a just a twinkle in the eye though. KW had/has a very nice library function, importing and reuse of code blocks.

The pictures are from the two main functions, alternation and callingmanagement. the grid shows how the variables were laid out.

AltOrder was a DINT that contained up to 8 numbers that rotated either from a button push on the HMI, a timer, or based on a biased runtime value of how long the equipment had been running.

The STAT values were generated by another function (i didn't print it) that tracks whether the equipment failed, is forced off or other info like 'running'.

Staging calls is a single integer that contains how many of that equipment need to be called. there were yet more subfunctions that incremented that value based on whether a zone dp was high enough.

2017-01-05_12-41-55.jpg 2017-01-05_12-44-49.jpg
 

Attachments

  • AlternatorV3.pdf
    24.7 KB · Views: 188
  • CallingManagement.pdf
    84.7 KB · Views: 104
  • helper.zip
    163.9 KB · Views: 51
The final question is has anyone ever created or thought of creating logic that can order an array of UDT's based on a value of a member of the UDT?
Usually I create an array of pointers, each element pointing to a rows of the array of 'complex data'; you can choose any algorithm to order the pointers according to your needs. Then any external client can use the pointer and get the desired 'complex data'.
 
Thank you jkerekes and exabmorgan!

jkerekes, the Plant PAx library will certainly be a useful resource. I was not aware of it until now.

exabmorgan, thank you for sharing KW's solution.

Though I was looking to create my own solution so I have more finite control over the process, I think that with the two I now have I can certainly make this work.
 
I think you are on the right track.

I have developed similar AOI for use in Water/wastewater.

It was fun setting it up and I learned lots doing it but every job has different requirements so I end up tweaking it for every Engineer's specification on how they want the rotation to work.
 
The current problem I am having is ordering the pumps in runtime order from least to greatest.

Just to address this specific item. You could look at implementing some type of sorting algorithm. I have done this in the past for other purposes, referencing this this wiki page: https://en.wikipedia.org/wiki/Selection_sort

If you review the code towards the end where it talks about a bingo sort variant, the code posted is very similar to structured text. I just massaged it a little to meet syntax requirements of ST. The example as listed will sort data in an existing array. So you may need to add some buffer logic to it pass your data into and out of the sorting array without impacting the original data sources.
 
Hey Elake20,

Can you help me with the logic for this AOI ? I am kind of stuck at developing the logic for these AOI , I do have the similar scenario where I have to control 8 pumps out of which 6 are duty and 2 are stand by pumps and all the pumps shall rorate to equalise the runtime .

Thanks
 

Similar Topics

Hi, I am new on RSLogix 5000 programming. Now I am starting a auto machine project and want to control machine process sequentially. I prefer to...
Replies
6
Views
1,606
Hello everyone, I need to control a discharge pressure in our pipeline and there's two ways of doing this: 1. By controlling the speed of the...
Replies
4
Views
2,147
Hello, I'm currently working on a program that requires a PID instruction to keep the level at a set point. Hardware: Solenoid valve (Relay...
Replies
1
Views
1,895
I need help with this project, the project has a compact logix L35E processor and a PANELVIEW 1000. AT HMI: an object on a display "control list"...
Replies
0
Views
1,520
Hi all, Can anyone give me a basic idea on how to use the motion instructions in rs logix 5000(including coordinate system)...can i run these...
Replies
2
Views
2,033
Back
Top Bottom