Ladder logix for queing a request to start a pump

tidkaew

Guest
T
Please help me writting ladder logix for queing a request to start a pump.

I have a pump and three remote operator stations.
Station A: if pressed turns the pump ON and valve to area A opens.
Station B: if pressed turns the pump ON and valve to area B opens.
Station C: if pressed turns the pump ON and valve to area C opens.
After the pump starts it runs to a certain time and stop.


Now if any station is pressed the pump should start immediately. If the pump is being used by another station. The request is placed in a que in a first comes first serve manner.

Please suggest what instruction should I use to que this request and how.

I use RSLogix500 and micrologix 1200 to practice.

Thank you
 
from the silver platter department ...

Greetings tidkaew,

do you want "help" ... or do you just want us to write it for you? ... either way is OK ... but if this is a student assignment, then I suggest that you don't open the attached file ... this is pretty much the whole thing all laid out and just about ready to go ... if you're supposed to be learning how to "think through" a program like this, then I'm afraid that this is probably going to totally wreck the educational process ...

so if you really do just want "help" with writing it yourself, then leave the attached file alone and post the code that you've already written ... we'll be glad to offer pointers ...

I didn't have a MicroLogix 1200 handy so I wrote this for an SLC-5/04 ... you'll have to cut and paste and change around the addresses to match your hardware but things should fall into place ... you can post questions if you like ... I had to make some assumptions about when the valves are closed, etc. ... hopefully I came close to what you need ... but try to be more specific if you still have problems ...

by the way, this turned out to be a pretty neat little programming exercise ... I'll probably end up using some of these ideas for my students someday ...

and make sure that your RSLogix500 has the "symbol" display turned on ... this won't make much sense at all without those lit up ...

and please don't forget to register on the forum ...

PS ... to the professional programmers out there ... I'm just wondering ... how much would a little program like this sell for on the open market? ... it took me about an hour or so to do it - in between customer calls ... I'm thinking that if the actual I/O addresses were all ready to go, then maybe $500 or $600 ... how far off am I? ...
 
Last edited:
Looks pretty clean and to the point to me, well thought out. An hour is pretty quick, too. It wouldbe fun to install and debug. I didn't see any bugs but I never do until I install, anyhow---and there's always something I didn't expect.

To answer your question, we have a minimum 4 hour charge for any job. Then we charge by the hour on the smaller jobs---bid price on larger ones.

But we won't even show up for less than 400 bucks.
 
Thank very much Ron,
This helps me a lot.

I dreamed up this exercise myself.
I went on trying to use FFL and FFU but I could not get it to work.
 
thanks for the compliments, John ... the only way that I was able to get it done that quickly was to use a lot of “copy and paste” from station A – to station B – to station C ... and most of the documentation went the same way ...

as for the bill ... so you’re saying that we’re looking at something like $400 bucks (the minimum charge) for the program? ... so maybe if I got smart (all of a sudden) then I guess I could “stretch it” a little bit and say that it took me all day to get it done ...

the older I get, the more I hate that “charge by the hour” method ... think about it this way:

the smarter you get ... and
the more experienced you become ... and
the better your equipment and resources ... and
the faster you’re able to supply the customer’s needs ...

then ... the LESS money you stand to make on the job ...

somehow that just doesn’t seem quite right ... I know that it’s normally done that way, but charging by the hour just seems to be a losing proposition ...

if we look at it from Doofus Dave’s point of view, then:

the dumber he gets ... and
the less experience he has ... and
the lousier his equipment and resources ... and
the more time it takes him to supply the customer’s needs ...

then ... the MORE money he makes on the job ... it really sounds like we're rewarding bad behavior ...

as far as I can figure, the car mechanics have the best idea ... suppose that you need the transmission replaced in your 2001 Batmobile ... they find that particular operation in their handy Chilton’s book and tell you that you’re looking at an eight hour job ... some quick multiplication times the hourly rate and bingo! ... there’s your total labor bill ... and if the guy is smart, and experienced, and well equipped, and really fast, then he might be able to get the job done in five hours ... and (you guessed it) you still get charged for the full eight “book” hours ... a lot of people think that’s quite a racket ... but to me it just makes good common sense ... I want that same smart, experienced, well-equipped mechanic available the next time I need my car fixed ...

