Building a custom fluid pumping machine

More
7 years 7 months ago #129945 by tommylight
Replied by tommylight on topic Building a custom fluid pumping machine
There are 2 analogue inputs ( at least ) on every computer, namely the sound card has 4 but 2 for microphone are way to sensitive, so unusable for anything really, while the Line In can be used nicely. I used it as an oscilloscope for quite some time, It does need a divider on the input depending on what voltage you are measuring, and i have no clue how to implement that in Linuxcnc.

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

  • yoshimitsuspeed
  • Offline
  • Premium Member
  • Premium Member
More
7 years 7 months ago #129986 by yoshimitsuspeed
Replied by yoshimitsuspeed on topic Building a custom fluid pumping machine
Thanks for all the input everyone. It's greatly appreciated and has definitely helped.

Mike_Eitel
Thanks for the recommendation. codesys definitely looks interesting and it does look like the pi version would do what we need. Unfortunately looking on their forums on subjects related to stepper control and a few other things I found most posts didn't have any replies. Many others didn't really seem to come to resolution. Cost is important but so is time and ease. I will probably contact them and see if they offer any official support with the pi version. If so that could make it a little more tempting just in case we got stuck.

Badger
Velocio.net looks pretty promising as well. I will have to look into this a little more.

andypugh
I am still kind of interested in this route. Partially because even though I am not knowledgeable on much of the back end side of things it still feels closer to home to me. Seems like a lifetime ago I was messing with other PLC/HMI stuff and even then I was more on the hardware side.
Would it be possible for you to give me some sense of what we would be getting into if we went the route of Mesa/HAL/Glade?
Like how much work, what kind of work, what we would need to know?
It's possible I might be able to scrape up a some money if we found someone interested in consulting or assisting if we felt it was the right path forward.

cmorley
Right now it would be for a prototype and kind of a tight deadline. So speed and ease of getting it up and running, and it's ability to change quickly such as possibly adding other motors, sensors, etc and generally hopefully without ordering parts and waiting for them to get here. These are all pretty high priority. Cost is a factor but if the $400 option meets the above goals much better than the $50 option then that's a no brainer for us. On the other hand if a $1200 option is only marginally better than the $50 option then again that would be a pretty easy decision.
If this ends up becoming a production machine I wouldn't be the least bit surprised nor opposed to building another system better suited to production. It would be awesome if we don't have to but it wouldn't be the end of the world if we did.

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

More
7 years 7 months ago #130023 by Mike_Eitel
Replied by Mike_Eitel on topic Building a custom fluid pumping machine
Have a look to the pixtend hw for Raspberry and codesys.
From the handbook of version pixtend 2s a cutout that describes the usage of 4 steppers.

4.1.2.4.4 Frequency-Mode
Im Frequency-Mode enthalten die Bytes PWM0XL und PWM0XH ein zusammengehöriges 16 Bit Datenwort. Dieses Datenwort wird für die Einstellung der Frequenz des jeweiligen Kanals verwendet. Der Duty-Cycle ist für Kanal A und B immer 50% und kann nicht sein verändert werden. Der Modus eignet sich dann optimal, wenn möglichst viele unterschiedliche Frequenzen benötigt werden, der Duty-Cycle aber keine Rolle spielt. Dies ist beispielweise der Fall, wenn mit den PWM-Kanälen Schrittmotortreiber angesteuert werden, die lediglich auf Signalflanken reagieren und keinen variablen Duty-Cycle benötigen. So kann mit PiXtend die Geschwindigkeit von bis zu vier Schrittmotoren gesteuert werden (2x 16 Bit PWM0X, 2x 8 Bit PWM1X).

As you seem familiar with plc's I would give the boss of www.pixtend.de a call and ask him if there is a way to use their board with steppers in codesys. Doubt that you will be faster with any soft when there are existing modules for 61131.
m5c
Mike

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

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

yoshimitsuspeed wrote: andypugh
I am still kind of interested in this route. Partially because even though I am not knowledgeable on much of the back end side of things it still feels closer to home to me. Seems like a lifetime ago I was messing with other PLC/HMI stuff and even then I was more on the hardware side.
Would it be possible for you to give me some sense of what we would be getting into if we went the route of Mesa/HAL/Glade?


You would need to make a GladeVCP as a standalone window:
linuxcnc.org/docs/2.7/html/gui/gladevcp.html
The various controls (if you use the special LinuxCNC ones) automatically create HAL pins that pass the values in to HAL.
Then you would link those to the sensors / actuators in a HAL file.
The HAL file would first load the GUI, (A "loadusr" command, then load the various hardware drivers.

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.

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

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.

Time to create page: 0.171 seconds
Powered by Kunena Forum