Sorting Pumps based on run time....help

mnwinter

Member
Join Date
May 2020
Location
Seattle
Posts
12
So I am working on a system where I need to change the priority running order of 4 vacuum pumps based 1. On demand 2. based on total run time.
I want to figure out a way to spread wear evenly on a 4 vacuum pump system, that starts and stops pumps based on demand.
This is only my second project from scratch and still very new, so please bear with me. I am confident that I can write the rest of the controls I just cant figure out how to get the logic to work for changing priorities.
I'm using a compactlogix 1769-L24ER on studio5000 (Full) and view5000(for HMI) for this project.

Example
Pump 1=500 hrs
Pump 2=450 hrs
Pump 3=250 hrs
Pump 4= 50 hrs
(differential threshold would be about +100hrs)
So if we need 3 pumps pumps:

So when the system calls for vacuum it would turn pumps on based on demand in the order of pumps
first started is pump 4
second started is pump 3
third started is pump 1
and pump 2 stays off (as its within 100hrs of the high run time).

I was thinking about an array for the 4 pumps and then just use a subroutine to sort the array. But based on what I have read I'm not sure if this is the correct line of thought. I have never done an array before so almost anything is going to be a new learning experience for me.
Thanks in advance for anyone that can or will provide help!
 
Thanks in advance for anyone that can or will provide help!

  1. Watch the first two or three of @Ron Beaufort's videos at this link.
    1. Watch them repeatedly until you understand enough to know what Ron is going to say before he says it
    2. Goals:
      1. Understand PLC scan cycle
      2. Read and interpret Ladder Logic
      3. Predict what a rung of Ladder Logic will do to its outputs based on its inputs
  2. Read and study the following patterns at this link.
    1. Sealed-in Coil
    2. Start/Stop Coil
    3. State Coil/Fault Coil
  3. Once you have completed those tasks, post here what is wrong with the first two rungs in that Main.pdf from Post #1
    1. Or better yet, program them correctly as one rung.
      1. Hint: this requires changing one ASCII character in Rung 1.
 
  1. Watch the first two or three of @Ron Beaufort's videos at this link.
    1. Watch them repeatedly until you understand enough to know what Ron is going to say before he says it
    2. Goals:
      1. Understand PLC scan cycle
      2. Read and interpret Ladder Logic
      3. Predict what a rung of Ladder Logic will do to its outputs based on its inputs
  2. Read and study the following patterns at this link.
    1. Sealed-in Coil
    2. Start/Stop Coil
    3. State Coil/Fault Coil
  3. Once you have completed those tasks, post here what is wrong with the first two rungs in that Main.pdf from Post #1
    1. Or better yet, program them correctly as one rung.
      1. Hint: this requires changing one ASCII character in Rung 1.

I'll spend some time to watch his videos. Every thing I learned is from looking at programs at my company and things online. So I have followed their basic pattern. The program I included is my first written program in CCW. I am rewriting the code for studio 5000. Starting from scratch.

The new program is included I had to upgrade membership to post :) got me lol. Bear in mind this is only a very very early start to the program. As you can see I have proper conversions for my inputs and working on making my code more professional and always learning new ways to do things. I have been programming PLCS for about a year a have a long way to go. But I will definitely watch his play list.
 
I'll spend some time to watch his videos.


Doing that first is better use of your time; you repeated the same mistakes in the first post.
Edit: I just had a quick look at the play-list and the first two or three are not enough, you need the last one as well so might as well watch them all 🍻
 
Last edited:
OK I changed one ascii character from an L to an E. Yes I removed the Latch from rung one. I now see why you would not want a latch on your system ready bit. Latches would be great for holding things in sequence during a power failure or such but not for system ready. Yes I watched them all, I looked online looks like ronbeaufort.com is shut down. Too bad his videos were great.

Screenshot 2022-03-20 235719.png
 
There are other very good YouTube channels, one is PLC Professor and he does a lot of AB stuff.
Sorry I have not yet looked at any of your code for more than 30 seconds so my comment is general

Nothing wrong with using SET/LATCH for system ready or anything else for as long as you know how to use it and how to reset it specially on system startup, which is good practice regardless of how you structure your code.
My previous reply was based on a quick glance of a rung that contained both seal-in circuit and a latch output, that indicated a possible need for a bit more understanding.

I tend to not use SET in ladder and use RESET for certain things, just pure habit. On the other hand in structured text I use SET and RESET equivalent code all the time. Many of the reusable blocks I develop have ENABLE input which I use to reset static and output tags on rising and falling edges and how that ENABLE is triggered depends on when the block is used which could be with first scan tag/bit.
 
Too bad his videos were great.

IKR? Ron retired; he still checks in on the forum from time to time. I've had a phone call or two with him, he's a great person. My favorite quote of his (paraphrased): if PLC's are not fun for you, you're doing it wrong.

Well, with Ron's help, you are on your way now, so make sure you do it right. Whee!
 
Last edited:

Similar Topics

I have worked on small projects using AB Micrologix but now we want to take a photo, process it online, and sort based on returned variables...
Replies
5
Views
323
Hi, I have just started with WinCC unified (v17) and there are alot of things I used on Comfort but now are not available. Currently I am finding...
Replies
3
Views
2,834
I'm trying to be smart about naming my tags so things automatically group together alphabetically, but for some reason it doesn't work like I...
Replies
15
Views
3,638
Hello friends. There is an int type, number that I got from the DataBlock. For example, the DataBlock address is Db1.dbw0. Here's what I want to...
Replies
32
Views
10,442
Good afternoon all, I am working on a college project where we have to sort 3 different color legos. Orange, Black, and Tan. I am using a color...
Replies
30
Views
6,769
Back
Top Bottom