I sure don’t want to go down to Doofus Dave’s garage and pay him half the hourly rate – for four times the amount of hours ... and for shoddy work on top of everything ...
 
Ron

I prefer to use a two part quote:

1.A fixed portion to write the logic and HMI to the point where I have something downloadable and I am ready to turn up on site. This part of the job is more or less under my control and I am happy to quote a fixed price.

2. Once I get on site for the startup/commissioning there are too many factors now outside of my control and the only way to manage the risk is to charge for my time; typically I use a per day rate.
 
I work in a chemical plant and we do most of our programming in house.
Would a "job" like this really be done? I know there are situations, where a job shop has a long standing relationship with a customer and they might throw this in with another larger job. One of those, "while we're out there" situations.
But generally speaking do you run into this type of small application very often? Just trying to get a feel for how small is too small.
 
I wouldnt eat if it werent for the small jobs. I recently did a small panel with an ML1200 and Micro PV with about 25 rungs of code. It controlled a chiller and some water pumps.

Most of what I get to do is modify or rebuild small machines.

Y'all keep your rates up there so I can eat.
 
From Ken Moore:
Would a "job" like this really be done?

I know that when I was working for an Allen-Bradley distributor we used to get a call (on average) about once a month or so from customers wanting us to write a little program something like this ... my bosses wouldn’t let me write it (even as a personal “side” job) because of local politics ... they didn’t want to put us (the distributor) in a position of competing with the local system integrators ... after all, these guys are (or at least should be) some of a distributor’s regular customers ... most of the callers were building some small “better mousetrap” type of machine and didn’t want to get pulled into the PLC programming end of the job ... we'd usually take care of this situation by handing over a list of ALL of the integrators and let the customer sort it out with them ...

so anyway ... I know that there is at least a little bit of a demand for this type of work ...

along the same lines, I DID get to write quite a few specialty code “snippets” from time to time ... these were generally just ten or fifteen rungs that would convert data from some type of bizarro-world-ASCII into Twilight-Zone-Hexadecimal ... I’d do this (with the full blessings of my bosses) for our regular customers who were writing their own machine program – but having trouble getting this one little off-the-wall piece of the puzzle to work right ... we’d usually just send the finished code out by e-mail and let the customer splice it into his program ... for free ... it was work that was too small to be of interest to the integrators - and it bought us quite a bit of good will from an otherwise frustrated customer ...

finally ... does this ever happen to you? ... or am I the only one nuts enough to program PLCs in his sleep? ... I woke up this morning with a crystal-clear vision of how to “new and improve” the PUMP_Q program that I posted above ... I was able to just rearrange a few simple things and then delete six rungs and three branches ... in my humble opinion, I think that it’s much more elegant now ... (there is programming – and then there is art) ... and I also touched up some of the rung comments to make it a little more obvious how the station “code numbers” work ...
 
Last edited:
Many thanks again Ron,

It is a very good exercise for me.

I have one more question for you guys

Can we use the same output on different rungs eg. O:0/1 on rung 1, 2 and 3.


(If this subject has aready been discussed else where on this web please let me know.)
 
I wouldn't do it, the ole saying last scanned wins. Say you have a true rung and your output is on in say rung 1, now on down the ladder it's false(output off) well the last stated scanned is what will effect your output.
 
and by popular demand ...

for those of you who have expressed an interest in seeing this little program but don't have RSLogix500 available, here it is as a PDF file ...
 

Similar Topics

So I very much new to doing ladder coding I have a pump with a Stop float switch that stops the pump when a sump is low. I want my manual run mode...
Replies
13
Views
1,374
How can I achieve the same functionality in Studio 5000? Image 001.png for the old RSLogix500 program Image 002.png for conversion to Studio...
Replies
6
Views
2,482
Hi all, i found a post from 2011 talking about bool addressing and was trying to figure out how it works. I am not trying to accomplish something...
Replies
10
Views
2,244
In Studio 5000 Logix Designer, I've noticed some odd behavior of the ladder PID instruction. Using the .MINO tag, you can set a minimum output...
Replies
7
Views
3,923
I don't think I'm going crazy.. Lately when I have multiple routines open in the ladder editor and I open another one my tabs at the bottom only...
Replies
7
Views
2,400
Back
Top Bottom