Building a custom fluid pumping machine

More
7 years 6 months ago #130124 by andypugh
Replied by andypugh on topic Building a custom fluid pumping machine

andypugh wrote: I think you can probably make a HAL file executable. But I have never tried it. (#! /usr/bin/halrun ). I will try to remember to give it a try tomorrow.


OK, that works. Not that it is particularly important for what you need, but it's interesting.

If you save this code as a file called "something.hal" (it does need the .hal extension, it seems)
Code:
#! /usr/bin/halrun -I loadrt stepgen step_type=0 ctrl_type=v loadrt threads addf stepgen.update-freq thread1 addf stepgen.make-pulses thread1 addf stepgen.capture-position thread1 start setp stepgen.0.enable 1 setp stepgen.0.velocity-cmd 5 loadusr halmeter pin stepgen.0.position-fb
Then make it executable it will run as an executable Linux command.
(it loads realtime threads, loads a stepgen, sets it running at a constant speed and shows the position in a halmeter box)
The following user(s) said Thank You: Mike_Eitel

Please Log in or Create an account to join the conversation.

  • yoshimitsuspeed
  • Offline
  • Premium Member
  • Premium Member
More
7 years 6 months ago #130581 by yoshimitsuspeed
Replied by yoshimitsuspeed on topic Building a custom fluid pumping machine
So I'm still looking into options and linuxcnc is still probably in the top two right now. I would love to try and get a slightly better understanding of what specific process would be required and how hard it would actually be to accomplish.

What would have to be done outside of programming a python program?

I assume most of the process would be pretty similar to setting up linuxcnc. Install the OS, get everything set up so HAL, linuxcnc, whatever was talking to the mesa card, and then is it just a matter of writing the python program to do what we need?

Then what is involved in getting the glade display panel talking and working properly? Is this pretty easy?

I'm not sure if we would need help but I would definitely feel much more comfortable if andypugh or anyone else who was confident they could pull this off was willing to be available if we got stuck or needed help. Like I said we should be able to pay for their time.

Please Log in or Create an account to join the conversation.

More
7 years 6 months ago #130583 by cmorley
Replied by cmorley on topic Building a custom fluid pumping machine
Can you draw approximately on paper what you want for a display and post it here?
Can you roughly describe how the pumps are to be controlled?

I am sure we can get this to work.
Chris M

Please Log in or Create an account to join the conversation.

  • yoshimitsuspeed
  • Offline
  • Premium Member
  • Premium Member
More
7 years 6 months ago #130599 by yoshimitsuspeed
Replied by yoshimitsuspeed on topic Building a custom fluid pumping machine
I have been trying to figure out how much I want to share publicly and or how to explain more without disclosing too much.
This is a start

The goal is to mix two liquids and air in precise measurements. The air pump is positive displacement so we hope we don't need any flow sensor on it but we may add one if needed. It will use a 3 ph motor with VFD. We want the RPM controlled by the program.
Liquid 1 will be pumped in a fairly low volume. I want to use a positive displacement pump here as well. Ultimately I am thinking probably stepper but for now I have ordered a 24v gear pump. The first stage will likely be running it just at 24v and dialing everything else in to dispense the proper ratios to match it. The next stage might be trying to control the voltage to control the speed and offer a range of flow rates. But ideally I would like it to be stepper driven to improve precision. A small Nema 23 motor will probably be plenty.

Liquid 2 will be a higher volume and is running off a 3 ph electric motor and VFD.

We definitely want the L1 and L2 flow meters rates to be displayed on the HMI. We also want the program to be able to use the flow rate data to change the pump speeds. So if a flow meter starts reading slow it will speed up the pump.

That should cover everything on the definite list so far.

At some point we may want to add more steppers that will run other components down the road. Beyond that we want it to be relatively easy to add hardware, features, or sensors as things evolve and grow.

Please Log in or Create an account to join the conversation.

More
7 years 6 months ago #130608 by Todd Zuercher
Replied by Todd Zuercher on topic Building a custom fluid pumping machine
This definitely does not sound like a job for Linuxcnc. This is more of a simple PLC sort of job. But that doesn't mean that Linuxcnc (or parts of it) could not be made to do it. You should only need a simple gui and hal. You won't be needing the motion planner or any of that side of Linuxcnc.

Please Log in or Create an account to join the conversation.

  • yoshimitsuspeed
  • Offline
  • Premium Member
  • Premium Member
More
7 years 6 months ago #130628 by yoshimitsuspeed
Replied by yoshimitsuspeed on topic Building a custom fluid pumping machine
Yeah so then the question becomes which route should we take.
The other top competitor I have found is this setup.
velocio.net/plc-stepper-motor-control/

The prices look decent and it looks like it should be able to do everything we need. The price will probably be pretty similar to a mesa/linuxcnc route so then it comes down to which will be easier, more hassle free, and offer the most modularity, expandability and easy on the fly tweaking.

Their flow chart programming method looks like it would be pretty easy to learn but I haven't researched it enough yet to understand if it will easily do everything we need or what happens if we need a functionality that doesn't easily fit into one of it's boxes or things of that nature.

velocio.net/plc-stepper-motor-control/

I will keep looking into this option but I am still interested in the Mesa/HAL/linuxcnc route as well. My buddy who is familiar with python seems to be leaning more in the direction of something that utilizes that as well.

The Codesys option has moved lower on the list because we have a bit of a hard time wanting to rely on a pi for fault free operation and because the more advanced computer based Codesys options are a good bit more expensive. But it's still a possible option.

Please Log in or Create an account to join the conversation.

Time to create page: 0.203 seconds
Powered by Kunena Forum